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 Cluster
- type Config
- type ConfigKey
- 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 Favorite
- type IcingaState
- type Ingress
- type IngressAnnotation
- type IngressBackendResource
- type IngressBackendService
- type IngressLabel
- 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, clusterUuid types.UUID)
- 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 PersistentVolumeAnnotation
- type PersistentVolumeClaimRef
- type PersistentVolumeLabel
- 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 NewStatefulSet() Resource
- type ResourceAnnotation
- type ResourceLabel
- type Secret
- type SecretAnnotation
- type SecretLabel
- type Selector
- type Service
- type ServiceAnnotation
- type ServiceCondition
- type ServiceFactory
- type ServiceLabel
- type ServicePod
- type ServicePort
- type ServiceSelector
- type SidecarContainer
- type StatefulSet
- type StatefulSetAnnotation
- type StatefulSetCondition
- type StatefulSetLabel
- type StatefulSetOwner
Constants ¶
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 ¶
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, 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 ConfigKey ¶ added in v0.3.0
type ConfigKey string
ConfigKey represents the database config.Key enums.
const ( ConfigKeyNotificationsUsername ConfigKey = "notifications.username" ConfigKeyNotificationsPassword ConfigKey = "notifications.password" ConfigKeyNotificationsUrl ConfigKey = "notifications.url" ConfigKeyNotificationsKubernetesWebUrl ConfigKey = "notifications.kubernetes_web_url" ConfigKeyPrometheusUrl ConfigKey = "prometheus.url" ConfigKeyPrometheusInsecure ConfigKey = "prometheus.insecure" ConfigKeyPrometheusUsername ConfigKey = "prometheus.username" ConfigKeyPrometheusPassword ConfigKey = "prometheus.password" )
type ConfigMap ¶
type ConfigMap struct {
Meta
Immutable types.Bool
Labels []Label `db:"-"`
ConfigMapLabels []ConfigMapLabel `db:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
ConfigMapAnnotations []ConfigMapAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `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
IcingaState IcingaState
IcingaStateReason string
Labels []Label `db:"-"`
CronJobLabels []CronJobLabel `db:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
CronJobAnnotations []CronJobAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
DaemonSetAnnotations []DaemonSetAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
func (*DaemonSet) MarshalEvent ¶ added in v0.3.0
func (d *DaemonSet) MarshalEvent() (notifications.Event, error)
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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
DeploymentAnnotations []DeploymentAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
func (*Deployment) MarshalEvent ¶ added in v0.3.0
func (d *Deployment) MarshalEvent() (notifications.Event, error)
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, clusterUuid types.UUID)
func (*EndpointSlice) Relations ¶
func (e *EndpointSlice) Relations() []database.Relation
type EndpointSliceLabel ¶
type EndpointTargetRef ¶
type Event ¶
type Event struct {
Meta
ReferenceUuid 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
func (IcingaState) ToSeverity ¶ added in v0.3.0
func (s IcingaState) ToSeverity() string
type Ingress ¶
type Ingress struct {
Meta
Yaml string
IngressTls []IngressTls `db:"-"`
IngressBackendService []IngressBackendService `db:"-"`
IngressBackendResource []IngressBackendResource `db:"-"`
IngressRule []IngressRule `db:"-"`
Labels []Label `db:"-"`
IngressLabels []IngressLabel `db:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
IngressAnnotations []IngressAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
type IngressAnnotation ¶ added in v0.3.0
type IngressBackendResource ¶
type IngressBackendService ¶
type IngressLabel ¶ added in v0.3.0
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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
JobAnnotations []JobAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Owners []JobOwner `db:"-"`
Favorites []Favorite `db:"-"`
}
type JobAnnotation ¶ added in v0.2.0
type JobCondition ¶
type Meta ¶
type Meta struct {
Uuid types.UUID
ClusterUuid 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) 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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
NamespaceAnnotations []NamespaceAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
NodeAnnotations []NodeAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
func (*Node) MarshalEvent ¶ added in v0.3.0
func (n *Node) MarshalEvent() (notifications.Event, error)
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:"-"`
Labels []Label `db:"-"`
PersistentVolumeLabels []PersistentVolumeLabel `db:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
PersistentVolumeAnnotations []PersistentVolumeAnnotation `db:"-"`
ResourceAnnotations []PersistentVolumeAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
func (*PersistentVolume) Obtain ¶
func (p *PersistentVolume) Obtain(k8s kmetav1.Object, clusterUuid types.UUID)
func (*PersistentVolume) Relations ¶
func (p *PersistentVolume) Relations() []database.Relation
type PersistentVolumeAnnotation ¶ added in v0.3.0
type PersistentVolumeLabel ¶ added in v0.3.0
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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
PodAnnotations []PodAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Pvcs []PodPvc `db:"-"`
Volumes []PodVolume `db:"-"`
Favorites []Favorite `db:"-"`
// contains filtered or unexported fields
}
func (*Pod) MarshalEvent ¶ added in v0.3.0
func (p *Pod) MarshalEvent() (notifications.Event, error)
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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
PvcAnnotations []PvcAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
ReplicaSetAnnotations []ReplicaSetAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
func (*ReplicaSet) MarshalEvent ¶ added in v0.3.0
func (r *ReplicaSet) MarshalEvent() (notifications.Event, error)
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 NewStatefulSet ¶
func NewStatefulSet() Resource
type ResourceAnnotation ¶ added in v0.3.0
type ResourceLabel ¶ added in v0.3.0
type Secret ¶
type Secret struct {
Meta
Type string
Immutable types.Bool
Labels []Label `db:"-"`
SecretLabels []SecretLabel `db:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
SecretAnnotations []SecretAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
ServiceAnnotations []ServiceAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
ServicePods []ServicePod `db:"-"`
Favorites []Favorite `db:"-"`
// contains filtered or unexported fields
}
type ServiceAnnotation ¶ added in v0.2.0
type ServiceCondition ¶
type ServiceFactory ¶ added in v0.3.0
type ServiceFactory struct {
// contains filtered or unexported fields
}
func NewServiceFactory ¶ added in v0.3.0
func NewServiceFactory(clientset *kubernetes.Clientset) *ServiceFactory
func (*ServiceFactory) NewService ¶ added in v0.3.0
func (f *ServiceFactory) NewService() Resource
type ServicePod ¶ added in v0.3.0
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:"-"`
ResourceLabels []ResourceLabel `db:"-"`
Annotations []Annotation `db:"-"`
StatefulSetAnnotations []StatefulSetAnnotation `db:"-"`
ResourceAnnotations []ResourceAnnotation `db:"-"`
Favorites []Favorite `db:"-"`
}
func (*StatefulSet) MarshalEvent ¶ added in v0.3.0
func (s *StatefulSet) MarshalEvent() (notifications.Event, error)
func (*StatefulSet) Obtain ¶
func (s *StatefulSet) Obtain(k8s kmetav1.Object, clusterUuid types.UUID)
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
- cluster.go
- config.go
- config_map.go
- container.go
- contracts.go
- cron_job.go
- daemon_set.go
- deployment.go
- endpoint.go
- event.go
- favorite.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
- resource_annotation.go
- resource_label.go
- secret.go
- selector.go
- service.go
- stateful_set.go
- utils.go