deployment

package
v1.31.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 46

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeployment

func CreateDeployment(ctx context.Context, client clientset.Interface, replicas int32, podLabels map[string]string, nodeSelector map[string]string, namespace string, pvclaims []*v1.PersistentVolumeClaim, securityLevel admissionapi.Level, command string) (*appsv1.Deployment, error)

CreateDeployment creates a deployment.

func GetPodsForDeployment

func GetPodsForDeployment(ctx context.Context, client clientset.Interface, deployment *appsv1.Deployment) (*v1.PodList, error)

GetPodsForDeployment gets pods for the given deployment

func NewDeployment

func NewDeployment(deploymentName string, replicas int32, podLabels map[string]string, containerName, image string, strategyType appsv1.DeploymentStrategyType) *appsv1.Deployment

NewDeployment returns a deployment spec with the specified argument.

func UpdateDeploymentWithRetries

func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string, applyUpdate testutils.UpdateDeploymentFunc) (*appsv1.Deployment, error)

UpdateDeploymentWithRetries updates the specified deployment with retries.

func WaitForDeploymentComplete

func WaitForDeploymentComplete(c clientset.Interface, d *appsv1.Deployment) error

WaitForDeploymentComplete waits for the deployment to complete, and don't check if rolling update strategy is broken. Rolling update strategy is used only during a rolling update, and can be violated in other situations, such as shortly after a scaling event or the deployment is just created.

func WaitForDeploymentRevisionAndImage

func WaitForDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName string, revision, image string) error

WaitForDeploymentRevisionAndImage waits for the deployment's and its new RS's revision and container image to match the given revision and image. Note that deployment revision and its new RS revision should be updated shortly most of the time, but an overwhelmed RS controller may result in taking longer to relabel a RS.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL