Move out const strings in pkg/scheduler/api/well_known_labels.go

This commit is contained in:
Wei Huang
2019-11-04 11:31:16 -08:00
parent cbe7c6e3be
commit dd74205bcf
25 changed files with 189 additions and 189 deletions

View File

@@ -21,6 +21,7 @@ import (
"fmt"
"io"
v1 "k8s.io/api/core/v1"
"k8s.io/apiserver/pkg/admission"
api "k8s.io/kubernetes/pkg/apis/core"
)
@@ -28,8 +29,6 @@ import (
const (
// PluginName is the name of the plugin.
PluginName = "TaintNodesByCondition"
// TaintNodeNotReady is the not-ready label as specified in the API.
TaintNodeNotReady = "node.kubernetes.io/not-ready"
)
// Register registers a plugin
@@ -83,7 +82,7 @@ func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.
func addNotReadyTaint(node *api.Node) {
notReadyTaint := api.Taint{
Key: TaintNodeNotReady,
Key: v1.TaintNodeNotReady,
Effect: api.TaintEffectNoSchedule,
}
for _, taint := range node.Spec.Taints {