Documentation ¶
Index ¶
- Constants
- Variables
- func EnsureUUID(uid ktypes.UID) types.UUID
- func MarshalFirstNonNilStructFieldToJSON(i any) (string, string, error)
- func MaxInt[T constraints.Integer](x, y T) T
- func NewContainers[T any](p *Pod, containers []kcorev1.Container, statuses []kcorev1.ContainerStatus, ...) []*T
- func NewNullableString(s any) sql.NullString
- func NewUUID(space types.UUID, data string) types.UUID
- func PodIsEvicted(pod *kcorev1.Pod) bool
- func PodIsShutDown(pod *kcorev1.Pod) bool
- func SyncContainers(ctx context.Context, db *database.Database, g *errgroup.Group, ...)
- type Annotation
- type Bitmask
- type ConfigMap
- type ConfigMapAnnotation
- type ConfigMapLabel
- type Container
- type ContainerCommon
- type ContainerDevice
- type ContainerLog
- type ContainerLogMeta
- type ContainerMount
- type ContainerResources
- type ContainerRestartable
- type ContainerStateReasonAndMassage
- type CronJob
- type CronJobAnnotation
- type CronJobLabel
- type DaemonSet
- type DaemonSetAnnotation
- type DaemonSetCondition
- type DaemonSetLabel
- type DaemonSetOwner
- type Deployment
- type DeploymentAnnotation
- type DeploymentCondition
- type DeploymentLabel
- type DeploymentOwner
- type Endpoint
- type EndpointSlice
- type EndpointSliceLabel
- type EndpointTargetRef
- type Event
- type IcingaState
- type Ingress
- type IngressBackendResource
- type IngressBackendService
- type IngressRule
- type IngressTls
- type InitContainer
- type Instance
- type Job
- type JobAnnotation
- type JobCondition
- type JobLabel
- type JobOwner
- type Label
- type Meta
- func (m *Meta) GetAnnotations() map[string]string
- func (m *Meta) GetCreationTimestamp() kmetav1.Time
- func (m *Meta) GetDeletionGracePeriodSeconds() *int64
- func (m *Meta) GetDeletionTimestamp() *kmetav1.Time
- func (m *Meta) GetFinalizers() []string
- func (m *Meta) GetGenerateName() string
- func (m *Meta) GetGeneration() int64
- func (m *Meta) GetLabels() map[string]string
- func (m *Meta) GetManagedFields() []kmetav1.ManagedFieldsEntry
- func (m *Meta) GetName() string
- func (m *Meta) GetNamespace() string
- func (m *Meta) GetOwnerReferences() []kmetav1.OwnerReference
- func (m *Meta) GetResourceVersion() string
- func (m *Meta) GetSelfLink() string
- func (m *Meta) GetUID() ktypes.UID
- func (m *Meta) ObtainMeta(k8s kmetav1.Object)
- func (m *Meta) SetAnnotations(_ map[string]string)
- func (m *Meta) SetCreationTimestamp(kmetav1.Time)
- func (m *Meta) SetDeletionGracePeriodSeconds(*int64)
- func (m *Meta) SetDeletionTimestamp(*kmetav1.Time)
- func (m *Meta) SetFinalizers([]string)
- func (m *Meta) SetGenerateName(string)
- func (m *Meta) SetGeneration(int64)
- func (m *Meta) SetLabels(map[string]string)
- func (m *Meta) SetManagedFields([]kmetav1.ManagedFieldsEntry)
- func (m *Meta) SetName(string)
- func (m *Meta) SetNamespace(string)
- func (m *Meta) SetOwnerReferences([]kmetav1.OwnerReference)
- func (m *Meta) SetResourceVersion(string)
- func (m *Meta) SetSelfLink(string)
- func (m *Meta) SetUID(ktypes.UID)
- type Namespace
- type NamespaceAnnotation
- type NamespaceCondition
- type NamespaceLabel
- type Node
- type NodeAnnotation
- type NodeCondition
- type NodeLabel
- type NodeVolume
- type PersistentVolume
- type PersistentVolumeClaimRef
- type Pod
- type PodAnnotation
- type PodCondition
- type PodFactory
- type PodLabel
- type PodMetrics
- type PodOwner
- type PodPvc
- type PodVolume
- type PodYaml
- type PrometheusClusterMetric
- type PrometheusContainerMetric
- type PrometheusNodeMetric
- type PrometheusPodMetric
- type Pvc
- type PvcAnnotation
- type PvcCondition
- type PvcLabel
- type ReplicaSet
- type ReplicaSetAnnotation
- type ReplicaSetCondition
- type ReplicaSetLabel
- type ReplicaSetOwner
- type Resource
- func NewConfigMap() Resource
- func NewCronJob() Resource
- func NewDaemonSet() Resource
- func NewDeployment() Resource
- func NewEndpointSlice() Resource
- func NewEvent() Resource
- func NewIngress() Resource
- func NewJob() Resource
- func NewNamespace() Resource
- func NewNode() Resource
- func NewPersistentVolume() Resource
- func NewPvc() Resource
- func NewReplicaSet() Resource
- func NewSecret() Resource
- func NewService() Resource
- func NewStatefulSet() Resource
- type Secret
- type SecretAnnotation
- type SecretLabel
- type Selector
- type Service
- type ServiceAnnotation
- type ServiceCondition
- type ServiceLabel
- type ServicePort
- type ServiceSelector
- type SidecarContainer
- type StatefulSet
- type StatefulSetAnnotation
- type StatefulSetCondition
- type StatefulSetLabel
- type StatefulSetOwner
Constants ¶
View Source
const ( MaxConcurrentJobs int = 60 ScheduleInterval = 5 * time.Minute MaxLogLength = 1<<16 - 1 PodInitializing = "PodInitializing" // https://github.com/kubernetes/kubernetes/blob/v1.30.1/pkg/kubelet/kubelet_pods.go#L80 ContainerCreating = "ContainerCreating" ErrImagePull = "ErrImagePull" // https://github.com/kubernetes/kubernetes/blob/v1.30.1/pkg/kubelet/images/types.go#L27 ErrImagePullBackOff = "ImagePullBackOff" ErrCrashLoopBackOff = "CrashLoopBackOff" // https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/kubelet/container/sync_result.go#L29 )
Variables ¶
View Source
var NameSpaceKubernetes = uuid.MustParse("3f249403-2bb0-428f-8e91-504d1fd7ddb6")
Functions ¶
func MaxInt ¶ added in v0.2.0
func MaxInt[T constraints.Integer](x, y T) T
func NewContainers ¶ added in v0.2.0
func NewNullableString ¶ added in v0.2.0
func NewNullableString(s any) sql.NullString
func PodIsEvicted ¶ added in v0.2.0
PodIsEvicted returns true if the reported pod status is due to an eviction.
func PodIsShutDown ¶ added in v0.2.0
PodIsShutDown returns true if kubelet is done with the pod, or it was force-deleted.
func SyncContainers ¶
func SyncContainers(ctx context.Context, db *database.Database, g *errgroup.Group, upsertPods <-chan interface{}, deletePods <-chan interface{})
SyncContainers consumes from the `upsertPods` and `deletePods` chans concurrently and schedules a job for each of the containers (drawn from `upsertPods`) that periodically syncs the container logs with the database. When pods are deleted, their IDs are streamed through the `deletePods` chan, and this fetches all the container IDs matching the respective pod ID from the database and initiates a container deletion stream that cleans up all container-related resources.
Types ¶
type Annotation ¶ added in v0.2.0
type Bitmask ¶ added in v0.2.0
type Bitmask[T constraints.Integer] struct { // contains filtered or unexported fields }
type ConfigMap ¶
type ConfigMap struct { Meta Immutable types.Bool Labels []Label `db:"-"` ConfigMapLabels []ConfigMapLabel `db:"-"` Annotations []Annotation `db:"-"` ConfigMapAnnotations []ConfigMapAnnotation `db:"-"` }
type ConfigMapAnnotation ¶ added in v0.2.0
type Container ¶
type Container struct { ContainerCommon ContainerResources ContainerRestartable }
func NewContainer ¶ added in v0.2.0
type ContainerCommon ¶ added in v0.2.0
type ContainerCommon struct { Uuid types.UUID PodUuid types.UUID Name string Image string ImagePullPolicy string State sql.NullString StateDetails sql.NullString IcingaState IcingaState IcingaStateReason string Devices []ContainerDevice `db:"-"` Mounts []ContainerMount `db:"-"` }
func (*ContainerCommon) Obtain ¶ added in v0.2.0
func (c *ContainerCommon) Obtain(podUuid types.UUID, container kcorev1.Container, status kcorev1.ContainerStatus)
func (*ContainerCommon) Relations ¶ added in v0.2.0
func (c *ContainerCommon) Relations() []database.Relation
type ContainerDevice ¶
type ContainerLog ¶
type ContainerLog struct { PodUuid types.UUID `db:"pod_uuid"` ContainerUuid types.UUID `db:"container_uuid"` ContainerLogMeta Namespace string `db:"-"` PodName string `db:"-"` ContainerName string `db:"-"` }
func (*ContainerLog) Upsert ¶
func (cl *ContainerLog) Upsert() interface{}
Upsert implements the database.Upserter interface.
type ContainerLogMeta ¶
type ContainerMount ¶
type ContainerResources ¶ added in v0.2.0
type ContainerResources struct { CpuLimits sql.NullInt64 CpuRequests sql.NullInt64 MemoryLimits sql.NullInt64 MemoryRequests sql.NullInt64 }
func (*ContainerResources) Obtain ¶ added in v0.2.0
func (c *ContainerResources) Obtain(container kcorev1.Container)
type ContainerRestartable ¶ added in v0.2.0
func (*ContainerRestartable) Obtain ¶ added in v0.2.0
func (c *ContainerRestartable) Obtain(status kcorev1.ContainerStatus)
type ContainerStateReasonAndMassage ¶ added in v0.2.0
type ContainerStateReasonAndMassage [2]string
func (ContainerStateReasonAndMassage) String ¶ added in v0.2.0
func (c ContainerStateReasonAndMassage) String() string
type CronJob ¶
type CronJob struct { Meta Schedule string Timezone sql.NullString StartingDeadlineSeconds sql.NullInt64 ConcurrencyPolicy string Suspend types.Bool SuccessfulJobsHistoryLimit int32 FailedJobsHistoryLimit int32 Active int32 LastScheduleTime types.UnixMilli LastSuccessfulTime types.UnixMilli Yaml string Labels []Label `db:"-"` CronJobLabels []CronJobLabel `db:"-"` Annotations []Annotation `db:"-"` CronJobAnnotations []CronJobAnnotation `db:"-"` }
type CronJobAnnotation ¶ added in v0.2.0
type DaemonSet ¶
type DaemonSet struct { Meta UpdateStrategy string MinReadySeconds int32 DesiredNumberScheduled int32 CurrentNumberScheduled int32 NumberMisscheduled int32 NumberReady int32 UpdateNumberScheduled int32 NumberAvailable int32 Yaml string IcingaState IcingaState IcingaStateReason string Conditions []DaemonSetCondition `db:"-"` Owners []DaemonSetOwner `db:"-"` Labels []Label `db:"-"` DaemonSetLabels []DaemonSetLabel `db:"-"` Annotations []Annotation `db:"-"` DaemonSetAnnotations []DaemonSetAnnotation `db:"-"` }
type DaemonSetAnnotation ¶ added in v0.2.0
type DaemonSetCondition ¶
type DaemonSetOwner ¶ added in v0.2.0
type Deployment ¶
type Deployment struct { Meta Strategy string MinReadySeconds int32 ProgressDeadlineSeconds int32 Paused types.Bool DesiredReplicas int32 ActualReplicas int32 UpdatedReplicas int32 ReadyReplicas int32 AvailableReplicas int32 Yaml string IcingaState IcingaState IcingaStateReason string Conditions []DeploymentCondition `db:"-"` Owners []DeploymentOwner `db:"-"` Labels []Label `db:"-"` DeploymentLabels []DeploymentLabel `db:"-"` Annotations []Annotation `db:"-"` DeploymentAnnotations []DeploymentAnnotation `db:"-"` }
func (*Deployment) Obtain ¶
func (d *Deployment) Obtain(k8s kmetav1.Object)
func (*Deployment) Relations ¶
func (d *Deployment) Relations() []database.Relation
type DeploymentAnnotation ¶ added in v0.2.0
type DeploymentCondition ¶
type DeploymentLabel ¶
type DeploymentOwner ¶ added in v0.2.0
type EndpointSlice ¶
type EndpointSlice struct { Meta AddressType string Endpoints []Endpoint `db:"-"` Labels []Label `db:"-"` EndpointLabels []EndpointSliceLabel `db:"-"` EndpointTargetRefs []EndpointTargetRef `db:"-"` }
func (*EndpointSlice) Obtain ¶
func (e *EndpointSlice) Obtain(k8s kmetav1.Object)
func (*EndpointSlice) Relations ¶
func (e *EndpointSlice) Relations() []database.Relation
type EndpointSliceLabel ¶
type EndpointTargetRef ¶
type Event ¶
type Event struct { Meta ReferentUuid types.UUID ReportingController sql.NullString ReportingInstance sql.NullString Action sql.NullString Reason string Note string Type string ReferenceKind string ReferenceNamespace sql.NullString ReferenceName string FirstSeen types.UnixMilli LastSeen types.UnixMilli Count int32 Yaml string }
type IcingaState ¶ added in v0.2.0
type IcingaState uint8
const ( Ok IcingaState = iota Pending Unknown Warning Critical )
func GetContainerState ¶ added in v0.2.0
func GetContainerState(container kcorev1.Container, status kcorev1.ContainerStatus) (IcingaState, string)
func (IcingaState) String ¶ added in v0.2.0
func (s IcingaState) String() string
type Ingress ¶
type Ingress struct { Meta Yaml string IngressTls []IngressTls `db:"-"` IngressBackendService []IngressBackendService `db:"-"` IngressBackendResource []IngressBackendResource `db:"-"` IngressRule []IngressRule `db:"-"` }
type IngressBackendResource ¶
type IngressBackendService ¶
type IngressRule ¶
type InitContainer ¶ added in v0.2.0
type InitContainer struct { ContainerCommon ContainerResources }
func NewInitContainer ¶ added in v0.2.0
func NewInitContainer(podUuid types.UUID, container kcorev1.Container, status kcorev1.ContainerStatus) *InitContainer
type Instance ¶ added in v0.2.0
type Job ¶
type Job struct { Meta Parallelism sql.NullInt32 Completions sql.NullInt32 ActiveDeadlineSeconds sql.NullInt64 BackoffLimit sql.NullInt32 TtlSecondsAfterFinished sql.NullInt32 CompletionMode sql.NullString Suspend types.Bool StartTime types.UnixMilli CompletionTime types.UnixMilli Active int32 Succeeded int32 Failed int32 Yaml string IcingaState IcingaState IcingaStateReason string Conditions []JobCondition `db:"-"` Labels []Label `db:"-"` JobLabels []JobLabel `db:"-"` Annotations []Annotation `db:"-"` JobAnnotations []JobAnnotation `db:"-"` Owners []JobOwner `db:"-"` }
type JobAnnotation ¶ added in v0.2.0
type JobCondition ¶
type Meta ¶
type Meta struct { Uuid types.UUID Uid ktypes.UID Namespace string Name string ResourceVersion string Created types.UnixMilli }
func (*Meta) GetAnnotations ¶
func (*Meta) GetCreationTimestamp ¶
func (*Meta) GetDeletionGracePeriodSeconds ¶
func (*Meta) GetDeletionTimestamp ¶
func (*Meta) GetFinalizers ¶
func (*Meta) GetGenerateName ¶
func (*Meta) GetGeneration ¶
func (*Meta) GetManagedFields ¶
func (m *Meta) GetManagedFields() []kmetav1.ManagedFieldsEntry
func (*Meta) GetNamespace ¶
func (*Meta) GetOwnerReferences ¶
func (m *Meta) GetOwnerReferences() []kmetav1.OwnerReference
func (*Meta) GetResourceVersion ¶
func (*Meta) GetSelfLink ¶
func (*Meta) ObtainMeta ¶
func (*Meta) SetAnnotations ¶
func (*Meta) SetCreationTimestamp ¶
func (*Meta) SetDeletionGracePeriodSeconds ¶
func (*Meta) SetDeletionTimestamp ¶
func (*Meta) SetFinalizers ¶
func (*Meta) SetGenerateName ¶
func (*Meta) SetGeneration ¶
func (*Meta) SetManagedFields ¶
func (m *Meta) SetManagedFields([]kmetav1.ManagedFieldsEntry)
func (*Meta) SetNamespace ¶
func (*Meta) SetOwnerReferences ¶
func (m *Meta) SetOwnerReferences([]kmetav1.OwnerReference)
func (*Meta) SetResourceVersion ¶
func (*Meta) SetSelfLink ¶
type Namespace ¶
type Namespace struct { Meta Phase string Yaml string Conditions []NamespaceCondition `db:"-"` Labels []Label `db:"-"` NamespaceLabels []NamespaceLabel `db:"-"` Annotations []Annotation `db:"-"` NamespaceAnnotations []NamespaceAnnotation `db:"-"` }
type NamespaceAnnotation ¶ added in v0.2.0
type NamespaceCondition ¶
type Node ¶
type Node struct { Meta PodCIDR string NumIps int64 Unschedulable types.Bool Ready types.Bool CpuCapacity int64 CpuAllocatable int64 MemoryCapacity int64 MemoryAllocatable int64 PodCapacity int64 Yaml string Roles string MachineId string SystemUUID string BootId string KernelVersion string OsImage string OperatingSystem string Architecture string ContainerRuntimeVersion string KubeletVersion string KubeProxyVersion string IcingaState IcingaState IcingaStateReason string Conditions []NodeCondition `db:"-"` Volumes []NodeVolume `db:"-"` Labels []Label `db:"-"` NodeLabels []NodeLabel `db:"-"` Annotations []Annotation `db:"-"` NodeAnnotations []NodeAnnotation `db:"-"` }
type NodeAnnotation ¶ added in v0.2.0
type NodeCondition ¶
type NodeVolume ¶
type PersistentVolume ¶
type PersistentVolume struct { Meta AccessModes Bitmask[kpersistentVolumeAccessModesSize] Capacity int64 ReclaimPolicy string StorageClass sql.NullString VolumeMode string VolumeSourceType string VolumeSource string Phase string Reason sql.NullString Message sql.NullString Yaml string Claim *PersistentVolumeClaimRef `db:"-"` }
func (*PersistentVolume) Obtain ¶
func (p *PersistentVolume) Obtain(k8s kmetav1.Object)
func (*PersistentVolume) Relations ¶
func (p *PersistentVolume) Relations() []database.Relation
type Pod ¶
type Pod struct { Meta NodeName sql.NullString NominatedNodeName sql.NullString Ip sql.NullString Phase string IcingaState IcingaState IcingaStateReason string CpuLimits sql.NullInt64 CpuRequests sql.NullInt64 MemoryLimits sql.NullInt64 MemoryRequests sql.NullInt64 Reason sql.NullString Message sql.NullString Qos sql.NullString RestartPolicy string Yaml string Conditions []PodCondition `db:"-"` Containers []*Container `db:"-"` InitContainers []*InitContainer `db:"-"` SidecarContainers []*SidecarContainer `db:"-"` Owners []PodOwner `db:"-"` Labels []Label `db:"-"` PodLabels []PodLabel `db:"-"` Annotations []Annotation `db:"-"` PodAnnotations []PodAnnotation `db:"-"` Pvcs []PodPvc `db:"-"` Volumes []PodVolume `db:"-"` // contains filtered or unexported fields }
type PodAnnotation ¶ added in v0.2.0
type PodCondition ¶
type PodFactory ¶
type PodFactory struct {
// contains filtered or unexported fields
}
func NewPodFactory ¶
func NewPodFactory(clientset *kubernetes.Clientset) *PodFactory
func (*PodFactory) New ¶
func (f *PodFactory) New() Resource
type PodMetrics ¶
type PodMetrics struct { Namespace string `db:"namespace"` PodName string `db:"pod_name"` ContainerName string `db:"container_name"` Timestamp types.UnixMilli `db:"timestamp"` Duration time.Duration `db:"duration"` CPUUsage float64 `db:"cpu_usage"` MemoryUsage float64 `db:"memory_usage"` StorageUsage float64 `db:"storage_usage"` EphemeralStorageUsage float64 `db:"ephemeral_storage_usage"` }
type PrometheusClusterMetric ¶ added in v0.2.0
type PrometheusClusterMetric struct { ClusterUuid types.UUID Timestamp int64 Category string Name string Value float64 }
func (*PrometheusClusterMetric) Fingerprint ¶ added in v0.2.0
func (m *PrometheusClusterMetric) Fingerprint() database.Fingerprinter
func (*PrometheusClusterMetric) ID ¶ added in v0.2.0
func (m *PrometheusClusterMetric) ID() database.ID
func (*PrometheusClusterMetric) SetID ¶ added in v0.2.0
func (m *PrometheusClusterMetric) SetID(id database.ID)
type PrometheusContainerMetric ¶ added in v0.2.0
type PrometheusContainerMetric struct { ContainerUuid types.UUID Timestamp int64 Category string Name string Value float64 }
func (*PrometheusContainerMetric) Fingerprint ¶ added in v0.2.0
func (m *PrometheusContainerMetric) Fingerprint() database.Fingerprinter
func (*PrometheusContainerMetric) ID ¶ added in v0.2.0
func (m *PrometheusContainerMetric) ID() database.ID
func (*PrometheusContainerMetric) SetID ¶ added in v0.2.0
func (m *PrometheusContainerMetric) SetID(id database.ID)
type PrometheusNodeMetric ¶ added in v0.2.0
type PrometheusNodeMetric struct { NodeUuid types.UUID Timestamp int64 Category string Name string Value float64 }
func (*PrometheusNodeMetric) Fingerprint ¶ added in v0.2.0
func (m *PrometheusNodeMetric) Fingerprint() database.Fingerprinter
func (*PrometheusNodeMetric) ID ¶ added in v0.2.0
func (m *PrometheusNodeMetric) ID() database.ID
func (*PrometheusNodeMetric) SetID ¶ added in v0.2.0
func (m *PrometheusNodeMetric) SetID(id database.ID)
type PrometheusPodMetric ¶ added in v0.2.0
type PrometheusPodMetric struct { PodUuid types.UUID Timestamp int64 Category string Name string Value float64 }
func (*PrometheusPodMetric) Fingerprint ¶ added in v0.2.0
func (m *PrometheusPodMetric) Fingerprint() database.Fingerprinter
func (*PrometheusPodMetric) ID ¶ added in v0.2.0
func (m *PrometheusPodMetric) ID() database.ID
func (*PrometheusPodMetric) SetID ¶ added in v0.2.0
func (m *PrometheusPodMetric) SetID(id database.ID)
type Pvc ¶
type Pvc struct { Meta DesiredAccessModes Bitmask[kpersistentVolumeAccessModesSize] ActualAccessModes Bitmask[kpersistentVolumeAccessModesSize] MinimumCapacity sql.NullInt64 ActualCapacity sql.NullInt64 Phase string VolumeName sql.NullString VolumeMode string StorageClass sql.NullString Yaml string Conditions []PvcCondition `db:"-"` Labels []Label `db:"-"` PvcLabels []PvcLabel `db:"-"` Annotations []Annotation `db:"-"` PvcAnnotations []PvcAnnotation `db:"-"` }
type PvcAnnotation ¶ added in v0.2.0
type PvcCondition ¶
type ReplicaSet ¶
type ReplicaSet struct { Meta DesiredReplicas int32 MinReadySeconds int32 ActualReplicas int32 FullyLabeledReplicas int32 ReadyReplicas int32 AvailableReplicas int32 Yaml string IcingaState IcingaState IcingaStateReason string Conditions []ReplicaSetCondition `db:"-"` Owners []ReplicaSetOwner `db:"-"` Labels []Label `db:"-"` ReplicaSetLabels []ReplicaSetLabel `db:"-"` Annotations []Annotation `db:"-"` ReplicaSetAnnotations []ReplicaSetAnnotation `db:"-"` }
func (*ReplicaSet) Obtain ¶
func (r *ReplicaSet) Obtain(k8s kmetav1.Object)
func (*ReplicaSet) Relations ¶
func (r *ReplicaSet) Relations() []database.Relation
type ReplicaSetAnnotation ¶ added in v0.2.0
type ReplicaSetCondition ¶
type ReplicaSetLabel ¶
type ReplicaSetOwner ¶
type Resource ¶
func NewConfigMap ¶
func NewConfigMap() Resource
func NewCronJob ¶
func NewCronJob() Resource
func NewDaemonSet ¶
func NewDaemonSet() Resource
func NewDeployment ¶
func NewDeployment() Resource
func NewEndpointSlice ¶
func NewEndpointSlice() Resource
func NewIngress ¶
func NewIngress() Resource
func NewNamespace ¶
func NewNamespace() Resource
func NewPersistentVolume ¶
func NewPersistentVolume() Resource
func NewReplicaSet ¶
func NewReplicaSet() Resource
func NewService ¶
func NewService() Resource
func NewStatefulSet ¶
func NewStatefulSet() Resource
type Secret ¶
type Secret struct { Meta Type string Immutable types.Bool Labels []Label `db:"-"` SecretLabels []SecretLabel `db:"-"` Annotations []Annotation `db:"-"` SecretAnnotations []SecretAnnotation `db:"-"` }
type SecretAnnotation ¶ added in v0.2.0
type Service ¶
type Service struct { Meta ClusterIP string ClusterIPs string Type string ExternalIPs sql.NullString SessionAffinity string ExternalName sql.NullString ExternalTrafficPolicy sql.NullString HealthCheckNodePort sql.NullInt32 PublishNotReadyAddresses types.Bool IpFamilies sql.NullString IpFamilyPolicy sql.NullString AllocateLoadBalancerNodePorts types.Bool LoadBalancerClass sql.NullString InternalTrafficPolicy string Yaml string Selectors []Selector `db:"-"` ServiceSelectors []ServiceSelector `db:"-"` Ports []ServicePort `db:"-"` Conditions []ServiceCondition `db:"-"` Labels []Label `db:"-"` ServiceLabels []ServiceLabel `db:"-"` Annotations []Annotation `db:"-"` ServiceAnnotations []ServiceAnnotation `db:"-"` }
type ServiceAnnotation ¶ added in v0.2.0
type ServiceCondition ¶
type ServicePort ¶
type ServiceSelector ¶
type SidecarContainer ¶ added in v0.2.0
type SidecarContainer struct { ContainerCommon ContainerResources ContainerRestartable }
func NewSidecarContainer ¶ added in v0.2.0
func NewSidecarContainer(podUuid types.UUID, container kcorev1.Container, status kcorev1.ContainerStatus) *SidecarContainer
type StatefulSet ¶
type StatefulSet struct { Meta DesiredReplicas int32 ServiceName string PodManagementPolicy string UpdateStrategy string MinReadySeconds int32 PersistentVolumeClaimRetentionPolicyWhenDeleted string PersistentVolumeClaimRetentionPolicyWhenScaled string Ordinals int32 ActualReplicas int32 ReadyReplicas int32 CurrentReplicas int32 UpdatedReplicas int32 AvailableReplicas int32 Yaml string IcingaState IcingaState IcingaStateReason string Conditions []StatefulSetCondition `db:"-"` Owners []StatefulSetOwner `db:"-"` Labels []Label `db:"-"` StatefulSetLabels []StatefulSetLabel `db:"-"` Annotations []Annotation `db:"-"` StatefulSetAnnotations []StatefulSetAnnotation `db:"-"` }
func (*StatefulSet) Obtain ¶
func (s *StatefulSet) Obtain(k8s kmetav1.Object)
func (*StatefulSet) Relations ¶
func (s *StatefulSet) Relations() []database.Relation
type StatefulSetAnnotation ¶ added in v0.2.0
type StatefulSetCondition ¶
type StatefulSetLabel ¶
Source Files ¶
- annotation.go
- bitmask.go
- config_map.go
- container.go
- contracts.go
- cron_job.go
- daemon_set.go
- deployment.go
- endpoint.go
- event.go
- icinga_state.go
- ingress.go
- instance.go
- job.go
- label.go
- metric.go
- metrics.go
- namespace.go
- node.go
- persistent_volume.go
- pod.go
- pvc.go
- replica_set.go
- secret.go
- selector.go
- service.go
- stateful_set.go
- utils.go
Click to show internal directories.
Click to hide internal directories.