mirror of https://github.com/k3s-io/k3s
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-reviewspull/6/head
commit
464831e240
|
@ -25,8 +25,9 @@ import (
|
|||
|
||||
const (
|
||||
// StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored.
|
||||
StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
|
||||
StatefulSetRevisionLabel = "statefulset.beta.kubernetes.io/revision"
|
||||
StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
|
||||
ControllerRevisionHashLabelKey = "controller-revision-hash"
|
||||
StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
|
||||
)
|
||||
|
||||
// ScaleSpec describes the attributes of a scale subresource
|
||||
|
|
|
@ -537,11 +537,6 @@ const (
|
|||
// to daemon set pods to distinguish between old and new pod templates
|
||||
// during DaemonSet template update.
|
||||
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.
|
||||
|
|
|
@ -27,6 +27,7 @@ go_library(
|
|||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/apps/v1beta1:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/apis/networking:go_default_library",
|
||||
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
|
||||
|
|
|
@ -21,6 +21,7 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
appsv1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
|
||||
)
|
||||
|
||||
// describes the attributes of a scale subresource
|
||||
|
@ -544,7 +545,7 @@ const (
|
|||
// 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"
|
||||
DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
|
||||
)
|
||||
|
||||
// DaemonSetList is a collection of daemon sets.
|
||||
|
|
|
@ -45,7 +45,7 @@ go_test(
|
|||
deps = [
|
||||
"//pkg/api/testapi: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",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -23,7 +23,7 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/testapi"
|
||||
"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 {
|
||||
|
|
|
@ -25,8 +25,9 @@ import (
|
|||
|
||||
const (
|
||||
// StatefulSetInitAnnotation if present, and set to false, indicates that a Pod's readiness should be ignored.
|
||||
StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
|
||||
StatefulSetRevisionLabel = "statefulset.beta.kubernetes.io/revision"
|
||||
StatefulSetInitAnnotation = "pod.alpha.kubernetes.io/initialized"
|
||||
ControllerRevisionHashLabelKey = "controller-revision-hash"
|
||||
StatefulSetRevisionLabel = ControllerRevisionHashLabelKey
|
||||
)
|
||||
|
||||
// ScaleSpec describes the attributes of a scale subresource
|
||||
|
|
|
@ -537,11 +537,6 @@ const (
|
|||
// to daemon set pods to distinguish between old and new pod templates
|
||||
// during DaemonSet template update.
|
||||
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.
|
||||
|
|
|
@ -36,6 +36,7 @@ go_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/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/networking:go_default_library",
|
||||
],
|
||||
|
|
|
@ -21,6 +21,7 @@ import (
|
|||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/client-go/pkg/api/v1"
|
||||
appsv1beta1 "k8s.io/client-go/pkg/apis/apps/v1beta1"
|
||||
)
|
||||
|
||||
// describes the attributes of a scale subresource
|
||||
|
@ -544,7 +545,7 @@ const (
|
|||
// 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"
|
||||
DefaultDaemonSetUniqueLabelKey = appsv1beta1.ControllerRevisionHashLabelKey
|
||||
)
|
||||
|
||||
// DaemonSetList is a collection of daemon sets.
|
||||
|
|
Loading…
Reference in New Issue