Skip to content

Commit e831b7c

Browse files
committed
feat(ccm): do not sync startup-taints
1 parent fda1045 commit e831b7c

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

scaleway/sync.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ var (
6868
labelsPrefix = "k8s.scaleway.com/"
6969
taintsPrefix = "k8s.scaleway.com/"
7070
labelTaintPrefix = "taint="
71+
startupTaintPrefix = "startup-taint="
7172
labelNoPrefix = "noprefix="
7273

7374
// K8S labels
@@ -205,6 +206,9 @@ func (s *syncController) syncNodeTags(node *v1.Node) error {
205206
// Note: taints must be unique by key and effect pair
206207
nodeTaints := map[string]v1.Taint{}
207208
for _, tag := range server.Server.Tags {
209+
if strings.HasPrefix(tag, startupTaintPrefix) {
210+
continue
211+
}
208212
if strings.HasPrefix(tag, labelTaintPrefix) {
209213
key, value, effect := tagTaintParser(tag)
210214
if key == "" {

scaleway/sync_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func TestTagTaintParser(t *testing.T) {
4141
"taint=dash-word=dash-word": {"", "", ""},
4242
"taint=noprefix=dash-word=dash-word:PreferNoSchedule": {"dash-word", "dash-word", "PreferNoSchedule"},
4343
"taint=noprefix=node.k8s.io/dash-word=dash-word:PreferNoSchedule": {"node.k8s.io/dash-word", "dash-word", "PreferNoSchedule"},
44+
"startup-taint=value": {"", ""},
4445
}
4546
for tag, expected := range tagsTest {
4647
t.Run(tag, func(t *testing.T) {

0 commit comments

Comments
 (0)