Skip to content

Commit 466a66e

Browse files
committed
Revert "update"
This reverts commit 853991a.
1 parent 853991a commit 466a66e

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ No modules.
143143
| <a name="input_is_vpc_cluster"></a> [is\_vpc\_cluster](#input\_is\_vpc\_cluster) | Specify true if the target cluster is a VPC cluster, false if it is a classic cluster. | `bool` | `true` | no |
144144
| <a name="input_kernal_module_image_repository"></a> [kernal\_module\_image\_repository](#input\_kernal\_module\_image\_repository) | The image repository to pull the agent kernal module initContainer image from. | `string` | `"agent-kmodule"` | no |
145145
| <a name="input_kernel_module_image_tag_digest"></a> [kernel\_module\_image\_tag\_digest](#input\_kernel\_module\_image\_tag\_digest) | The image tag or digest to use for the agent kernel module used by the initContainer. If using digest, it must be in the format of `X.Y.Z@sha256:xxxxx` | `string` | `"14.2.0@sha256:3be3966e2bef75364f55d248156a568a222afaba3067f43c5c642c46b690cca9"` | no |
146-
| <a name="input_max_surge"></a> [max\_surge](#input\_max\_surge) | The number of pods that can be created above the desired amount of daemonset pods during an update. The variable accepts absolute number or percentage value(e.g., '1' or '10%'). | `string` | `"1"` | no |
146+
| <a name="input_max_surge"></a> [max\_surge](#input\_max\_surge) | The number of pods that can be created above the desired amount of daemonset pods during an update. If `max_surge` is set to null, the `max_surge` setting is ignored.. The variable accepts absolute number or percentage value(e.g., '1' or '10%'). | `string` | `null` | no |
147147
| <a name="input_max_unavailable"></a> [max\_unavailable](#input\_max\_unavailable) | The maximum number of pods that can be unavailable during a DaemonSet rolling update. Accepts absolute number or percentage (e.g., '1' or '10%'). | `string` | `"1"` | no |
148148
| <a name="input_metrics_filter"></a> [metrics\_filter](#input\_metrics\_filter) | To filter custom metrics you can specify which metrics to include and exclude. For more info, see https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_inc_exc_metrics | <pre>list(object({<br/> include = optional(string)<br/> exclude = optional(string)<br/> }))</pre> | `[]` | no |
149149
| <a name="input_name"></a> [name](#input\_name) | The name to give the agent helm release. | `string` | `"sysdig-agent"` | no |

ibm_catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@
270270
"value_constraints": [
271271
{
272272
"type": "regex",
273-
"description": "The value provided for 'max_surge' must be a positive integer (e.g., '1') or a percentage (e.g., '10%').",
274-
"value": "^\\d+%?$"
273+
"description": "The value provided for 'max_surge' must be a positive integer (e.g., '1') or a percentage (e.g., '10%'), or null.",
274+
"value": "^__NULL__$|^\\d+%?$"
275275
}
276276
]
277277
},

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ resource "helm_release" "cloud_monitoring_agent" {
262262
"type": "RollingUpdate"
263263
"rollingUpdate":
264264
"maxUnavailable": ${var.max_unavailable}
265+
%{if var.max_surge != null}
265266
"maxSurge": ${var.max_surge}
267+
%{endif}
266268
EOT
267269
]
268270

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ variable "max_unavailable" {
255255
variable "max_surge" {
256256
type = string
257257
description = "The number of pods that can be created above the desired amount of daemonset pods during an update. If `max_surge` is set to null, the `max_surge` setting is ignored.. The variable accepts absolute number or percentage value(e.g., '1' or '10%')."
258-
default = "1"
259-
nullable = false
258+
default = null
260259
}
261260

262261
variable "priority_class_name" {

variables.tf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,14 @@ variable "max_unavailable" {
259259

260260
variable "max_surge" {
261261
type = string
262-
description = "The number of pods that can be created above the desired amount of daemonset pods during an update. The variable accepts absolute number or percentage value(e.g., '1' or '10%')."
263-
default = "1"
264-
nullable = false
262+
description = "The number of pods that can be created above the desired amount of daemonset pods during an update. If `max_surge` is set to null, the `max_surge` setting is ignored.. The variable accepts absolute number or percentage value(e.g., '1' or '10%')."
263+
default = null
265264
validation {
266-
condition = can(regex("^\\d+%?$", var.max_surge))
267-
error_message = "max_surge must be a positive integer (e.g., '1') or a percentage (e.g., '10%')."
265+
condition = (
266+
var.max_surge == null ||
267+
can(regex("^\\d+%?$", var.max_surge))
268+
)
269+
error_message = "max_surge must be a positive integer (e.g., '1') or a percentage (e.g., '10%'), or null."
268270
}
269271
}
270272

0 commit comments

Comments
 (0)