Merge pull request #47557 from janetkuo/hash-label-rename

Automatic merge from submit-queue (batch tested with PRs 46884, 47557)

Rename DaemonSet and StatefulSet hash label

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47554

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @kow3ns 
/cc @bgrant0607 
@kubernetes/sig-apps-api-reviews
pull/6/head
Kubernetes Submit Queue 2017-06-16 11:34:01 -07:00 committed by GitHub
commit 464831e240
10 changed files with 14 additions and 18 deletions

View File

@ -25,8 +25,9 @@ import (
const ( const (
// StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored. // StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored.
StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized" StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
StatefulSetRevisionLabel = "statefulset.beta.kubernetes.io/revision" ControllerRevisionHashLabelKey = "controller-revision-hash"
StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
) )
// ScaleSpec describes the attributes of a scale subresource // ScaleSpec describes the attributes of a scale subresource

View File

@ -537,11 +537,6 @@ const (
// to daemon set pods to distinguish between old and new pod templates // to daemon set pods to distinguish between old and new pod templates
// during DaemonSet template update. // during DaemonSet template update.
DaemonSetTemplateGenerationKey string = "pod-template-generation" DaemonSetTemplateGenerationKey string = "pod-template-generation"
// DefaultDaemonSetUniqueLabelKey is the default label key that is added
// to existing DaemonSet pods to distinguish between old and new
// DaemonSet pods during DaemonSet template updates.
DefaultDaemonSetUniqueLabelKey string = "daemonset-controller-hash"
) )
// DaemonSetList is a collection of daemon sets. // DaemonSetList is a collection of daemon sets.

View File

@ -27,6 +27,7 @@ go_library(
deps = [ deps = [
"//pkg/api:go_default_library", "//pkg/api:go_default_library",
"//pkg/api/v1:go_default_library", "//pkg/api/v1:go_default_library",
"//pkg/apis/apps/v1beta1:go_default_library",
"//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions:go_default_library",
"//pkg/apis/networking:go_default_library", "//pkg/apis/networking:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library", "//vendor/github.com/gogo/protobuf/proto:go_default_library",

View File

@ -21,6 +21,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/v1"
appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
) )
// describes the attributes of a scale subresource // describes the attributes of a scale subresource
@ -544,7 +545,7 @@ const (
// DefaultDaemonSetUniqueLabelKey is the default label key that is added // DefaultDaemonSetUniqueLabelKey is the default label key that is added
// to existing DaemonSet pods to distinguish between old and new // to existing DaemonSet pods to distinguish between old and new
// DaemonSet pods during DaemonSet template updates. // DaemonSet pods during DaemonSet template updates.
DefaultDaemonSetUniqueLabelKey string = "daemonset-controller-hash" DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
) )
// DaemonSetList is a collection of daemon sets. // DaemonSetList is a collection of daemon sets.

View File

@ -45,7 +45,7 @@ go_test(
deps = [ deps = [
"//pkg/api/testapi:go_default_library", "//pkg/api/testapi:go_default_library",
"//pkg/api/v1:go_default_library", "//pkg/api/v1:go_default_library",
"//pkg/apis/extensions:go_default_library", "//pkg/apis/extensions/v1beta1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
], ],
) )

View File

@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/testapi"
"k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/apis/extensions" extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
) )
func newPod(podName string, nodeName string, label map[string]string) *v1.Pod { func newPod(podName string, nodeName string, label map[string]string) *v1.Pod {

View File

@ -25,8 +25,9 @@ import (
const ( const (
// StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored. // StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored.
StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized" StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
StatefulSetRevisionLabel = "statefulset.beta.kubernetes.io/revision" ControllerRevisionHashLabelKey = "controller-revision-hash"
StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
) )
// ScaleSpec describes the attributes of a scale subresource // ScaleSpec describes the attributes of a scale subresource

View File

@ -537,11 +537,6 @@ const (
// to daemon set pods to distinguish between old and new pod templates // to daemon set pods to distinguish between old and new pod templates
// during DaemonSet template update. // during DaemonSet template update.
DaemonSetTemplateGenerationKey string = "pod-template-generation" DaemonSetTemplateGenerationKey string = "pod-template-generation"
// DefaultDaemonSetUniqueLabelKey is the default label key that is added
// to existing DaemonSet pods to distinguish between old and new
// DaemonSet pods during DaemonSet template updates.
DefaultDaemonSetUniqueLabelKey string = "daemonset-controller-hash"
) )
// DaemonSetList is a collection of daemon sets. // DaemonSetList is a collection of daemon sets.

View File

@ -36,6 +36,7 @@ go_library(
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
"//vendor/k8s.io/client-go/pkg/api:go_default_library", "//vendor/k8s.io/client-go/pkg/api:go_default_library",
"//vendor/k8s.io/client-go/pkg/api/v1:go_default_library", "//vendor/k8s.io/client-go/pkg/api/v1:go_default_library",
"//vendor/k8s.io/client-go/pkg/apis/apps/v1beta1:go_default_library",
"//vendor/k8s.io/client-go/pkg/apis/extensions:go_default_library", "//vendor/k8s.io/client-go/pkg/apis/extensions:go_default_library",
"//vendor/k8s.io/client-go/pkg/apis/networking:go_default_library", "//vendor/k8s.io/client-go/pkg/apis/networking:go_default_library",
], ],

View File

@ -21,6 +21,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/pkg/api/v1" "k8s.io/client-go/pkg/api/v1"
appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
) )
// describes the attributes of a scale subresource // describes the attributes of a scale subresource
@ -544,7 +545,7 @@ const (
// DefaultDaemonSetUniqueLabelKey is the default label key that is added // DefaultDaemonSetUniqueLabelKey is the default label key that is added
// to existing DaemonSet pods to distinguish between old and new // to existing DaemonSet pods to distinguish between old and new
// DaemonSet pods during DaemonSet template updates. // DaemonSet pods during DaemonSet template updates.
DefaultDaemonSetUniqueLabelKey string = "daemonset-controller-hash" DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
) )
// DaemonSetList is a collection of daemon sets. // DaemonSetList is a collection of daemon sets.