k8s

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindDeployment     = "Deployment"
	KindStatefulSet    = "StatefulSet"
	KindDaemonSet      = "DaemonSet"
	KindCronJob        = "CronJob"
	KindJob            = "Job"
	KindReplicaSet     = "ReplicaSet"
	KindPod            = "Pod"
	KindGrafana        = "Grafana"
	KindThanos         = "Thanos"
	KindThanosReceiver = "Receiver"
	KindConfigMap      = "ConfigMap"
)

Variables

This section is empty.

Functions

func GetData added in v0.1.4

func GetData(value interface{}) map[string]any

func GetImage added in v0.1.3

func GetImage(data map[string]any, key string) (values []string, valuesFound bool)

func SupportedKinds added in v0.1.0

func SupportedKinds() []string

Types

type AlertManager added in v0.1.0

type AlertManager monitoringV1.Alertmanager

func (*AlertManager) Get added in v0.1.0

func (dep *AlertManager) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from AlertManager.

type ConfigMap added in v0.1.3

type ConfigMap coreV1.ConfigMap

func (*ConfigMap) Get added in v0.1.3

func (dep *ConfigMap) Get(dataMap string, log *logrus.Logger) (*Image, error)

type CronJob

type CronJob batchV1.CronJob

func (*CronJob) Get

func (dep *CronJob) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from CronJob.

type DaemonSets

type DaemonSets appsV1.DaemonSet

func (*DaemonSets) Get

func (dep *DaemonSets) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from DaemonSets.

type Deployments

type Deployments appsV1.Deployment

func (*Deployments) Get

func (dep *Deployments) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from Deployments.

type Grafana added in v0.1.0

type Grafana grafanaBetaV1.Grafana

func (*Grafana) Get added in v0.1.0

func (dep *Grafana) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from Grafana.

type Image

type Image struct {
	Kind  string   `json:"kind,omitempty" yaml:"kind,omitempty"`
	Name  string   `json:"name,omitempty" yaml:"name,omitempty"`
	Image []string `json:"image,omitempty" yaml:"image,omitempty"`
}

Image holds information of images retrieved.

type ImagesInterface

type ImagesInterface interface {
	Get(dataMap string, log *logrus.Logger) (*Image, error)
}

ImagesInterface implements method that gets images from various kubernetes workloads.

func NewAlertManager added in v0.1.0

func NewAlertManager() ImagesInterface

NewAlertManager returns new instance of AlertManager.

func NewConfigMap added in v0.1.3

func NewConfigMap() ImagesInterface

func NewCronjob

func NewCronjob() ImagesInterface

NewCronjob returns new instance of Cronjob.

func NewDaemonSet

func NewDaemonSet() ImagesInterface

NewDaemonSet returns new instance of DaemonSets.

func NewDeployment

func NewDeployment() ImagesInterface

NewDeployment returns new instance of Deployments.

func NewGrafana added in v0.1.0

func NewGrafana() ImagesInterface

NewGrafana returns new instance of Grafana.

func NewJob

func NewJob() ImagesInterface

NewJob returns new instance of Job.

func NewPod added in v0.0.7

func NewPod() ImagesInterface

NewPod returns new instance of Pod.

func NewPrometheus added in v0.1.0

func NewPrometheus() ImagesInterface

NewPrometheus returns new instance of Prometheus.

func NewReplicaSets

func NewReplicaSets() ImagesInterface

NewReplicaSets returns new instance of ReplicaSets.

func NewStatefulSet

func NewStatefulSet() ImagesInterface

NewStatefulSet returns new instance of StatefulSets.

func NewThanos added in v0.1.0

func NewThanos() ImagesInterface

NewThanos returns new instance of Thanos.

func NewThanosReceiver added in v0.1.0

func NewThanosReceiver() ImagesInterface

NewThanosReceiver returns new instance of ThanosReceiver.

func NewThanosRuler added in v0.1.0

func NewThanosRuler() ImagesInterface

NewThanosRuler returns new instance of ThanosRuler.

type Job

type Job batchV1.Job

func (*Job) Get

func (dep *Job) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from Job.

type Kind

type Kind map[string]interface{}

func (*Kind) Get

func (kin *Kind) Get(dataMap string, log *logrus.Logger) (string, error)

type KindInterface

type KindInterface interface {
	Get(dataMap string, log *logrus.Logger) (string, error)
}

KindInterface implements method that identifies the type of kubernetes workloads.

func NewKind

func NewKind() KindInterface

NewKind returns new instance of Kind.

func NewName added in v0.1.4

func NewName() KindInterface

NewName returns new instance of Name.

type Name added in v0.1.4

type Name map[string]interface{}

func (*Name) Get added in v0.1.4

func (name *Name) Get(dataMap string, log *logrus.Logger) (string, error)

type Pod added in v0.0.7

type Pod coreV1.Pod

func (*Pod) Get added in v0.0.7

func (dep *Pod) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from Pod.

type Prometheus added in v0.1.0

type Prometheus monitoringV1.Prometheus

func (*Prometheus) Get added in v0.1.0

func (dep *Prometheus) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from Prometheus.

type ReplicaSets

type ReplicaSets appsV1.ReplicaSet

func (*ReplicaSets) Get

func (dep *ReplicaSets) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from ReplicaSets.

type StatefulSets

type StatefulSets appsV1.StatefulSet

func (*StatefulSets) Get

func (dep *StatefulSets) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from StatefulSets.

type Thanos added in v0.1.0

type Thanos thanosAlphaV1.Thanos

func (*Thanos) Get added in v0.1.0

func (dep *Thanos) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from Thanos.

type ThanosReceiver added in v0.1.0

type ThanosReceiver thanosAlphaV1.Receiver

func (*ThanosReceiver) Get added in v0.1.0

func (dep *ThanosReceiver) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from ThanosReceiver.

type ThanosRuler added in v0.1.0

type ThanosRuler monitoringV1.ThanosRuler

func (*ThanosRuler) Get added in v0.1.0

func (dep *ThanosRuler) Get(dataMap string, log *logrus.Logger) (*Image, error)

Get identifies images from ThanosRuler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL