Skip to content

Commit

Permalink
chart consolidation
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Mar 17, 2025
1 parent 70d7130 commit 98f4e3c
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 28 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -52,7 +51,6 @@
| <a name="input_operators_namespace"></a> [operators\_namespace](#input\_operators\_namespace) | The namespace into which all operators are to be deployed. | `string` | n/a | yes |
| <a name="input_profile"></a> [profile](#input\_profile) | The AWS\_PROFILE to use while running the scripts. | `string` | `""` | no |
| <a name="input_prometheus_internal_url"></a> [prometheus\_internal\_url](#input\_prometheus\_internal\_url) | The url within the cluster to use to query the prometheus server. | `string` | n/a | yes |
| <a name="input_public_hostname"></a> [public\_hostname](#input\_public\_hostname) | The hostname to use for kiali that will be publicly available | `string` | `"kiali"` | no |

## Outputs

Expand Down
132 changes: 111 additions & 21 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,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 {
Expand All @@ -94,10 +94,6 @@ resource "helm_release" "kiali_operator" {
}


set {
name = "cr.create"
value = "false"
}
set {
name = "watchNamespace"
value = kubernetes_namespace.ns.metadata[0].name
Expand All @@ -114,18 +110,14 @@ resource "helm_release" "kiali_operator" {
module.images.images[local.kiali_server_key].tag
)
}
}

resource "helm_release" "kiali" {
depends_on = [
helm_release.kiali_operator,
module.preinstall,
]

chart = "./kiali-server"
name = "kiali"
namespace = var.namespace

set {
name = "publicHostname"
value = local.service_name
}
set {
name = "publicDomain"
value = local.public_domain
}
set {
name = "istioNamespace"
value = var.istio_namespace
Expand Down Expand Up @@ -162,10 +154,108 @@ resource "helm_release" "kiali" {

}

module "ingress_resources" {
# tflint-ignore: terraform_module_version
# tflint-ignore: terraform_module_pinned_source
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio-service-ingress.git?ref=main"
# 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 {
# name = "kialiAuthStrategy"
# value = set.value
# }
# }
# dynamic "set" {
# for_each = local.have_keycloak ? [var.sso_client_id] : []
# content {
# name = "openid.clientId"
# value = set.value
# }
# }
# dynamic "set" {
# for_each = local.have_keycloak ? [var.sso_client_secret] : []
# content {
# name = "openid.secret"
# value = set.value
# }
# }
# dynamic "set" {
# for_each = local.have_keycloak ? [local.keycloak_issuer_uri] : []
# content {
# name = "openid.issuerUri"
# value = set.value
# }
# }
# dynamic "set" {
# for_each = local.have_keycloak ? ["username_claim"] : []
# content {
# name = "openid.username_claim"
# value = set.value
# }
# }


# module "kiali_ingress" {
Expand Down
10 changes: 5 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ variable "tempo_datasource_id" {
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"
# }

# helm repo add kiali https://kiali.org/helm-charts
# helm search repo kiali/kiali-operator
Expand Down

0 comments on commit 98f4e3c

Please sign in to comment.