Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgin314 committed Mar 12, 2025
1 parent bafeba0 commit 520f146
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 198 deletions.
8 changes: 4 additions & 4 deletions copy_images.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ locals {
name = "istio-tools/kiali-operator"
source_image = "kiali/kiali-operator"
source_registry = "quay.io"
source_tag = local.kiali_operator_version
tag = local.kiali_operator_version
source_tag = var.kiali_operator_version
tag = var.kiali_operator_version
},
{
enabled = true
dest_path = null
name = "istio-tools/kiali"
source_image = "kiali/kiali"
source_registry = "quay.io"
source_tag = local.kiali_operator_version
tag = local.kiali_operator_version
source_tag = var.kiali_operator_version
tag = var.kiali_operator_version
},
]
}
Expand Down
159 changes: 2 additions & 157 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ resource "helm_release" "kiali_operator" {

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

Expand Down Expand Up @@ -134,166 +134,11 @@ 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"
source = "/apps/terraform/workspaces/mcgin314/tfmod-istio-service-ingress"
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio-service-ingress.git?ref=main"

public_hostname = "kiali"
public_domain = format("%v.%v", var.cluster_name, var.cluster_domain)
service_name = "kiali"
service_namespace = var.namespace
service_port = local.internal_port_number
}

# grafana:
# enabled: true
# auth:
# type: basic
# username: "admin"
# password: "Q8rktnHqzYFEf591U35Uf66T1xFJ4HZZFqiOn4fh"

# tracing:
# enabled: true
# internalUrl: "http://tempo.tempo.svc.cluster.local:3100"
# use_grpc: false
# provider: "tempo"
# tempo_config:
# org_id: "1"
# datasource_uid: "fedkp0zap3uv4d"
# url_format: "grafana"


# 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 = "kialiAuthStrategy"
# value = "anonymous"
# }

# 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" {
# depends_on = [helm_release.kiali]

# #source = "git@github.it.census.gov:SOA/tfmod-gogatekeeper.git//>ref=1.0.0"
# source = "git@github.it.census.gov:SOA/tfmod-gogatekeeper.git//"

# certificate_issuer = var.certificate_issuer

# namespace = local.ns
# application_name = "kiali"
# public_hostname = "kiali"
# cluster_domain = var.cluster_domain
# upstream_hostname = local.internal_hostname
# upstream_port = local.internal_port_number
# redirection_url = local.public_url
# 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
# gogatekeeper_repository = var.gogatekeeper_repository
# gogatekeeper_tag = var.gogatekeeper_tag
# }
6 changes: 1 addition & 5 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

output "public_endpoint" {
description = "The public endpoint to use to access kiali"
value = {
hostname = local.public_hostname
port_number = local.public_port_number
url = local.public_url
}
value = module.ingress_resources.service_url
}

output "internal_endpoint" {
Expand Down
32 changes: 0 additions & 32 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ variable "istio_namespace" {
default = "istio-system"
}

variable "keycloak_namespace" {
description = "The namespace holding the keycloak instance."
type = string
default = ""
}

variable "grafana_namespace" {
description = "The namespace holding the grafana instance, used to look up the grafana password."
type = string
Expand Down Expand Up @@ -67,38 +61,12 @@ variable "tempo_datasource_id" {
type = string
}

variable "sso_client_id" {
description = "The client id to use for SSO"
type = string
default = ""
}

variable "sso_client_secret" {
description = "The secret associated with the sso_client_id"
type = string
default = ""
}

variable "keycloak_public_url" {
description = "The hostname used with the cluster domain to access keycloak"
type = string
default = ""
}

variable "keycloak_realm" {
description = "The existing keycloak realm in which the client should be created"
type = string
default = ""
}

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
variable "kiali_operator_version" {
Expand Down

0 comments on commit 520f146

Please sign in to comment.