From 7ddd76ce67277a309c3e6aa2717d07606ec38c12 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Wed, 26 Feb 2025 18:32:16 -0500 Subject: [PATCH] chart consolidation --- README.md | 2 - main.tf | 103 ++++++++++++++++++++++++++++++++++----------------- variables.tf | 10 ++--- 3 files changed, 75 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index bb7c40f..2513c02 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ | Name | Type | |------|------| -| [helm_release.kiali](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | [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 | @@ -52,7 +51,6 @@ | [operators\_namespace](#input\_operators\_namespace) | The namespace into which all operators are to be deployed. | `string` | n/a | yes | | [profile](#input\_profile) | The AWS\_PROFILE to use while running the scripts. | `string` | `""` | no | | [prometheus\_internal\_url](#input\_prometheus\_internal\_url) | The url within the cluster to use to query the prometheus server. | `string` | n/a | yes | -| [public\_hostname](#input\_public\_hostname) | The hostname to use for kiali that will be publicly available | `string` | `"kiali"` | no | ## Outputs diff --git a/main.tf b/main.tf index 3b5e0b8..b1efb64 100644 --- a/main.tf +++ b/main.tf @@ -76,7 +76,7 @@ resource "helm_release" "kiali_operator" { chart = "kiali-operator" version = var.kiali_operator_version name = "kiali-operator" - namespace = kubernetes_namespace.operators.metadata[0].name + namespace = kubernetes_namespace.ns.metadata[0].name repository = "https://kiali.org/helm-charts" set { @@ -90,10 +90,6 @@ resource "helm_release" "kiali_operator" { name = "image.tag" value = module.images.images[local.kiali_operator_key].tag } - set { - name = "cr.create" - value = "false" - } set { name = "watchNamespace" value = kubernetes_namespace.ns.metadata[0].name @@ -102,39 +98,13 @@ resource "helm_release" "kiali_operator" { name = "allowAdHocKialiImage" value = true } -} - -resource "helm_release" "kiali" { - depends_on = [ - helm_release.kiali-operator, - # module.preinstall, - ] - - chart = "kiali" - name = "kiali" - namespace = local.ns - repository = "./charts" - # repository = "${path.module}/charts" - - set { - name = "image_name" - value = format("%v/%v", - module.images.images[local.kiali_key].dest_registry, - module.images.images[local.kiali_key].dest_repository - ) - } - set { - name = "image_version" - value = module.images.images[local.kiali_key].tag - } - set { name = "publicHostname" - value = var.public_hostname + value = local.service_name } set { name = "publicDomain" - value = var.cluster_domain + value = local.public_domain } set { name = "istioNamespace" @@ -171,6 +141,73 @@ resource "helm_release" "kiali" { } } +# resource "helm_release" "kiali" { +# depends_on = [ +# helm_release.kiali_operator, +# # module.preinstall, +# ] + +# chart = "kiali" +# name = "kiali" +# namespace = kubernetes_namespace.ns.metadata[0].name +# repository = "./charts" +# # repository = "${path.module}/charts" + +# set { +# name = "image_name" +# value = format("%v/%v", +# module.images.images[local.kiali_key].dest_registry, +# module.images.images[local.kiali_key].dest_repository +# ) +# } +# set { +# name = "image_version" +# value = module.images.images[local.kiali_key].tag +# } + +# set { +# name = "publicHostname" +# value = var.public_hostname +# } +# set { +# name = "publicDomain" +# value = var.cluster_domain +# } +# set { +# name = "istioNamespace" +# value = var.istio_namespace +# } +# set { +# name = "prometheusInClusterUrl" +# value = var.prometheus_internal_url +# } +# set { +# name = "jaegerInClusterUrl" +# value = var.jaeger_internal_url +# } +# set { +# name = "grafanaInClusterUrl" +# value = var.grafana_internal_url +# } +# set { +# name = "grafanaPublicUrl" +# value = var.grafana_public_url +# } +# set { +# name = "grafanaUserName" +# value = "YWRtaW4=" +# # value = "admin" +# } +# set { +# name = "grafanaSecretName" +# value = "kiali" +# } +# set { +# name = "grafanaPasswordKey" +# value = "grafana_password" +# } +# } + # dynamic "set" { # for_each = local.have_keycloak ? ["openid"] : ["anonymous"] # content { diff --git a/variables.tf b/variables.tf index a50098b..9c771d6 100644 --- a/variables.tf +++ b/variables.tf @@ -67,11 +67,11 @@ variable "jaeger_internal_url" { type = string } -variable "public_hostname" { - description = "The hostname to use for kiali that will be publicly available" - type = string - default = "kiali" -} +# variable "public_hostname" { +# description = "The hostname to use for kiali that will be publicly available" +# type = string +# default = "kiali" +# }