Versions in this module Expand all Collapse all v0 v0.1.0 Mar 13, 2024 Changes in this version + const MaxConcurrentJobs + const ScheduleInterval + func MarshalFirstNonNilStructFieldToJSON(i any) (string, string, error) + func SyncContainers(ctx context.Context, db *database.Database, g *errgroup.Group, ...) + type ConfigMap struct + ConfigMapLabels []ConfigMapLabel + ConfigMapsData []ConfigMapData + Data []Data + Id types.Binary + Immutable types.Bool + Labels []Label + func (c *ConfigMap) Obtain(k8s kmetav1.Object) + func (c *ConfigMap) Relations() []database.Relation + type ConfigMapData struct + ConfigMapId types.Binary + DataId types.Binary + type ConfigMapLabel struct + ConfigMapId types.Binary + LabelId types.Binary + type Container struct + CpuLimits int64 + CpuRequests int64 + Devices []ContainerDevice + Image string + MemoryLimits int64 + MemoryRequests int64 + Mounts []ContainerMount + Name string + Ready types.Bool + RestartCount int32 + Started types.Bool + State sql.NullString + StateDetails string + func (c *Container) Relations() []database.Relation + type ContainerDevice struct + ContainerId types.Binary + Name string + Path string + PodId types.Binary + type ContainerLog struct + ContainerId types.Binary + ContainerName string + Namespace string + PodId types.Binary + PodName string + func (cl *ContainerLog) Upsert() interface{} + type ContainerLogMeta struct + LastUpdate types.UnixMilli + Logs string + type ContainerMeta struct + Id types.Binary + PodId types.Binary + type ContainerMount struct + ContainerId types.Binary + Path string + PodId types.Binary + ReadOnly types.Bool + SubPath sql.NullString + VolumeName string + type CronJob struct + Active int32 + ConcurrencyPolicy string + CronJobLabels []CronJobLabel + FailedJobsHistoryLimit int32 + Id types.Binary + Labels []Label + LastScheduleTime types.UnixMilli + LastSuccessfulTime types.UnixMilli + Schedule string + StartingDeadlineSeconds int64 + SuccessfulJobsHistoryLimit int32 + Suspend types.Bool + Timezone string + func (c *CronJob) Obtain(k8s kmetav1.Object) + func (c *CronJob) Relations() []database.Relation + type CronJobLabel struct + CronJobId types.Binary + LabelId types.Binary + type DaemonSet struct + Conditions []DaemonSetCondition + CurrentNumberScheduled int32 + DaemonSetLabels []DaemonSetLabel + DesiredNumberScheduled int32 + Id types.Binary + Labels []Label + MinReadySeconds int32 + NumberAvailable int32 + NumberMisscheduled int32 + NumberReady int32 + NumberUnavailable int32 + UpdateNumberScheduled int32 + UpdateStrategy string + func (d *DaemonSet) Obtain(k8s kmetav1.Object) + func (d *DaemonSet) Relations() []database.Relation + type DaemonSetCondition struct + DaemonSetId types.Binary + LastTransition types.UnixMilli + Message string + Reason string + Status string + Type string + type DaemonSetLabel struct + DaemonSetId types.Binary + LabelId types.Binary + type Data struct + Id types.Binary + Name string + Value string + type Deployment struct + ActualReplicas int32 + AvailableReplicas int32 + Conditions []DeploymentCondition + DeploymentLabels []DeploymentLabel + DesiredReplicas int32 + Id types.Binary + Labels []Label + MinReadySeconds int32 + Paused types.Bool + ProgressDeadlineSeconds int32 + ReadyReplicas int32 + Strategy string + UnavailableReplicas int32 + UpdatedReplicas int32 + func (d *Deployment) Obtain(k8s kmetav1.Object) + func (d *Deployment) Relations() []database.Relation + type DeploymentCondition struct + DeploymentId types.Binary + LastTransition types.UnixMilli + LastUpdate types.UnixMilli + Message string + Reason string + Status string + Type string + type DeploymentLabel struct + DeploymentId types.Binary + LabelId types.Binary + type Endpoint struct + Address string + AppProtocol string + EndpointSliceId types.Binary + HostName string + Id types.Binary + NodeName string + Port int32 + PortName string + Protocol string + Ready types.Bool + Serving types.Bool + Terminating types.Bool + type EndpointSlice struct + AddressType string + EndpointLabels []EndpointSliceLabel + EndpointTargetRefs []EndpointTargetRef + Endpoints []Endpoint + Id types.Binary + Labels []Label + func (e *EndpointSlice) Obtain(k8s kmetav1.Object) + func (e *EndpointSlice) Relations() []database.Relation + type EndpointSliceLabel struct + EndpointSliceId types.Binary + LabelId types.Binary + type EndpointTargetRef struct + ApiVersion string + EndpointSliceId types.Binary + Kind sql.NullString + Name string + Namespace string + ResourceVersion string + Uid ktypes.UID + type Event struct + Action string + Count int32 + FirstSeen types.UnixMilli + Id types.Binary + LastSeen types.UnixMilli + Note string + Reason string + ReferenceKind string + ReferenceName string + ReferenceNamespace string + ReportingController string + ReportingInstance string + Type string + func (e *Event) Obtain(k8s kmetav1.Object) + type Ingress struct + Id types.Binary + IngressBackendResource []IngressBackendResource + IngressBackendService []IngressBackendService + IngressRule []IngressRule + IngressTls []IngressTls + func (i *Ingress) Obtain(k8s kmetav1.Object) + func (i *Ingress) Relations() []database.Relation + type IngressBackendResource struct + ApiGroup sql.NullString + IngressId types.Binary + IngressRuleId types.Binary + Kind string + Name string + ResourceId types.Binary + type IngressBackendService struct + IngressId types.Binary + IngressRuleId types.Binary + ServiceId types.Binary + ServiceName string + ServicePortName string + ServicePortNumber int32 + type IngressRule struct + BackendId types.Binary + Host string + Id types.Binary + IngressId types.Binary + Path string + PathType sql.NullString + type IngressTls struct + IngressId types.Binary + TlsHost string + TlsSecret string + type Job struct + Active int32 + ActiveDeadlineSeconds sql.NullInt64 + BackoffLimit sql.NullInt32 + CompletionMode sql.NullString + CompletionTime types.UnixMilli + Completions sql.NullInt32 + Conditions []JobCondition + Failed int32 + Id types.Binary + JobLabels []JobLabel + Labels []Label + Parallelism sql.NullInt32 + StartTime types.UnixMilli + Succeeded int32 + Suspend types.Bool + TtlSecondsAfterFinished sql.NullInt32 + func (j *Job) Obtain(k8s kmetav1.Object) + func (j *Job) Relations() []database.Relation + type JobCondition struct + JobId types.Binary + LastProbe types.UnixMilli + LastTransition types.UnixMilli + Message string + Reason string + Status string + Type string + type JobLabel struct + JobId types.Binary + LabelId types.Binary + type Label struct + Id types.Binary + Name string + Value string + type Meta struct + Created types.UnixMilli + Name string + Namespace string + ResourceVersion string + Uid ktypes.UID + 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 struct + Conditions []NamespaceCondition + Id types.Binary + Labels []Label + NamespaceLabels []NamespaceLabel + Phase string + func (n *Namespace) Obtain(k8s kmetav1.Object) + func (n *Namespace) Relations() []database.Relation + type NamespaceCondition struct + LastTransition types.UnixMilli + Message string + NamespaceId types.Binary + Reason string + Status string + Type string + type NamespaceLabel struct + LabelId types.Binary + NamespaceId types.Binary + type Node struct + Conditions []NodeCondition + CpuAllocatable int64 + CpuCapacity int64 + Id types.Binary + Labels []Label + MemoryAllocatable int64 + MemoryCapacity int64 + NodeLabels []NodeLabel + NumIps int64 + PodCIDR string + PodCapacity int64 + Ready types.Bool + Unschedulable types.Bool + Volumes []NodeVolume + func (n *Node) Obtain(k8s kmetav1.Object) + func (n *Node) Relations() []database.Relation + type NodeCondition struct + LastHeartbeat types.UnixMilli + LastTransition types.UnixMilli + Message string + NodeId types.Binary + Reason string + Status string + Type string + type NodeLabel struct + LabelId types.Binary + NodeId types.Binary + type NodeVolume struct + DevicePath string + Mounted types.Bool + NodeId types.Binary + type PersistentVolume struct + AccessModes types.Bitmask[kpersistentVolumeAccessModesSize] + Capacity int64 + Claim PersistentVolumeClaimRef + Id types.Binary + Message string + Phase string + Reason string + ReclaimPolicy string + StorageClass string + VolumeMode sql.NullString + VolumeSource string + VolumeSourceType string + func (p *PersistentVolume) Obtain(k8s kmetav1.Object) + func (p *PersistentVolume) Relations() []database.Relation + type PersistentVolumeClaimRef struct + Kind string + Name string + PersistentVolumeId types.Binary + Uid ktypes.UID + type Pod struct + Conditions []PodCondition + Containers []Container + CpuLimits int64 + CpuRequests int64 + Id types.Binary + Ip string + Labels []Label + MemoryLimits int64 + MemoryRequests int64 + Message string + NodeName string + NominatedNodeName string + Owners []PodOwner + Phase string + PodLabels []PodLabel + Pvcs []PodPvc + Qos string + Reason string + RestartPolicy string + Volumes []PodVolume + func (p *Pod) Obtain(k8s kmetav1.Object) + func (p *Pod) Relations() []database.Relation + type PodCondition struct + LastProbe types.UnixMilli + LastTransition types.UnixMilli + Message string + PodId types.Binary + Reason string + Status string + Type string + type PodFactory struct + func NewPodFactory(clientset *kubernetes.Clientset) *PodFactory + func (f *PodFactory) New() Resource + type PodLabel struct + LabelId types.Binary + PodId types.Binary + type PodMetrics struct + CPUUsage float64 + ContainerName string + Duration time.Duration + EphemeralStorageUsage float64 + MemoryUsage float64 + Namespace string + PodName string + StorageUsage float64 + Timestamp types.UnixMilli + type PodOwner struct + BlockOwnerDeletion types.Bool + Controller types.Bool + Kind string + Name string + PodId types.Binary + Uid ktypes.UID + type PodPvc struct + ClaimName string + PodId types.Binary + ReadOnly types.Bool + VolumeName string + type PodVolume struct + PodId types.Binary + Source string + Type string + VolumeName string + type Pvc struct + ActualAccessModes types.Bitmask[kpersistentVolumeAccessModesSize] + ActualCapacity int64 + Conditions []PvcCondition + DesiredAccessModes types.Bitmask[kpersistentVolumeAccessModesSize] + Id types.Binary + Labels []Label + MinimumCapacity sql.NullInt64 + Phase string + PvcLabels []PvcLabel + StorageClass sql.NullString + VolumeMode sql.NullString + VolumeName string + func (p *Pvc) Obtain(k8s kmetav1.Object) + func (p *Pvc) Relations() []database.Relation + type PvcCondition struct + LastProbe types.UnixMilli + LastTransition types.UnixMilli + Message string + PvcId types.Binary + Reason string + Status string + Type string + type PvcLabel struct + LabelId types.Binary + PvcId types.Binary + type ReplicaSet struct + ActualReplicas int32 + AvailableReplicas int32 + Conditions []ReplicaSetCondition + DesiredReplicas int32 + FullyLabeledReplicas int32 + Id types.Binary + Labels []Label + MinReadySeconds int32 + Owners []ReplicaSetOwner + ReadyReplicas int32 + ReplicaSetLabels []ReplicaSetLabel + func (r *ReplicaSet) Obtain(k8s kmetav1.Object) + func (r *ReplicaSet) Relations() []database.Relation + type ReplicaSetCondition struct + LastTransition types.UnixMilli + Message string + Reason string + ReplicaSetId types.Binary + Status string + Type string + type ReplicaSetLabel struct + LabelId types.Binary + ReplicaSetId types.Binary + type ReplicaSetOwner struct + BlockOwnerDeletion types.Bool + Controller types.Bool + Kind string + Name string + ReplicaSetId types.Binary + Uid ktypes.UID + type Resource interface + Obtain func(k8s kmetav1.Object) + 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 struct + Data []Data + Id types.Binary + Immutable types.Bool + Labels []Label + SecretData []SecretData + SecretLabels []SecretLabel + Type string + func (s *Secret) Obtain(k8s kmetav1.Object) + func (s *Secret) Relations() []database.Relation + type SecretData struct + DataId types.Binary + SecretId types.Binary + type SecretLabel struct + LabelId types.Binary + SecretId types.Binary + type Selector struct + Id types.Binary + Name string + Value string + type Service struct + AllocateLoadBalancerNodePorts types.Bool + ClusterIP string + ClusterIPs string + Conditions []ServiceCondition + ExternalIPs string + ExternalName string + ExternalTrafficPolicy sql.NullString + HealthCheckNodePort int32 + Id types.Binary + InternalTrafficPolicy string + IpFamilies string + IpFamilyPolicy string + Labels []Label + LoadBalancerClass string + Ports []ServicePort + PublishNotReadyAddresses types.Bool + Selectors []Selector + ServiceLabels []ServiceLabel + ServiceSelectors []ServiceSelector + SessionAffinity string + Type string + func (s *Service) Obtain(k8s kmetav1.Object) + func (s *Service) Relations() []database.Relation + type ServiceCondition struct + LastTransition types.UnixMilli + Message string + ObservedGeneration int64 + Reason string + ServiceId types.Binary + Status string + Type string + type ServiceLabel struct + LabelId types.Binary + ServiceId types.Binary + type ServicePort struct + AppProtocol string + Name string + NodePort int32 + Port int32 + Protocol string + ServiceId types.Binary + TargetPort string + type ServiceSelector struct + SelectorId types.Binary + ServiceId types.Binary + type StatefulSet struct + ActualReplicas int32 + AvailableReplicas int32 + Conditions []StatefulSetCondition + CurrentReplicas int32 + DesiredReplicas int32 + Id types.Binary + Labels []Label + MinReadySeconds int32 + Ordinals int32 + PersistentVolumeClaimRetentionPolicyWhenDeleted string + PersistentVolumeClaimRetentionPolicyWhenScaled string + PodManagementPolicy string + ReadyReplicas int32 + ServiceName string + StatefulSetLabels []StatefulSetLabel + UpdateStrategy string + UpdatedReplicas int32 + func (s *StatefulSet) Obtain(k8s kmetav1.Object) + func (s *StatefulSet) Relations() []database.Relation + type StatefulSetCondition struct + LastTransition types.UnixMilli + Message string + Reason string + StatefulSetId types.Binary + Status string + Type string + type StatefulSetLabel struct + LabelId types.Binary + StatefulSetId types.Binary