-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplifies the matchLabels for Oneagent daemonset #672
Conversation
@@ -111,7 +111,7 @@ func TestLogGarbageCollector_modificationDateOlderThanTwoWeeks(t *testing.T) { | |||
}) | |||
|
|||
t.Run("is true for timestamp 14 days in past", func(t *testing.T) { | |||
isOlder := isOlderThanTwoWeeks(time.Now().AddDate(0, 0, -14)) | |||
isOlder := isOlderThanTwoWeeks(time.Now().AddDate(0, 0, -15)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creating a separate PR for it would be to much work at this point IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite get what the purpose of this change is, but I agree with @0sewa0, it's such a trivial change it doesn't really need its own PR. It's more like housekeeping
@@ -12,95 +12,74 @@ import ( | |||
"sigs.k8s.io/controller-runtime/pkg/client" | |||
) | |||
|
|||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the diff looks scary, but I just refactored this according to the guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely refactored
// buildMatchLabels produces a set of labels that | ||
// don't change when switching between oneagent modes | ||
// or during operator version update | ||
// as matchLabels are not mutable on a Daemonset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this comment, it is good, well written, and useful
@@ -12,95 +12,74 @@ import ( | |||
"sigs.k8s.io/controller-runtime/pkg/client" | |||
) | |||
|
|||
const ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely refactored
Description
The match labels shouldn't change between deployment modes or the operator will throw errors in case the mode is changed on the dynakube and the oneagent daemonset will not change unless deleted by hand.
How can this be tested?
The labels should change, but not the matchLabels
Checklist