mirror of https://github.com/kubernetes/kops.git
Use versioned taint annotations
The json annotations were removed from the unversioned types.
This commit is contained in:
parent
5f0964c4b3
commit
9d6fddfa3e
|
|
@ -56,7 +56,7 @@ func ApplyMasterTaints(kubeContext *KubernetesContext) error {
|
|||
return fmt.Errorf("error querying nodes: %v", err)
|
||||
}
|
||||
|
||||
taint := []api.Taint{{Key: "dedicated", Value: "master", Effect: "NoSchedule"}}
|
||||
taint := []v1.Taint{{Key: "dedicated", Value: "master", Effect: "NoSchedule"}}
|
||||
taintJSON, err := json.Marshal(taint)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error serializing taint: %v", err)
|
||||
|
|
@ -65,7 +65,7 @@ func ApplyMasterTaints(kubeContext *KubernetesContext) error {
|
|||
for i := range nodes.Items {
|
||||
node := &nodes.Items[i]
|
||||
|
||||
nodeTaintJSON := node.Annotations[api.TaintsAnnotationKey]
|
||||
nodeTaintJSON := node.Annotations[v1.TaintsAnnotationKey]
|
||||
if nodeTaintJSON != "" {
|
||||
if nodeTaintJSON != string(taintJSON) {
|
||||
glog.Infof("Node %q had unexpected taint: %v", node.Name, nodeTaintJSON)
|
||||
|
|
@ -74,7 +74,7 @@ func ApplyMasterTaints(kubeContext *KubernetesContext) error {
|
|||
}
|
||||
|
||||
nodePatchMetadata := &nodePatchMetadata{
|
||||
Annotations: map[string]string{api.TaintsAnnotationKey: string(taintJSON)},
|
||||
Annotations: map[string]string{v1.TaintsAnnotationKey: string(taintJSON)},
|
||||
}
|
||||
unschedulable := false
|
||||
nodePatchSpec := &nodePatchSpec{
|
||||
|
|
|
|||
Loading…
Reference in New Issue