Merge pull request #53937 from dims/duplicate-constant-in-kubeadm

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Duplicate a constant - LabelNodeRoleMaster

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

Per request from @luxas in 53458, to avoid cmd/kubeadm to
depend on pkg/controller/service. Added a comment to make
this clear.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-10-17 05:42:51 -07:00 committed by GitHub
commit b7862817aa
2 changed files with 2 additions and 3 deletions

View File

@ -11,7 +11,6 @@ go_library(
srcs = ["constants.go"],
importpath = "k8s.io/kubernetes/cmd/kubeadm/app/constants",
deps = [
"//pkg/controller/service:go_default_library",
"//pkg/util/version:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
],

View File

@ -24,7 +24,6 @@ import (
"time"
"k8s.io/api/core/v1"
"k8s.io/kubernetes/pkg/controller/service"
"k8s.io/kubernetes/pkg/util/version"
)
@ -132,7 +131,8 @@ const (
DefaultTokenDuration = 24 * time.Hour
// LabelNodeRoleMaster specifies that a node is a master
LabelNodeRoleMaster = service.LabelNodeRoleMaster
// This is a duplicate definition of the constant in pkg/controller/service/service_controller.go
LabelNodeRoleMaster = "node-role.kubernetes.io/master"
// MasterConfigurationConfigMap specifies in what ConfigMap in the kube-system namespace the `kubeadm init` configuration should be stored
MasterConfigurationConfigMap = "kubeadm-config"