Skip to content

Commit

Permalink
fix: add timeout variables to istio helm charts
Browse files Browse the repository at this point in the history
  • Loading branch information
sydrawat01 authored and rishabNeu committed Dec 6, 2023
1 parent c9beaa2 commit 5f8df41
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ istioctl version
istioctl analyze
```

> **NOTE**: Add the `sidecar.istio.io/inject: "false"` annotation to the metadata section of the pod template. This will prevent the Istio sidecar from being injected into that specific pod.
## Configuring the chart values

For specific `values.yaml`, refer their specific charts and create their respective `values.yaml` files based on the dummy `values.yaml` file.
4 changes: 3 additions & 1 deletion modules/istio_base/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ resource "helm_release" "istio_base_chart" {
create_namespace = true
repository = "https://istio-release.storage.googleapis.com/charts"
chart = "base"
timeout = 120
timeout = var.timeout
cleanup_on_fail = true
force_update = false
wait = false
# When performing a revisioned installation, the base chart requires the
# `--defaultRevision` value to be set for resource validation to function.
set {
name = "defaultRevision"
value = "default"
Expand Down
1 change: 1 addition & 0 deletions modules/istio_base/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
variable "timeout" {}
2 changes: 1 addition & 1 deletion modules/istio_gateway/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "helm_release" "istio_gateway_chart" {
create_namespace = true
repository = "https://istio-release.storage.googleapis.com/charts"
chart = "gateway"
timeout = 120
timeout = var.timeout
cleanup_on_fail = true
force_update = false
wait = false
Expand Down
1 change: 1 addition & 0 deletions modules/istio_gateway/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
variable "timeout" {}
2 changes: 1 addition & 1 deletion modules/istiod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "helm_release" "istiod_chart" {
create_namespace = true
repository = "https://istio-release.storage.googleapis.com/charts"
chart = "istiod"
timeout = 120
timeout = var.timeout
cleanup_on_fail = true
force_update = false
wait = true
Expand Down
1 change: 1 addition & 0 deletions modules/istiod/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
variable "timeout" {}
1 change: 1 addition & 0 deletions modules/namespace/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "kubernetes_namespace" "istio_system" {
}
}

# The namespace the gateway is deployed in must not have a `istio-injection=disabled` label
resource "kubernetes_namespace" "istio_ingress" {
metadata {
labels = {
Expand Down
11 changes: 6 additions & 5 deletions root/example.tfvars
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace = "webapp"
timeout = 600
values_file = "./values.yaml"
chart_path = "../modules/infra_helm/charts"
release_name = "infra-helm-release"
timeout = 600
infra_values_file = "./infra_values.yaml"
webapp_values_file = "./webapp_values.yaml"
chart_path = "../modules/charts"
webapp_chart = "webapp-helm-chart-1.1.3.tar.gz"
infra_chart = "infra-helm-chart-1.4.0.tar.gz"
3 changes: 3 additions & 0 deletions root/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module "webapp_namespace" {
module "istio_base" {
depends_on = [module.webapp_namespace]
source = "../modules/istio_base"
timeout = var.timeout
}

resource "time_sleep" "istall_istio_crds" {
Expand All @@ -15,6 +16,7 @@ resource "time_sleep" "istall_istio_crds" {
module "istio_discovery" {
depends_on = [time_sleep.istall_istio_crds]
source = "../modules/istiod"
timeout = var.timeout
}

resource "time_sleep" "istall_istio_discovery" {
Expand All @@ -25,6 +27,7 @@ resource "time_sleep" "istall_istio_discovery" {
module "istio_gateway" {
depends_on = [time_sleep.istall_istio_discovery]
source = "../modules/istio_gateway"
timeout = var.timeout
}


Expand Down

0 comments on commit 5f8df41

Please sign in to comment.