mirror of
https://github.com/helm/helm.git
synced 2026-08-08 09:01:25 +00:00
Merge pull request #3407 from paolomainardi/feature/3173_fix_wait_for_deployments
refs #3173: add appsv1beta1 and appsv1beta2 apiVersion
This commit is contained in:
@@ -88,6 +88,36 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
|
||||
currentDeployment,
|
||||
}
|
||||
deployments = append(deployments, newDeployment)
|
||||
case *appsv1beta1.Deployment:
|
||||
currentDeployment, err := kcs.ExtensionsV1beta1().Deployments(value.Namespace).Get(value.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
// Find RS associated with deployment
|
||||
newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.ExtensionsV1beta1())
|
||||
if err != nil || newReplicaSet == nil {
|
||||
return false, err
|
||||
}
|
||||
newDeployment := deployment{
|
||||
newReplicaSet,
|
||||
currentDeployment,
|
||||
}
|
||||
deployments = append(deployments, newDeployment)
|
||||
case *appsv1beta2.Deployment:
|
||||
currentDeployment, err := kcs.ExtensionsV1beta1().Deployments(value.Namespace).Get(value.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
// Find RS associated with deployment
|
||||
newReplicaSet, err := deploymentutil.GetNewReplicaSet(currentDeployment, kcs.ExtensionsV1beta1())
|
||||
if err != nil || newReplicaSet == nil {
|
||||
return false, err
|
||||
}
|
||||
newDeployment := deployment{
|
||||
newReplicaSet,
|
||||
currentDeployment,
|
||||
}
|
||||
deployments = append(deployments, newDeployment)
|
||||
case *extensions.Deployment:
|
||||
currentDeployment, err := kcs.ExtensionsV1beta1().Deployments(value.Namespace).Get(value.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
@@ -109,6 +139,18 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
|
||||
return false, err
|
||||
}
|
||||
pods = append(pods, list...)
|
||||
case *appsv1.DaemonSet:
|
||||
list, err := getPods(kcs, value.Namespace, value.Spec.Selector.MatchLabels)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
pods = append(pods, list...)
|
||||
case *appsv1beta2.DaemonSet:
|
||||
list, err := getPods(kcs, value.Namespace, value.Spec.Selector.MatchLabels)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
pods = append(pods, list...)
|
||||
case *appsv1.StatefulSet:
|
||||
list, err := getPods(kcs, value.Namespace, value.Spec.Selector.MatchLabels)
|
||||
if err != nil {
|
||||
@@ -133,6 +175,18 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
|
||||
return false, err
|
||||
}
|
||||
pods = append(pods, list...)
|
||||
case *appsv1beta2.ReplicaSet:
|
||||
list, err := getPods(kcs, value.Namespace, value.Spec.Selector.MatchLabels)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
pods = append(pods, list...)
|
||||
case *appsv1.ReplicaSet:
|
||||
list, err := getPods(kcs, value.Namespace, value.Spec.Selector.MatchLabels)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
pods = append(pods, list...)
|
||||
case *v1.PersistentVolumeClaim:
|
||||
claim, err := kcs.CoreV1().PersistentVolumeClaims(value.Namespace).Get(value.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user