Skip to content

Commit

Permalink
watch the operators ns
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Mar 11, 2025
1 parent 3881743 commit 0de17f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
|------|------|
| [helm_release.kiali_operator](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [kubernetes_namespace.ns](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource |
| [kubernetes_namespace.operators](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource |
| [kubernetes_namespace.operators](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/namespace) | data source |

## Inputs

Expand Down
7 changes: 2 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ CONFIG
service_name = var.namespace
}

resource "kubernetes_namespace" "operators" {
data "kubernetes_namespace" "operators" {
metadata {
name = var.operators_namespace
labels = {
istio-injection = "enabled"
}
}
}

Expand Down Expand Up @@ -92,7 +89,7 @@ resource "helm_release" "kiali_operator" {
}
set {
name = "watchNamespace"
value = kubernetes_namespace.ns.metadata[0].name
value = data.kubernetes_namespace.operators.metadata[0].name
}
set {
name = "allowAdHocKialiImage"
Expand Down

0 comments on commit 0de17f7

Please sign in to comment.