-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add support for priorityClass and make updateStrategy configurable #189
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 13 commits
dc12a89
9bfccbf
0c2e587
3a28c8b
5acdf22
14b7f0d
4306a10
930aba1
c1e22ad
eb4ce7a
a7555a0
380282c
362eaef
7077b45
f20f2ca
c6e852a
37836e6
6c56301
2c8e81e
853991a
466a66e
67c5d1b
07ca7ca
bea66d3
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 |
|---|---|---|
|
|
@@ -246,6 +246,52 @@ variable "deployment_tag" { | |
| default = "terraform" | ||
| } | ||
|
|
||
| variable "max_unavailable" { | ||
| type = string | ||
| description = "The maximum number of pods that can be unavailable during a DaemonSet rolling update. Accepts absolute number or percentage (e.g., '1' or '10%')." | ||
| default = "1" | ||
ocofaigh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| validation { | ||
| condition = can(regex("^\\d+%?$", var.max_unavailable)) | ||
| error_message = "max_unavailable must be a positive integer (e.g., '1') or a percentage (e.g., '10%')" | ||
| } | ||
| } | ||
|
|
||
| variable "max_surge" { | ||
| type = string | ||
| description = "The maximum number of nodes that can have an extra DaemonSet pod during a rolling update. Accepts absolute number or percentage (e.g., '1' or '10%')." | ||
|
||
| default = null | ||
ocofaigh marked this conversation as resolved.
Show resolved
Hide resolved
ocofaigh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| validation { | ||
| condition = ( | ||
| var.max_surge == null || | ||
| can(regex("^\\d+%?$", var.max_surge)) | ||
| ) | ||
| error_message = "max_surge must be a positive integer (e.g., '1') or a percentage (e.g., '10%'), or null." | ||
| } | ||
| } | ||
Aashiq-J marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| variable "create_priority_class" { | ||
|
||
| type = bool | ||
| description = "Whether to create a priority class for the sysdig agent daemonset." | ||
| default = false | ||
| } | ||
|
|
||
| variable "priority_class_name" { | ||
| type = string | ||
| description = "The priority class name for the PriorityClasses assigned to the sysdig daemonset." | ||
| default = null | ||
|
|
||
| validation { | ||
| condition = var.create_priority_class ? var.priority_class_name == null ? false : true : true | ||
| error_message = "When 'create_priority_class' is set to true, a value for 'priority_class_name' should be passed." | ||
| } | ||
| } | ||
|
|
||
| variable "priority_class_value" { | ||
| type = number | ||
| description = "The numerical priority assigned to PriorityClass, which determines the importance of sysdig daemonset pod within the cluster for both scheduling and eviction decisions." | ||
| default = 10 | ||
| } | ||
|
|
||
| ############################################################################## | ||
| # 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.
Is "priorityClassName": "null" a supported helm value ? Should we use yaml templating here to simply omit
priorityClassNamefrom the yaml if its null?