From 8a9c126eca0346600d8335b56d6a96886ce90430 Mon Sep 17 00:00:00 2001 From: Peter Schuurman Date: Fri, 14 Oct 2022 15:36:30 -0700 Subject: [PATCH] Small updates and comment fixes --- pkg/apis/apps/types.go | 4 ++-- pkg/controller/statefulset/stateful_set_control_test.go | 2 +- staging/src/k8s.io/api/apps/v1/types.go | 4 ++-- staging/src/k8s.io/api/apps/v1beta1/types.go | 4 ++-- staging/src/k8s.io/api/apps/v1beta2/types.go | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index 353ae5c4b0e..65f02004ead 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -148,8 +148,8 @@ type StatefulSetPersistentVolumeClaimRetentionPolicy struct { type StatefulSetOrdinals struct { // Start is the number representing the first index that is used to represent // replica ordinals. Defaults to 0. - // If set, replica ordinals will be numbered - // [.spec.ordinals.start, .spec.ordinals.start - .spec.replicas). + // If set, replica ordinals will be numbered in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). // +optional Start int32 } diff --git a/pkg/controller/statefulset/stateful_set_control_test.go b/pkg/controller/statefulset/stateful_set_control_test.go index d571d81d3fb..7235711728f 100644 --- a/pkg/controller/statefulset/stateful_set_control_test.go +++ b/pkg/controller/statefulset/stateful_set_control_test.go @@ -2696,7 +2696,7 @@ func checkClaimInvarients(set *apps.StatefulSet, pod *v1.Pod, claim *v1.Persiste return fmt.Errorf("claim %s does not have owner ref on condemned pod %s for scaledown delete", claim.Name, pod.Name) } if podInOrdinalRange(pod, set) && hasOwnerRef(claim, pod) { - return fmt.Errorf("claim %s has unexpected owner ref on condemned pod %s for scaledown delete. ordinal: %d, [%d,%d]", claim.Name, pod.Name, getOrdinal(pod), getStartOrdinal(set), getEndOrdinal(set)) + return fmt.Errorf("claim %s has unexpected owner ref on condemned pod %s for scaledown delete", claim.Name, pod.Name) } case policy.WhenScaled == delete && policy.WhenDeleted == delete: if !podInOrdinalRange(pod, set) { diff --git a/staging/src/k8s.io/api/apps/v1/types.go b/staging/src/k8s.io/api/apps/v1/types.go index f1239211ca5..4d1094d2502 100644 --- a/staging/src/k8s.io/api/apps/v1/types.go +++ b/staging/src/k8s.io/api/apps/v1/types.go @@ -168,8 +168,8 @@ type StatefulSetPersistentVolumeClaimRetentionPolicy struct { type StatefulSetOrdinals struct { // Start is the number representing the first index that is used to represent // replica ordinals. Defaults to 0. - // If set, replica ordinals will be numbered - // [.spec.ordinals.start, .spec.ordinals.start - .spec.replicas). + // If set, replica ordinals will be numbered in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). // +optional Start int32 `json:"start" protobuf:"varint,1,opt,name=start"` } diff --git a/staging/src/k8s.io/api/apps/v1beta1/types.go b/staging/src/k8s.io/api/apps/v1beta1/types.go index 814296720f1..83106e1df8b 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/types.go +++ b/staging/src/k8s.io/api/apps/v1beta1/types.go @@ -209,8 +209,8 @@ type StatefulSetPersistentVolumeClaimRetentionPolicy struct { type StatefulSetOrdinals struct { // Start is the number representing the first index that is used to represent // replica ordinals. Defaults to 0. - // If set, replica ordinals will be numbered - // [.spec.ordinals.start, .spec.ordinals.start - .spec.replicas). + // If set, replica ordinals will be numbered in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). // +optional Start int32 `json:"start" protobuf:"varint,1,opt,name=start"` } diff --git a/staging/src/k8s.io/api/apps/v1beta2/types.go b/staging/src/k8s.io/api/apps/v1beta2/types.go index fc84f7c9b4c..40a458052a2 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/types.go +++ b/staging/src/k8s.io/api/apps/v1beta2/types.go @@ -219,8 +219,8 @@ type StatefulSetPersistentVolumeClaimRetentionPolicy struct { type StatefulSetOrdinals struct { // Start is the number representing the first index that is used to represent // replica ordinals. Defaults to 0. - // If set, replica ordinals will be numbered - // [.spec.ordinals.start, .spec.ordinals.start - .spec.replicas). + // If set, replica ordinals will be numbered in the range: + // [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). // +optional Start int32 `json:"start" protobuf:"varint,1,opt,name=start"` }