-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add support to make nodeSelector configurable in agent's daemonset #248
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
Changes from 2 commits
8f7b049
b971847
e36cbc5
4c32b69
b954bf1
e610881
7ad0e32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,6 +283,13 @@ variable "priority_class_value" { | |
| default = 10 | ||
| } | ||
|
|
||
| variable "node_selector" { | ||
| type = map(string) | ||
| nullable = false | ||
| description = "Map of node selector labels for the DaemonSet pods. Defaults to empty map." | ||
| default = {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a user passed null to this, I think logic will break since its used in a for loop. Can you add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay |
||
| } | ||
|
|
||
| ############################################################################## | ||
| # Metrics related variables | ||
| ############################################################################## | ||
|
|
||
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.
Have you tested this with multiple
node_selector's?I think currently this will currently give invalid json if you provide multiple node selectors. Missing comma between selectors.
Instead we could do something like this:
And the result be:
{ "maxSurge": 1, "nodeSelector": { "k1": "v1", "k2": "v2" } }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.
@jor2 Yes, I did test with multiple nodeSelector's. It was working.
But using
jsonencode()approach seems more robust. I will change the code to usejsonencode()