Skip to content

Commit ff3fc1d

Browse files
committed
fix(taint deletion): handle nil values to prevent panic
Signed-off-by: nueavv <[email protected]>
1 parent 65262a0 commit ff3fc1d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

pkg/cloud/converters/eks.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,10 @@ func TaintsFromSDK(taints []*eks.Taint) (expinfrav1.Taints, error) {
109109
if err != nil {
110110
return nil, fmt.Errorf("converting taint effect %s: %w", *taint.Effect, err)
111111
}
112-
taintValue := ""
113-
if taint.Value != nil {
114-
taintValue = *taint.Value
115-
}
116112
converted = append(converted, expinfrav1.Taint{
117113
Effect: convertedEffect,
118114
Key: *taint.Key,
119-
Value: taintValue,
115+
Value: aws.StringValue(taint.Value),
120116
})
121117
}
122118

pkg/cloud/converters/eks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020 The Kubernetes Authors.
2+
Copyright 2024 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)