Skip to content
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

Make creation of istio-system namespace optional #1439

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/asm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ To deploy this config:
| channel | The channel to use for this ASM installation. | `string` | `""` | no |
| cluster\_location | The cluster location for this ASM installation. | `string` | n/a | yes |
| cluster\_name | The unique name to identify the cluster in ASM. | `string` | n/a | yes |
| create\_system\_namespace | Determines whether the module creates the istio-system namespace. | `bool` | `true` | no |
| enable\_cni | Determines whether to enable CNI for this ASM installation. Required to use Managed Data Plane (MDP). | `bool` | `false` | no |
| enable\_fleet\_registration | Determines whether the module registers the cluster to the fleet. | `bool` | `false` | no |
| enable\_mesh\_feature | Determines whether the module enables the mesh feature on the fleet. | `bool` | `false` | no |
Expand Down
4 changes: 3 additions & 1 deletion modules/asm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ data "google_container_cluster" "asm" {
}

resource "kubernetes_namespace" "system" {
count = var.create_system_namespace ? 1 : 0

metadata {
name = "istio-system"
}
Expand All @@ -42,7 +44,7 @@ resource "kubernetes_namespace" "system" {
resource "kubernetes_config_map" "asm_options" {
metadata {
name = "asm-options"
namespace = kubernetes_namespace.system.metadata[0].name
namespace = try(kubernetes_namespace.system[0].metadata[0].name, "istio-system")
}

data = {
Expand Down
6 changes: 6 additions & 0 deletions modules/asm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,9 @@ variable "module_depends_on" {
type = list(any)
default = []
}

variable "create_system_namespace" {
description = "Determines whether the module creates the istio-system namespace."
type = bool
default = true
}