Documentation ¶
Index ¶
- func GetName(instanceName string, suffix ...string) string
- type Deployment
- func (d *Deployment) AddContainer(add container.Container)
- func (d *Deployment) AddInitContainer(add container.Container)
- func (d *Deployment) AppendConfigMapVolumeIfMissing(name, localObjReferenceName string)
- func (d *Deployment) AppendEmptyDirVolumeIfMissing(name string, storageMedium corev1.StorageMedium)
- func (d *Deployment) AppendHostPathVolumeIfMissing(name, hostPath string, hostPathType corev1.HostPathType)
- func (d *Deployment) AppendPVCVolumeIfMissing(name, claimName string)
- func (d *Deployment) AppendPullSecret(imagePullSecret corev1.LocalObjectReference)
- func (d *Deployment) AppendSecretVolumeIfMissing(name, secretName string)
- func (d *Deployment) AppendVolumeIfMissing(volume corev1.Volume)
- func (d *Deployment) ContainerExists(name string) bool
- func (d *Deployment) ContainerNames() []string
- func (d *Deployment) GetContainer(name string) (cont container.Container, err error)
- func (d *Deployment) GetContainers() map[string]container.Container
- func (d *Deployment) MustGetContainer(name string) container.Container
- func (d *Deployment) RemoveContainer(name string)
- func (d *Deployment) SetAffinity(affinity *corev1.Affinity)
- func (d *Deployment) SetImagePullSecrets(pullSecrets []string)
- func (d *Deployment) SetReplicas(replicas *int32)
- func (d *Deployment) SetServiceAccountName(name string)
- func (d *Deployment) SetStrategy(strategyType appsv1.DeploymentStrategyType)
- func (d *Deployment) UpdateContainer(update container.Container)
- func (d *Deployment) UpdateInitContainer(update container.Container)
- func (d *Deployment) UpdateSecurityContextForAllContainers(sc container.SecurityContext)
- type Manager
- func (m *Manager) BasedOnCR(instance v1.Object, deployment *appsv1.Deployment) (*appsv1.Deployment, error)
- func (m *Manager) CheckForSecretChange(instance v1.Object, secretName string, ...) error
- func (m *Manager) CheckState(instance v1.Object) error
- func (m *Manager) Delete(instance v1.Object) error
- func (m *Manager) DeploymentIsUpToDate(instance v1.Object) bool
- func (m *Manager) DeploymentStatus(instance v1.Object) (appsv1.DeploymentStatus, error)
- func (m *Manager) Exists(instance v1.Object) bool
- func (m *Manager) Get(instance v1.Object) (client.Object, error)
- func (m *Manager) GetDeploymentBasedOnCRFromFile(instance v1.Object) (*appsv1.Deployment, error)
- func (m *Manager) GetName(instance v1.Object) string
- func (m *Manager) GetScheme() *runtime.Scheme
- func (m *Manager) Reconcile(instance v1.Object, update bool) error
- func (m *Manager) RestoreState(instance v1.Object) error
- func (m *Manager) SetCustomName(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deployment ¶
type Deployment struct {
*v1.Deployment
}
func New ¶
func New(deployment *v1.Deployment) *Deployment
func (*Deployment) AddContainer ¶
func (d *Deployment) AddContainer(add container.Container)
func (*Deployment) AddInitContainer ¶
func (d *Deployment) AddInitContainer(add container.Container)
func (*Deployment) AppendConfigMapVolumeIfMissing ¶
func (d *Deployment) AppendConfigMapVolumeIfMissing(name, localObjReferenceName string)
func (*Deployment) AppendEmptyDirVolumeIfMissing ¶
func (d *Deployment) AppendEmptyDirVolumeIfMissing(name string, storageMedium corev1.StorageMedium)
func (*Deployment) AppendHostPathVolumeIfMissing ¶
func (d *Deployment) AppendHostPathVolumeIfMissing(name, hostPath string, hostPathType corev1.HostPathType)
func (*Deployment) AppendPVCVolumeIfMissing ¶
func (d *Deployment) AppendPVCVolumeIfMissing(name, claimName string)
func (*Deployment) AppendPullSecret ¶
func (d *Deployment) AppendPullSecret(imagePullSecret corev1.LocalObjectReference)
func (*Deployment) AppendSecretVolumeIfMissing ¶
func (d *Deployment) AppendSecretVolumeIfMissing(name, secretName string)
func (*Deployment) AppendVolumeIfMissing ¶
func (d *Deployment) AppendVolumeIfMissing(volume corev1.Volume)
func (*Deployment) ContainerExists ¶
func (d *Deployment) ContainerExists(name string) bool
func (*Deployment) ContainerNames ¶
func (d *Deployment) ContainerNames() []string
func (*Deployment) GetContainer ¶
func (d *Deployment) GetContainer(name string) (cont container.Container, err error)
func (*Deployment) GetContainers ¶
func (d *Deployment) GetContainers() map[string]container.Container
func (*Deployment) MustGetContainer ¶
func (d *Deployment) MustGetContainer(name string) container.Container
func (*Deployment) RemoveContainer ¶
func (d *Deployment) RemoveContainer(name string)
func (*Deployment) SetAffinity ¶
func (d *Deployment) SetAffinity(affinity *corev1.Affinity)
func (*Deployment) SetImagePullSecrets ¶
func (d *Deployment) SetImagePullSecrets(pullSecrets []string)
func (*Deployment) SetReplicas ¶
func (d *Deployment) SetReplicas(replicas *int32)
func (*Deployment) SetServiceAccountName ¶
func (d *Deployment) SetServiceAccountName(name string)
func (*Deployment) SetStrategy ¶
func (d *Deployment) SetStrategy(strategyType appsv1.DeploymentStrategyType)
func (*Deployment) UpdateContainer ¶
func (d *Deployment) UpdateContainer(update container.Container)
func (*Deployment) UpdateInitContainer ¶
func (d *Deployment) UpdateInitContainer(update container.Container)
func (*Deployment) UpdateSecurityContextForAllContainers ¶
func (d *Deployment) UpdateSecurityContextForAllContainers(sc container.SecurityContext)
UpdateSecurityContextForAllContainers updates the security context for all containers defined in the deployment
type Manager ¶
type Manager struct { Client k8sclient.Client Scheme *runtime.Scheme DeploymentFile string IgnoreDifferences []string Name string LabelsFunc func(v1.Object) map[string]string OverrideFunc func(v1.Object, *appsv1.Deployment, resources.Action) error }
func (*Manager) BasedOnCR ¶
func (m *Manager) BasedOnCR(instance v1.Object, deployment *appsv1.Deployment) (*appsv1.Deployment, error)
func (*Manager) CheckForSecretChange ¶
func (*Manager) DeploymentIsUpToDate ¶
func (*Manager) DeploymentStatus ¶
func (*Manager) GetDeploymentBasedOnCRFromFile ¶
func (*Manager) SetCustomName ¶
Click to show internal directories.
Click to hide internal directories.