mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Fix references to PetSet
This commit is contained in:
@@ -78,15 +78,15 @@ func ReplicaSetHasDesiredReplicas(rsClient extensionsclient.ReplicaSetsGetter, r
|
||||
}
|
||||
}
|
||||
|
||||
// StatefulSetHasDesiredPets returns a conditon that checks the number of petset replicas
|
||||
func StatefulSetHasDesiredPets(psClient appsclient.StatefulSetsGetter, petset *apps.StatefulSet) wait.ConditionFunc {
|
||||
// TODO: Differentiate between 0 pets and a really quick scale down using generation.
|
||||
// StatefulSetHasDesiredReplicas returns a conditon that checks the number of statefulset replicas
|
||||
func StatefulSetHasDesiredReplicas(ssClient appsclient.StatefulSetsGetter, ss *apps.StatefulSet) wait.ConditionFunc {
|
||||
// TODO: Differentiate between 0 statefulset pods and a really quick scale down using generation.
|
||||
return func() (bool, error) {
|
||||
ps, err := psClient.StatefulSets(petset.Namespace).Get(petset.Name, metav1.GetOptions{})
|
||||
ss, err := ssClient.StatefulSets(ss.Namespace).Get(ss.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return ps.Status.Replicas == ps.Spec.Replicas, nil
|
||||
return ss.Status.Replicas == ss.Spec.Replicas, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user