File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,19 @@ func (p *PoolConfig) CreateJsonPatchSet() (patches []k8s.JsonPatch) {
108
108
patches = []k8s.JsonPatch {}
109
109
110
110
if p .Node .Role != nil {
111
- name := "kubernetes.io/role"
111
+ label := "kubernetes.io/role"
112
112
patches = append (patches , k8s.JsonPatchString {
113
113
Op : "replace" ,
114
- Path : fmt .Sprintf ("/metadata/labels/%s" , k8s .PatchPathEsacpe (name )),
114
+ Path : fmt .Sprintf ("/metadata/labels/%s" , k8s .PatchPathEsacpe (label )),
115
115
Value : * p .Node .Role ,
116
116
})
117
+
118
+ label = fmt .Sprintf ("node-role.kubernetes.io/%s" , * p .Node .Role )
119
+ patches = append (patches , k8s.JsonPatchString {
120
+ Op : "replace" ,
121
+ Path : fmt .Sprintf ("/metadata/labels/%s" , k8s .PatchPathEsacpe (label )),
122
+ Value : "" ,
123
+ })
117
124
}
118
125
119
126
if p .Node .ConfigSource != nil {
You can’t perform that action at this time.
0 commit comments