Documentation ¶
Index ¶
- func CheckDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName, revision, image string) error
- func CreateDeployment(client clientset.Interface, replicas int32, podLabels map[string]string, ...) (*apps.Deployment, error)
- func GetPodsForDeployment(client clientset.Interface, deployment *apps.Deployment) (*v1.PodList, error)
- func NewDeployment(deploymentName string, replicas int32, podLabels map[string]string, ...) *apps.Deployment
- func RunDeployment(config testutils.DeploymentConfig) error
- func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string, ...) (*apps.Deployment, error)
- func WaitForDeploymentComplete(c clientset.Interface, d *apps.Deployment) error
- func WaitForDeploymentCompleteAndCheckRolling(c clientset.Interface, d *apps.Deployment) error
- func WaitForDeploymentOldRSsNum(c clientset.Interface, ns, deploymentName string, desiredRSNum int) error
- func WaitForDeploymentRevision(c clientset.Interface, d *apps.Deployment, targetRevision string) error
- func WaitForDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName string, revision, image string) error
- func WaitForDeploymentRollbackCleared(c clientset.Interface, ns, deploymentName string) error
- func WaitForDeploymentUpdatedReplicasGTE(c clientset.Interface, ns, deploymentName string, minUpdatedReplicas int32, ...) error
- func WaitForDeploymentWithCondition(c clientset.Interface, ns, deploymentName, reason string, ...) error
- func WaitForObservedDeployment(c clientset.Interface, ns, deploymentName string, desiredGeneration int64) error
- func WatchRecreateDeployment(c clientset.Interface, d *apps.Deployment) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDeploymentRevisionAndImage ¶
func CheckDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName, revision, image string) error
CheckDeploymentRevisionAndImage checks if the input deployment's and its new replica set's revision and image are as expected.
func CreateDeployment ¶
func CreateDeployment(client clientset.Interface, replicas int32, podLabels map[string]string, nodeSelector map[string]string, namespace string, pvclaims []*v1.PersistentVolumeClaim, command string) (*apps.Deployment, error)
CreateDeployment creates a deployment.
func GetPodsForDeployment ¶
func GetPodsForDeployment(client clientset.Interface, deployment *apps.Deployment) (*v1.PodList, error)
GetPodsForDeployment gets pods for the given deployment
func NewDeployment ¶
func NewDeployment(deploymentName string, replicas int32, podLabels map[string]string, imageName, image string, strategyType apps.DeploymentStrategyType) *apps.Deployment
NewDeployment returns a deployment spec with the specified argument.
func RunDeployment ¶
func RunDeployment(config testutils.DeploymentConfig) error
RunDeployment runs a delopyment with the specified config.
func UpdateDeploymentWithRetries ¶
func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string, applyUpdate testutils.UpdateDeploymentFunc) (*apps.Deployment, error)
UpdateDeploymentWithRetries updates the specified deployment with retries.
func WaitForDeploymentComplete ¶
func WaitForDeploymentComplete(c clientset.Interface, d *apps.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 WaitForDeploymentCompleteAndCheckRolling ¶
func WaitForDeploymentCompleteAndCheckRolling(c clientset.Interface, d *apps.Deployment) error
WaitForDeploymentCompleteAndCheckRolling waits for the deployment to complete, and check rolling update strategy isn't broken at any times. Rolling update strategy should not be broken during a rolling update.
func WaitForDeploymentOldRSsNum ¶
func WaitForDeploymentOldRSsNum(c clientset.Interface, ns, deploymentName string, desiredRSNum int) error
WaitForDeploymentOldRSsNum waits for the deployment to clean up old rcs.
func WaitForDeploymentRevision ¶
func WaitForDeploymentRevision(c clientset.Interface, d *apps.Deployment, targetRevision string) error
WaitForDeploymentRevision waits for becoming the target revision of a delopyment.
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.
func WaitForDeploymentRollbackCleared ¶
WaitForDeploymentRollbackCleared waits for given deployment either started rolling back or doesn't need to rollback. Note that rollback should be cleared shortly, so we only wait for 1 minute here to fail early.
func WaitForDeploymentUpdatedReplicasGTE ¶
func WaitForDeploymentUpdatedReplicasGTE(c clientset.Interface, ns, deploymentName string, minUpdatedReplicas int32, desiredGeneration int64) error
WaitForDeploymentUpdatedReplicasGTE waits for given deployment to be observed by the controller and has at least a number of updatedReplicas
func WaitForDeploymentWithCondition ¶
func WaitForDeploymentWithCondition(c clientset.Interface, ns, deploymentName, reason string, condType apps.DeploymentConditionType) error
WaitForDeploymentWithCondition waits for the specified deployment condition.
func WaitForObservedDeployment ¶
func WaitForObservedDeployment(c clientset.Interface, ns, deploymentName string, desiredGeneration int64) error
WaitForObservedDeployment waits for the specified deployment generation.
func WatchRecreateDeployment ¶
func WatchRecreateDeployment(c clientset.Interface, d *apps.Deployment) error
WatchRecreateDeployment watches Recreate deployments and ensures no new pods will run at the same time with old pods.
Types ¶
This section is empty.