Documentation ¶
Index ¶
- type CalicoClusterInformation
- type CalicoClusterInformationSpec
- type CalicoClusterInformationStatus
- type Capabilities
- type Cluster
- type Container
- type ContainerPort
- type ContainerState
- type ContainerStateRunning
- type ContainerStateTerminated
- type ContainerStateWaiting
- type ContainerStatus
- type CronJobSpec
- type CronJobStatus
- type CustomResources
- type DaemonSetSpec
- type DaemonSetStatus
- type DeploymentSpec
- type DeploymentStatus
- type IPBlock
- type IntOrString
- type Inventory
- func (i *Inventory) AddNamespace(n *Namespace)
- func (i *Inventory) AddNetworkPolicy(n *NetworkPolicy)
- func (i *Inventory) AddNode(n *Node)
- func (i *Inventory) AddWorkload(w *Workload)
- func (i *Inventory) DeleteNamespace(n *Namespace)
- func (i *Inventory) DeleteNetworkPolicy(n *NetworkPolicy)
- func (i *Inventory) DeleteNode(n *Node)
- func (i *Inventory) DeleteWorkload(w *Workload)
- type JobSpec
- type JobStatus
- type KCIRocks
- type KCIRocksDBInstance
- type KCIRocksDBInstanceSpec
- type KCIRocksDBInstanceStatus
- type KCIRocksDBInstances
- type KubernetesAnnotations
- type KubernetesLabels
- type LabelSelector
- type LabelSelectorRequirement
- type Namespace
- type NamespaceSpec
- type NamespaceStatus
- type Namespaces
- type NetworkPolicies
- type NetworkPolicy
- type NetworkPolicyEgressRule
- type NetworkPolicyIngressRule
- type NetworkPolicyPeer
- type NetworkPolicyPort
- type NetworkPolicySpec
- type Node
- type NodeSpec
- type NodeStatus
- type Nodes
- type Object
- type ObjectMeta
- type OwnerReference
- type OwnerReferences
- type PartialObject
- type PersistentVolume
- type PersistentVolumeSpec
- type PersistentVolumeStatus
- type PersistentVolumes
- type PodCondition
- type PodSecurityContext
- type PodSpec
- type PodStatus
- type PodTemplate
- type PodTemplateContainer
- type RabbitMQ
- type RabbitMQCluster
- type RabbitMQClusterSpec
- type RabbitMQClusterStatus
- type RabbitMQClusters
- type Reference
- type ReplicaSetSpec
- type ReplicaSetStatus
- type ResourceRequirements
- type RootOwner
- type SecurityContext
- type Set
- type Spec
- type StatefulSetSpec
- type StatefulSetStatus
- type Status
- type Storage
- type StorageClass
- type StorageClasses
- type TypeMeta
- type Velero
- type VeleroBackup
- type VeleroBackupSpec
- type VeleroBackupStatus
- type VeleroBackups
- type VeleroSchedule
- type VeleroScheduleSpec
- type VeleroScheduleStatus
- type VeleroSchedules
- type Volume
- type VolumeMount
- type Workload
- type Workloads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalicoClusterInformation ¶
type CalicoClusterInformation struct { PartialObject Spec CalicoClusterInformationSpec `json:"spec"` Status CalicoClusterInformationStatus `json:"status"` }
func NewCalicoClusterInformation ¶
func NewCalicoClusterInformation() *CalicoClusterInformation
type CalicoClusterInformationSpec ¶
type CalicoClusterInformationSpec struct {
Version string `json:"version"`
}
type CalicoClusterInformationStatus ¶
type CalicoClusterInformationStatus struct{}
type Capabilities ¶
type Cluster ¶
type Cluster struct { // FQDN FQDN string `json:"fqdn" validate:"omitempty,fqdn"` // Like `kubectl version -o json` Version string `json:"semverVersion"` FullVersion string `json:"version"` GitCommit string `json:"gitCommit"` BuildDate string `json:"buildDate"` // Where/on what is the cluster running KubernetesProvider string `json:"kubernetesProvider"` InfrastructureProvider string `json:"infrastructureProvider"` // Secure Cloud Stack Information ProviderName string `json:"providerName" validate:"required"` Name string `json:"name" validate:"required"` }
func NewCluster ¶
func NewCluster() *Cluster
type Container ¶
type Container struct { Name string `json:"name"` Image string `json:"image,omitempty"` Command []string `json:"command,omitempty"` Args []string `json:"args,omitempty"` WorkingDir string `json:"workingDir,omitempty"` Ports []ContainerPort `json:"ports,omitempty"` Resources ResourceRequirements `json:"resources,omitempty"` RestartPolicy *string `json:"restartPolicy,omitempty"` VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty"` SecurityContext *SecurityContext `json:"securityContext,omitempty"` }
type ContainerPort ¶
type ContainerState ¶
type ContainerState struct { Waiting *ContainerStateWaiting `json:"waiting,omitempty"` Running *ContainerStateRunning `json:"running,omitempty"` Terminated *ContainerStateTerminated `json:"terminated,omitempty"` }
type ContainerStateRunning ¶
type ContainerStateTerminated ¶
type ContainerStateTerminated struct { ExitCode int32 `json:"exitCode"` Signal int32 `json:"signal,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` StartedAt metav1.Time `json:"startedAt,omitempty"` FinishedAt metav1.Time `json:"finishedAt,omitempty"` ContainerID string `json:"containerID,omitempty"` }
type ContainerStateWaiting ¶
type ContainerStatus ¶
type ContainerStatus struct { Name string `json:"name"` State ContainerState `json:"state,omitempty"` Ready bool `json:"ready"` Image string `json:"image"` ImageID string `json:"imageID"` }
type CronJobSpec ¶
type CronJobSpec struct { Schedule string `json:"schedule"` ConcurrencyPolicy string `json:"concurrencyPolicy"` JobTemplate *PodTemplate `json:"jobTemplate"` }
type CronJobStatus ¶
type CustomResources ¶
type CustomResources struct { Velero *Velero `json:"velero"` KCIRocks *KCIRocks `json:"kciRocks"` RabbitMQ *RabbitMQ `json:"rabbitMQ"` CalicoCluster *CalicoClusterInformation `json:"calicoCluster"` HasContour bool `json:"hasContour"` HasVelero bool `json:"hasVelero"` HasKCIRocks bool `json:"hasKCIRocks"` HasRabbitMQ bool `json:"hasRabbitMQ"` HasCalico bool `json:"hasCalico"` HasExternalSecrets bool `json:"hasExternalSecrets"` HasCertManager bool `json:"hasCertManager"` HasGitOpsToolkit bool `json:"hasGitOpsToolkit"` HasPrometheus bool `json:"hasPrometheus"` }
func NewCustomResources ¶
func NewCustomResources() *CustomResources
type DaemonSetSpec ¶
type DaemonSetSpec struct { Template *PodTemplate `json:"template"` UpdateStrategy string `json:"updateStrategy"` }
type DaemonSetStatus ¶
type DeploymentSpec ¶
type DeploymentSpec struct { Replicas *int32 `json:"replicas"` Strategy string `json:"strategy"` Template *PodTemplate `json:"template"` }
type DeploymentStatus ¶
type IntOrString ¶
type Inventory ¶
type Inventory struct { Cluster *Cluster `json:"cluster"` Nodes Nodes `json:"nodes"` Namespaces Namespaces `json:"namespaces"` Workloads Workloads `json:"workloads"` Storage *Storage `json:"storage"` NetworkPolicies NetworkPolicies `json:"networkPolicies"` CustomResources *CustomResources `json:"customResources"` CollectedAt metav1.Time `json:"collectedAt"` CollectionSucceeded bool `json:"collectionSucceeded"` CollectionErrors []string `json:"collectionErrors"` ClientVersion string `json:"clientVersion"` ClientCommit string `json:"clientCommit"` }
func NewInventory ¶
func NewInventory() *Inventory
func (*Inventory) AddNamespace ¶
func (*Inventory) AddNetworkPolicy ¶
func (i *Inventory) AddNetworkPolicy(n *NetworkPolicy)
func (*Inventory) AddWorkload ¶
func (*Inventory) DeleteNamespace ¶
func (*Inventory) DeleteNetworkPolicy ¶
func (i *Inventory) DeleteNetworkPolicy(n *NetworkPolicy)
func (*Inventory) DeleteNode ¶
func (*Inventory) DeleteWorkload ¶
type JobSpec ¶
type JobSpec struct { Parallelism *int32 `json:"parallelism"` Completions *int32 `json:"completions"` BackoffLimit *int32 `json:"backoffLimit"` Template *PodTemplate `json:"template"` }
type KCIRocks ¶
type KCIRocks struct {
DBInstances KCIRocksDBInstances `json:"dbInstances"`
}
func NewKCIRocks ¶
func NewKCIRocks() *KCIRocks
func (*KCIRocks) AddDBInstance ¶
func (k *KCIRocks) AddDBInstance(i *KCIRocksDBInstance)
func (*KCIRocks) DeleteDBInstance ¶
func (k *KCIRocks) DeleteDBInstance(i *KCIRocksDBInstance)
type KCIRocksDBInstance ¶
type KCIRocksDBInstance struct { PartialObject Spec KCIRocksDBInstanceSpec `json:"spec"` Status KCIRocksDBInstanceStatus `json:"status"` }
func NewKCIRocksDBInstance ¶
func NewKCIRocksDBInstance() *KCIRocksDBInstance
type KCIRocksDBInstanceSpec ¶
type KCIRocksDBInstanceStatus ¶
type KCIRocksDBInstanceStatus struct {
Phase string `json:"status"`
}
type KCIRocksDBInstances ¶
type KCIRocksDBInstances = Set[*KCIRocksDBInstance]
type KubernetesAnnotations ¶
type KubernetesLabels ¶
type LabelSelector ¶
type LabelSelector struct { MatchLabels map[string]string `json:"matchLabels,omitempty"` MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty"` }
type Namespace ¶
type Namespace struct { PartialObject Spec NamespaceSpec `json:"spec"` Status NamespaceStatus `json:"status"` }
func NewNamespace ¶
func NewNamespace() *Namespace
type NamespaceSpec ¶
type NamespaceSpec struct{}
type NamespaceStatus ¶
type NamespaceStatus struct{}
type Namespaces ¶
type NetworkPolicies ¶
type NetworkPolicies = Set[*NetworkPolicy]
type NetworkPolicy ¶
type NetworkPolicy struct { PartialObject Spec NetworkPolicySpec `json:"spec"` }
func NewNetworkPolicy ¶
func NewNetworkPolicy() *NetworkPolicy
type NetworkPolicyEgressRule ¶
type NetworkPolicyEgressRule struct { Ports []NetworkPolicyPort `json:"ports,omitempty"` To []NetworkPolicyPeer `json:"from,omitempty"` }
type NetworkPolicyIngressRule ¶
type NetworkPolicyIngressRule struct { Ports []NetworkPolicyPort `json:"ports,omitempty"` From []NetworkPolicyPeer `json:"from,omitempty"` }
type NetworkPolicyPeer ¶
type NetworkPolicyPeer struct { PodSelector *LabelSelector `json:"podSelector,omitempty"` NamespaceSelector *LabelSelector `json:"namespaceSelector,omitempty"` IPBlock *IPBlock `json:"ipBlock,omitempty"` }
type NetworkPolicyPort ¶
type NetworkPolicyPort struct { Protocol *string `json:"protocol,omitempty"` Port *IntOrString `json:"port,omitempty"` EndPort *int32 `json:"endPort,omitempty"` }
func (NetworkPolicyPort) MarshalJSON ¶
func (npp NetworkPolicyPort) MarshalJSON() ([]byte, error)
func (*NetworkPolicyPort) UnmarshalJSON ¶
func (npp *NetworkPolicyPort) UnmarshalJSON(data []byte) error
type NetworkPolicySpec ¶
type NetworkPolicySpec struct { PodSelector LabelSelector `json:"podSelector"` Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty"` Egress []NetworkPolicyEgressRule `json:"egress,omitempty"` PolicyTypes []string `json:"policyTypes,omitempty"` }
type Node ¶
type Node struct { PartialObject Spec NodeSpec `json:"spec"` Status NodeStatus `json:"status"` Role string `json:"role"` IsControlPlane bool `json:"isControlPlane"` TopologyRegion string `json:"topologyRegion"` TopologyZone string `json:"topologyZone"` Provider string `json:"provider"` KubeProxyVersion string `json:"kubeProxyVersion"` KubeletVersion string `json:"kubeletVersion"` KernelVersion string `json:"kernelVersion"` CRIName string `json:"criName"` CRIVersion string `json:"criVersion"` ContainerRuntimeVersion string `json:"containerRuntimeVersion"` MemoryCapacityBytes int64 `json:"memoryCapacityBytes"` MemoryAllocatableBytes int64 `json:"memoryAllocatableBytes"` CPUCapacityMillis int64 `json:"cpuCapacityMillis"` CPUAllocatableMillis int64 `json:"cpuAllocatableMillis"` }
type NodeStatus ¶
type NodeStatus struct {
NodeInfo corev1.NodeSystemInfo `json:"nodeInfo"`
}
type Object ¶
type Object interface { GetKind() string GetAPIGroup() string GetResourceType() string GetAPIVersion() string GetName() string GetNamespace() string SetFromObjectMeta(om metav1.ObjectMeta) SetFromTypeMeta(tm metav1.TypeMeta) EqualTo(o Object) bool }
Object represents an object with Kubernetes metadata associated
type ObjectMeta ¶
type ObjectMeta struct { Name string `json:"name"` Namespace string `json:"namespace,omitempty"` CreationTimestamp metav1.Time `json:"creationTimestamp"` Labels KubernetesLabels `json:"labels"` Annotations KubernetesAnnotations `json:"annotations"` OwnerReferences OwnerReferences `json:"ownerReferences"` }
func NewObjectMeta ¶
func NewObjectMeta(o metav1.ObjectMeta) ObjectMeta
func (*ObjectMeta) GetName ¶
func (o *ObjectMeta) GetName() string
func (*ObjectMeta) GetNamespace ¶
func (o *ObjectMeta) GetNamespace() string
func (*ObjectMeta) SetFromObjectMeta ¶
func (o *ObjectMeta) SetFromObjectMeta(om metav1.ObjectMeta)
type OwnerReference ¶
type OwnerReferences ¶
type OwnerReferences []OwnerReference
type PartialObject ¶
type PartialObject struct { TypeMeta ObjectMeta }
func (*PartialObject) EqualTo ¶
func (p *PartialObject) EqualTo(o Object) bool
type PersistentVolume ¶
type PersistentVolume struct { PartialObject Spec PersistentVolumeSpec `json:"spec"` Status PersistentVolumeStatus `json:"status"` Source string `json:"source"` Driver string `json:"driver"` Path string `json:"path"` FSType string `json:"fsType"` VolumeID string `json:"volumeID"` }
func NewPersistentVolume ¶
func NewPersistentVolume() *PersistentVolume
func (*PersistentVolume) SetPersistentVolumeSource ¶
func (p *PersistentVolume) SetPersistentVolumeSource(o corev1.PersistentVolume)
type PersistentVolumeSpec ¶
type PersistentVolumeStatus ¶
type PersistentVolumes ¶
type PersistentVolumes = Set[*PersistentVolume]
type PodCondition ¶
type PodSecurityContext ¶
type PodSpec ¶
type PodSpec struct { Volumes []Volume `json:"volumes,omitempty"` InitContainers []Container `json:"initContainers,omitempty"` Containers []Container `json:"containers"` RestartPolicy string `json:"restartPolicy,omitempty"` ServiceAccountName string `json:"serviceAccountName,omitempty"` NodeName string `json:"nodeName,omitempty"` HostNetwork bool `json:"hostNetwork,omitempty"` SecurityContext *PodSecurityContext `json:"securityContext,omitempty"` PriorityClassName string `json:"priorityClassName,omitempty"` Priority *int32 `json:"priority,omitempty"` PreemptionPolicy *string `json:"preemptionPolicy,omitempty"` }
type PodStatus ¶
type PodStatus struct { Phase string `json:"phase,omitempty"` Conditions []PodCondition `json:"conditions,omitempty"` PodIP string `json:"podIP,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` InitContainerStatuses []ContainerStatus `json:"initContainerStatuses,omitempty"` ContainerStatuses []ContainerStatus `json:"containerStatuses,omitempty"` QOSClass string `json:"qosClass,omitempty"` }
type PodTemplate ¶
type PodTemplate struct { Containers []*PodTemplateContainer `json:"containers"` InitContainers []*PodTemplateContainer `json:"initContainers"` }
func NewPodTemplate ¶
func NewPodTemplate() *PodTemplate
type PodTemplateContainer ¶
type PodTemplateContainer struct { Image string `json:"image"` LimitsCPU int64 `json:"limitsCPU"` LimitsMemory int64 `json:"limitsMemory"` RequestsCPU int64 `json:"requestsCPU"` RequestsMemory int64 `json:"requestsMemory"` }
func NewPodTemplateContainer ¶
func NewPodTemplateContainer() *PodTemplateContainer
type RabbitMQ ¶
type RabbitMQ struct {
Clusters RabbitMQClusters `json:"clusters"`
}
func NewRabbitMQ ¶
func NewRabbitMQ() *RabbitMQ
func (*RabbitMQ) AddCluster ¶
func (r *RabbitMQ) AddCluster(c *RabbitMQCluster)
func (*RabbitMQ) DeleteCluster ¶
func (r *RabbitMQ) DeleteCluster(c *RabbitMQCluster)
type RabbitMQCluster ¶
type RabbitMQCluster struct { PartialObject Spec RabbitMQClusterSpec `json:"spec"` Status RabbitMQClusterStatus `json:"status"` }
func NewRabbitMQCluster ¶
func NewRabbitMQCluster() *RabbitMQCluster
type RabbitMQClusterSpec ¶
type RabbitMQClusterStatus ¶
type RabbitMQClusterStatus struct{}
type RabbitMQClusters ¶
type RabbitMQClusters = Set[*RabbitMQCluster]
type ReplicaSetSpec ¶
type ReplicaSetSpec struct { Replicas *int32 `json:"replicas"` Template *PodTemplate `json:"template"` }
type ReplicaSetStatus ¶
type ResourceRequirements ¶
type ResourceRequirements struct { LimitsCPU int64 `json:"limitsCPU"` LimitsMemory int64 `json:"limitsMemory"` RequestsCPU int64 `json:"requestsCPU"` RequestsMemory int64 `json:"requestsMemory"` RequestsStorage int64 `json:"requestsStorage"` LimitsStorage int64 `json:"limitsStorage"` RequestsStorageEphemeral int64 `json:"requestsStorageEphemeral"` LimitsStorageEphemeral int64 `json:"limitsStorageEphemeral"` }
type SecurityContext ¶
type SecurityContext struct { Capabilities *Capabilities `json:"capabilities,omitempty"` Privileged *bool `json:"privileged,omitempty"` RunAsUser *int64 `json:"runAsUser,omitempty"` RunAsGroup *int64 `json:"runAsGroup,omitempty"` RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"` ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"` }
type Set ¶
type Set[I Object] []I
Set is a set like structure based on the EqualTo methods of the given objects
type StatefulSetSpec ¶
type StatefulSetSpec struct { Replicas *int32 `json:"replicas"` Template *PodTemplate `json:"template"` ServiceName string `json:"serviceName"` UpdateStrategy string `json:"updateStrategy"` }
type StatefulSetStatus ¶
type Storage ¶
type Storage struct { StorageClasses StorageClasses `json:"storageClasses"` PersistentVolumes PersistentVolumes `json:"persistentVolumes"` }
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) AddPersistentVolume ¶
func (s *Storage) AddPersistentVolume(pv *PersistentVolume)
func (*Storage) AddStorageClass ¶
func (s *Storage) AddStorageClass(sc *StorageClass)
func (*Storage) DeletePersistentVolume ¶
func (s *Storage) DeletePersistentVolume(pv *PersistentVolume)
func (*Storage) DeleteStorageClass ¶
func (s *Storage) DeleteStorageClass(sc *StorageClass)
type StorageClass ¶
type StorageClass struct { PartialObject Provisioner string `json:"provisioner"` }
func NewStorageClass ¶
func NewStorageClass() *StorageClass
type StorageClasses ¶
type StorageClasses = Set[*StorageClass]
type TypeMeta ¶
type TypeMeta struct { Kind string `json:"kind"` APIGroup string `json:"apiGroup"` ResourceType string `json:"resourceType"` APIVersion string `json:"apiVersion"` }
func (*TypeMeta) GetAPIGroup ¶
func (*TypeMeta) GetAPIVersion ¶
func (*TypeMeta) GetResourceType ¶
func (*TypeMeta) SetFromTypeMeta ¶ added in v0.5.1
type Velero ¶
type Velero struct { Schedules VeleroSchedules `json:"schedules"` Backups VeleroBackups `json:"backups"` }
func (*Velero) AddBackup ¶
func (v *Velero) AddBackup(b *VeleroBackup)
func (*Velero) AddSchedule ¶
func (v *Velero) AddSchedule(s *VeleroSchedule)
func (*Velero) DeleteBackup ¶
func (v *Velero) DeleteBackup(b *VeleroBackup)
func (*Velero) DeleteSchedule ¶
func (v *Velero) DeleteSchedule(s *VeleroSchedule)
type VeleroBackup ¶
type VeleroBackup struct { PartialObject Spec VeleroBackupSpec `json:"spec"` Status VeleroBackupStatus `json:"status"` }
func NewVeleroBackup ¶
func NewVeleroBackup() *VeleroBackup
type VeleroBackupSpec ¶
type VeleroBackupStatus ¶
type VeleroBackupStatus struct { StartTimestamp *metav1.Time `json:"startTimestamp"` CompletionTimestamp *metav1.Time `json:"completionTimestamp"` Expiration *metav1.Time `json:"expiration"` Phase string `json:"phase"` ItemsBackedUp int `json:"itemsBackedUp"` TotalItems int `json:"totalItems"` Warnings int `json:"warnings"` Errors int `json:"errors"` Version int `json:"version"` }
type VeleroBackups ¶
type VeleroBackups = Set[*VeleroBackup]
type VeleroSchedule ¶
type VeleroSchedule struct { PartialObject Spec VeleroScheduleSpec `json:"spec"` Status VeleroScheduleStatus `json:"status"` }
func NewVeleroSchedule ¶
func NewVeleroSchedule() *VeleroSchedule
type VeleroScheduleSpec ¶
type VeleroScheduleStatus ¶
type VeleroSchedules ¶
type VeleroSchedules = Set[*VeleroSchedule]
type VolumeMount ¶
type Workload ¶
type Workload struct { PartialObject Spec Spec `json:"spec"` Status Status `json:"status"` RootOwner *RootOwner `json:"rootOwner,omitempty"` }
func NewCronJob ¶
func NewCronJob() *Workload
func NewDaemonSet ¶
func NewDaemonSet() *Workload
func NewDeployment ¶
func NewDeployment() *Workload
func NewReplicaSet ¶
func NewReplicaSet() *Workload
func NewStatefulSet ¶
func NewStatefulSet() *Workload
Source Files ¶
- calico.go
- cluster.go
- common.go
- container.go
- cron_job.go
- custom_resources.go
- daemon_set.go
- deployment.go
- inventory.go
- job.go
- kci_rocks.go
- meta.go
- namespace.go
- network_policy.go
- node.go
- persistent_volume.go
- pod.go
- rabbitmq.go
- replica_set.go
- stateful_set.go
- storage.go
- storage_class.go
- velero.go
- workloads.go
Click to show internal directories.
Click to hide internal directories.