Skip to content

Commit

Permalink
Renamed kiali_hostname to hostname and sso_admin_* to sso_*
Browse files Browse the repository at this point in the history
  • Loading branch information
zawac002 committed Sep 12, 2023
1 parent b4d91d3 commit 50700df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ locals {

have_keycloak = (
try(length(var.keycloak_namespace), 0) > 0 &&
try(length(var.sso_admin_client_id), 0) > 0 &&
try(length(var.sso_admin_client_secret), 0) > 0 &&
try(length(var.sso_client_id), 0) > 0 &&
try(length(var.sso_client_secret), 0) > 0 &&
try(length(var.keycloak_public_url), 0) > 0 &&
try(length(var.keycloak_realm), 0) > 0
) ? true : false
Expand All @@ -19,7 +19,7 @@ locals {
)
: "")

kiali_oidc_secret = local.have_keycloak ? "ensure_secret kiali oidc-secret \"${var.sso_admin_client_secret}\"" : ";"
kiali_oidc_secret = local.have_keycloak ? "ensure_secret kiali oidc-secret \"${var.sso_client_secret}\"" : ";"

preinstall_script = <<CONFIG
${local.kiali_oidc_secret}
Expand Down Expand Up @@ -124,7 +124,7 @@ resource "helm_release" "kiali" {

set {
name = "publicHostname"
value = var.kiali_hostname
value = var.hostname
}
set {
name = "publicDomain"
Expand Down Expand Up @@ -172,14 +172,14 @@ resource "helm_release" "kiali" {
# }
# }
# dynamic "set" {
# for_each = local.have_keycloak ? [var.sso_admin_client_id] : []
# 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_admin_client_secret] : []
# for_each = local.have_keycloak ? [var.sso_client_secret] : []
# content {
# name = "openid.secret"
# value = set.value
Expand Down Expand Up @@ -211,8 +211,8 @@ module "kiali_ingress" {
application_name = "kiali"
upstream_url = local.kiali_internal_url
redirection_url = local.kiali_public_url
client_id = var.sso_admin_client_id
client_secret = var.sso_admin_client_secret
client_id = var.sso_client_id
client_secret = var.sso_client_secret
keycloak_public_url = var.keycloak_public_url
gogatekeeper_chart_version = var.gogatekeeper_chart_version
gogatekeeper_registry = var.gogatekeeper_registry
Expand Down
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ variable "jaeger_internal_url" {
description = "The url within the cluster to use to query the jaegertracing."
}

variable "sso_admin_client_id" {
variable "sso_client_id" {
description = "The client id to use for SSO"
default = null
}

variable "sso_admin_client_secret" {
description = "The secret associated with the sso_admin_client_id"
variable "sso_client_secret" {
description = "The secret associated with the sso_client_id"
default = null
}

Expand All @@ -80,7 +80,7 @@ variable "keycloak_realm" {
default = null
}

variable "kiali_hostname" {
variable "hostname" {
description = "The hostname to use for the kiali deployment"
default = "kiali"
}
Expand Down

0 comments on commit 50700df

Please sign in to comment.