Skip to content

Commit

Permalink
change statefulset pod index label name
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvegamyhre committed Jul 16, 2023
1 parent 40058b0 commit f852967
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/statefulset/stateful_set_control_test.go
Expand Up @@ -38,7 +38,6 @@ import (
"k8s.io/apimachinery/pkg/types"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apiserver/pkg/util/feature"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/client-go/informers"
appsinformers "k8s.io/client-go/informers/apps/v1"
Expand Down Expand Up @@ -229,7 +228,7 @@ func CreatesPods(t *testing.T, set *apps.StatefulSet, invariants invariantFunc)
t.Error("Failed to set UpdatedReplicas correctly")
}
// Check all pods have correct pod index label.
if feature.DefaultFeatureGate.Enabled(features.PodIndexLabel) {
if utilfeature.DefaultFeatureGate.Enabled(features.PodIndexLabel) {
selector, err := metav1.LabelSelectorAsSelector(set.Spec.Selector)
if err != nil {
t.Error(err)
Expand Down
4 changes: 2 additions & 2 deletions staging/src/k8s.io/api/apps/v1/types.go
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package v1

import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
Expand All @@ -29,7 +29,7 @@ const (
DeprecatedRollbackTo = "deprecated.deployment.rollback.to"
DeprecatedTemplateGeneration = "deprecated.daemonset.template.generation"
StatefulSetPodNameLabel = "statefulset.kubernetes.io/pod-name"
StatefulSetPodIndexLabel = "statefulset.kubernetes.io/pod-index"
StatefulSetPodIndexLabel = "apps.kubernetes.io/pod-index"
)

// +genclient
Expand Down

0 comments on commit f852967

Please sign in to comment.