Merge pull request #43016 from liggitt/time-added-pointer
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.. Omit timeAdded from taint when empty Fixes omitempty portion of https://github.com/kubernetes/kubernetes/issues/42394
This commit is contained in:
@@ -63,17 +63,22 @@ var (
|
||||
noExecuteTaints = []v1.Taint{{Key: "dedicated", Value: "user1", Effect: "NoExecute"}}
|
||||
)
|
||||
|
||||
func nowPointer() *metav1.Time {
|
||||
now := metav1.Now()
|
||||
return &now
|
||||
}
|
||||
|
||||
var (
|
||||
nodeNotReady = []v1.Taint{{
|
||||
Key: algorithm.TaintNodeNotReady,
|
||||
Effect: v1.TaintEffectNoExecute,
|
||||
TimeAdded: metav1.Now(),
|
||||
TimeAdded: nowPointer(),
|
||||
}}
|
||||
|
||||
nodeUnreachable = []v1.Taint{{
|
||||
Key: algorithm.TaintNodeUnreachable,
|
||||
Effect: v1.TaintEffectNoExecute,
|
||||
TimeAdded: metav1.Now(),
|
||||
TimeAdded: nowPointer(),
|
||||
}}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user