From f47737e6b23595a2436d375f9a2fe4c34da81e15 Mon Sep 17 00:00:00 2001 From: "CORP\\bogdan.vakulyuk" Date: Thu, 3 Nov 2022 20:25:39 +0200 Subject: [PATCH 1/2] Added 'wait' and 'timeout' parameters to helm application --- main.tf | 2 ++ variables.tf | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/main.tf b/main.tf index a6079d3..26dbc47 100644 --- a/main.tf +++ b/main.tf @@ -6,6 +6,8 @@ resource "helm_release" "application" { version = var.chart_version atomic = var.atomic create_namespace = var.create_namespace + wait = var.wait + timeout = var.timeout values = [var.disable_heavyweight_metrics ? file("${path.module}/templates/metrics-disable.yaml") : ""] diff --git a/variables.tf b/variables.tf index 57d03f2..befd4bc 100644 --- a/variables.tf +++ b/variables.tf @@ -103,3 +103,16 @@ variable "additional_set" { description = "Add additional set for helm" default = [] } + +variable "wait" { + description = "Will wait until all resources are in a ready state" + type = bool + default = true +} + +variable "timeout" { + type = number + description = " Time in seconds to wait for any individual kubernetes operation" + default = 300 +} + From da31baf61ab6d86da3323587bc5bf990b311eea2 Mon Sep 17 00:00:00 2001 From: "CORP\\bogdan.vakulyuk" Date: Thu, 3 Nov 2022 21:27:52 +0200 Subject: [PATCH 2/2] Added new parameters documentation --- README.md | 2 ++ variables.tf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4b46c6..e13d7fe 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ module "nginx-controller" { | metrics_enabled | Allow exposing metrics for prometheus-operator | `bool` | `false` | no | | disable_heavyweight_metrics | Disable some 'heavyweight' or unnecessary metrics | `bool` | `false` | no | | additional\_set | Additional sets to Helm |
list(object({
name = string
value = string
type = string // Optional
}))
| `[]` | no | +| wait | Will wait until all resources are in a ready state" | `bool` | `true` | no | +| timeout | Time in seconds to wait for any individual kubernetes operation | `number` | `300` | no | ## Outputs | Name | Description | diff --git a/variables.tf b/variables.tf index befd4bc..5bb8ffd 100644 --- a/variables.tf +++ b/variables.tf @@ -112,7 +112,7 @@ variable "wait" { variable "timeout" { type = number - description = " Time in seconds to wait for any individual kubernetes operation" + description = "Time in seconds to wait for any individual kubernetes operation" default = 300 }