Documentation
¶
Index ¶
Constants ¶
const ( NameLabel = "app.kubernetes.io/name" InstanceLabel = "app.kubernetes.io/instance" VersionLabel = "app.kubernetes.io/version" ComponentLabel = "app.kubernetes.io/component" ManagedByLabel = "app.kubernetes.io/managed-by" BanzaiCloudManagedComponent = "banzaicloud.io/managed-component" BanzaiCloudOwnedBy = "banzaicloud.io/owned-by" BanzaiCloudRelatedTo = "banzaicloud.io/related-to" BanzaiCloudDesiredStateCreated = "banzaicloud.io/desired-state-created" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerBase ¶
type ContainerBase struct {
Name string `json:"name,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
Image string `json:"image,omitempty"`
PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"`
Command []string `json:"command,omitempty"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" `
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
}
Deprecated Consider using Container in the typeoverrides package combined with the merge package
func (*ContainerBase) DeepCopy ¶
func (in *ContainerBase) DeepCopy() *ContainerBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerBase.
func (*ContainerBase) DeepCopyInto ¶
func (in *ContainerBase) DeepCopyInto(out *ContainerBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DaemonSetBase ¶
type DaemonSetBase struct {
*MetaBase `json:",inline"`
Spec *DaemonSetSpecBase `json:"spec,omitempty"`
}
Deprecated Consider using DaemonSet in the typeoverrides package combined with the merge package
func (*DaemonSetBase) DeepCopy ¶
func (in *DaemonSetBase) DeepCopy() *DaemonSetBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetBase.
func (*DaemonSetBase) DeepCopyInto ¶
func (in *DaemonSetBase) DeepCopyInto(out *DaemonSetBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DaemonSetSpecBase ¶
type DaemonSetSpecBase struct {
Selector *metav1.LabelSelector `json:"selector,omitempty"`
UpdateStrategy *appsv1.DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"`
MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`
Template *PodTemplateBase `json:"template,omitempty"`
}
Deprecated Consider using DaemonSetSpec in the typeoverrides package combined with the merge package
func (*DaemonSetSpecBase) DeepCopy ¶
func (in *DaemonSetSpecBase) DeepCopy() *DaemonSetSpecBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetSpecBase.
func (*DaemonSetSpecBase) DeepCopyInto ¶
func (in *DaemonSetSpecBase) DeepCopyInto(out *DaemonSetSpecBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DaemonSetSpecBase) Override ¶
func (base *DaemonSetSpecBase) Override(spec appsv1.DaemonSetSpec) appsv1.DaemonSetSpec
type DeploymentBase ¶
type DeploymentBase struct {
*MetaBase `json:",inline"`
Spec *DeploymentSpecBase `json:"spec,omitempty"`
}
Deprecated Consider using Deployment in the typeoverrides package combined with the merge package
func (*DeploymentBase) DeepCopy ¶
func (in *DeploymentBase) DeepCopy() *DeploymentBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentBase.
func (*DeploymentBase) DeepCopyInto ¶
func (in *DeploymentBase) DeepCopyInto(out *DeploymentBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeploymentBase) Override ¶
func (base *DeploymentBase) Override(deployment appsv1.Deployment) appsv1.Deployment
type DeploymentSpecBase ¶
type DeploymentSpecBase struct {
Replicas *int32 `json:"replicas,omitempty"`
Selector *metav1.LabelSelector `json:"selector,omitempty"`
Strategy *appsv1.DeploymentStrategy `json:"strategy,omitempty"`
Template *PodTemplateBase `json:"template,omitempty"`
}
Deprecated Consider using DeploymentSpec in the typeoverrides package combined with the merge package
func (*DeploymentSpecBase) DeepCopy ¶
func (in *DeploymentSpecBase) DeepCopy() *DeploymentSpecBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpecBase.
func (*DeploymentSpecBase) DeepCopyInto ¶
func (in *DeploymentSpecBase) DeepCopyInto(out *DeploymentSpecBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DeploymentSpecBase) Override ¶
func (base *DeploymentSpecBase) Override(spec appsv1.DeploymentSpec) appsv1.DeploymentSpec
type EnabledComponent ¶
type EnabledComponent struct {
Enabled *bool `json:"enabled,omitempty"`
}
EnabledComponent implements the "enabled component" pattern Embed this type into other component types to avoid unnecessary code duplication NOTE: Don't forget to annotate the embedded field with `json:",inline"` tag for controller-gen
func (*EnabledComponent) DeepCopy ¶
func (in *EnabledComponent) DeepCopy() *EnabledComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnabledComponent.
func (*EnabledComponent) DeepCopyInto ¶
func (in *EnabledComponent) DeepCopyInto(out *EnabledComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (EnabledComponent) IsDisabled ¶
func (ec EnabledComponent) IsDisabled() bool
IsDisabled returns true iff the component is explicitly disabled
func (EnabledComponent) IsEnabled ¶
func (ec EnabledComponent) IsEnabled() bool
IsEnabled returns true iff the component is explicitly enabled
func (EnabledComponent) IsSkipped ¶
func (ec EnabledComponent) IsSkipped() bool
IsSkipped returns true iff the component is neither enabled nor disabled explicitly
type MetaBase ¶
type MetaBase struct {
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
Deprecated Consider using ObjectMeta in the typeoverrides package combined with the merge package
func (*MetaBase) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaBase.
func (*MetaBase) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetaBase) Merge ¶
func (base *MetaBase) Merge(meta metav1.ObjectMeta) metav1.ObjectMeta
type PodSpecBase ¶
type PodSpecBase struct {
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
PriorityClassName string `json:"priorityClassName,omitempty"`
Containers []ContainerBase `json:"containers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
InitContainers []ContainerBase `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}
Deprecated Consider using PodSpec in the typeoverrides package combined with the merge package
func (*PodSpecBase) DeepCopy ¶
func (in *PodSpecBase) DeepCopy() *PodSpecBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpecBase.
func (*PodSpecBase) DeepCopyInto ¶
func (in *PodSpecBase) DeepCopyInto(out *PodSpecBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodTemplateBase ¶
type PodTemplateBase struct {
Metadata *MetaBase `json:"metadata,omitempty"`
PodSpec *PodSpecBase `json:"spec,omitempty"`
}
Deprecated Consider using PodTemplateSpec in the typeoverrides package combined with the merge package
func (*PodTemplateBase) DeepCopy ¶
func (in *PodTemplateBase) DeepCopy() *PodTemplateBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTemplateBase.
func (*PodTemplateBase) DeepCopyInto ¶
func (in *PodTemplateBase) DeepCopyInto(out *PodTemplateBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodTemplateBase) Override ¶
func (base *PodTemplateBase) Override(template corev1.PodTemplateSpec) corev1.PodTemplateSpec
type ReconcileStatus ¶
type ReconcileStatus string
const ( // Used for components and for aggregated status ReconcileStatusFailed ReconcileStatus = "Failed" // Used for components and for aggregated status ReconcileStatusReconciling ReconcileStatus = "Reconciling" // Used for components ReconcileStatusAvailable ReconcileStatus = "Available" ReconcileStatusUnmanaged ReconcileStatus = "Unmanaged" ReconcileStatusRemoved ReconcileStatus = "Removed" // Used for aggregated status if all the components are stableized (Available, Unmanaged or Removed) ReconcileStatusSucceeded ReconcileStatus = "Succeeded" // Used to trigger reconciliation for a resource that otherwise ignores status changes, but listens to the Pending state // See PendingStatusPredicate in pkg/reconciler ReconcileStatusPending ReconcileStatus = "Pending" )
func AggregatedState ¶
func AggregatedState(componentStatuses []ReconcileStatus) ReconcileStatus
Computes an aggregated state based on component statuses
func (ReconcileStatus) Available ¶
func (s ReconcileStatus) Available() bool
func (ReconcileStatus) Failed ¶
func (s ReconcileStatus) Failed() bool
func (ReconcileStatus) Pending ¶
func (s ReconcileStatus) Pending() bool
func (ReconcileStatus) Stable ¶
func (s ReconcileStatus) Stable() bool
type StatefulSetBase ¶
type StatefulSetBase struct {
*MetaBase `json:",inline"`
Spec *StatefulsetSpecBase `json:"spec,omitempty"`
}
Deprecated Consider using StatefulSet in the typeoverrides package combined with the merge package
func (*StatefulSetBase) DeepCopy ¶
func (in *StatefulSetBase) DeepCopy() *StatefulSetBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetBase.
func (*StatefulSetBase) DeepCopyInto ¶
func (in *StatefulSetBase) DeepCopyInto(out *StatefulSetBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StatefulSetBase) Override ¶
func (base *StatefulSetBase) Override(statefulSet appsv1.StatefulSet) appsv1.StatefulSet
type StatefulsetSpecBase ¶
type StatefulsetSpecBase struct {
Replicas *int32 `json:"replicas,omitempty"`
Selector *metav1.LabelSelector `json:"selector,omitempty"`
PodManagementPolicy appsv1.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
UpdateStrategy *appsv1.StatefulSetUpdateStrategy `json:"updateStrategy,omitempty"`
Template *PodTemplateBase `json:"template,omitempty"`
}
Deprecated Consider using StatefulSetSpec in the typeoverrides package combined with the merge package
func (*StatefulsetSpecBase) DeepCopy ¶
func (in *StatefulsetSpecBase) DeepCopy() *StatefulsetSpecBase
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulsetSpecBase.
func (*StatefulsetSpecBase) DeepCopyInto ¶
func (in *StatefulsetSpecBase) DeepCopyInto(out *StatefulsetSpecBase)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StatefulsetSpecBase) Override ¶
func (base *StatefulsetSpecBase) Override(spec appsv1.StatefulSetSpec) appsv1.StatefulSetSpec