diff --git a/kiali-server/templates/_helpers.tpl b/kiali-server/templates/_helpers.tpl index 70385d9..e9afcfb 100644 --- a/kiali-server/templates/_helpers.tpl +++ b/kiali-server/templates/_helpers.tpl @@ -1,27 +1,17 @@ {{/* vim: set filetype=mustache: */}} {{/* -Expand the name of the chart. -*/}} -{{- define "kiali-server.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. +Create a default fully qualified instance name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. +To simulate the way the operator works, use deployment.instance_name rather than the old fullnameOverride. +For backwards compatibility, if fullnameOverride is not kiali but deployment.instance_name is kiali, +use fullnameOverride, otherwise use deployment.instance_name. */}} {{- define "kiali-server.fullname" -}} -{{- if .Values.fullnameOverride }} - {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- if (and (eq .Values.deployment.instance_name "kiali") (ne .Values.fullnameOverride "kiali")) }} + {{- .Values.fullnameOverride | trunc 63 }} {{- else }} - {{- $name := default .Chart.Name .Values.nameOverride }} - {{- if contains $name .Release.Name }} - {{- .Release.Name | trunc 63 | trimSuffix "-" }} - {{- else }} - {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} - {{- end }} + {{- .Values.deployment.instance_name | trunc 63 }} {{- end }} {{- end }} @@ -48,7 +38,7 @@ Common labels */}} {{- define "kiali-server.labels" -}} helm.sh/chart: {{ include "kiali-server.chart" . }} -app: {{ include "kiali-server.name" . }} +app: kiali {{ include "kiali-server.selectorLabels" . }} version: {{ .Values.deployment.version_label | default .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Values.deployment.version_label | default .Chart.AppVersion | quote }} @@ -60,8 +50,8 @@ app.kubernetes.io/part-of: "kiali" Selector labels */}} {{- define "kiali-server.selectorLabels" -}} -app.kubernetes.io/name: {{ include "kiali-server.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/name: kiali +app.kubernetes.io/instance: {{ include "kiali-server.fullname" . }} {{- end }} {{/* diff --git a/kiali-server/templates/configmap.yaml b/kiali-server/templates/configmap.yaml index b1bf531..f4bfa09 100644 --- a/kiali-server/templates/configmap.yaml +++ b/kiali-server/templates/configmap.yaml @@ -16,6 +16,7 @@ data: {{- $_ := set $cm "istio_namespace" (include "kiali-server.istio_namespace" .) }} {{- $_ := set $cm.auth "strategy" (include "kiali-server.auth.strategy" .) }} {{- $_ := set $cm.auth.openshift "client_id_prefix" (include "kiali-server.fullname" .) }} + {{- $_ := set $cm.deployment "instance_name" (include "kiali-server.fullname" .) }} {{- $_ := set $cm.identity "cert_file" (include "kiali-server.identity.cert_file" .) }} {{- $_ := set $cm.identity "private_key_file" (include "kiali-server.identity.private_key_file" .) }} {{- $_ := set $cm.login_token "signing_key" (include "kiali-server.login_token.signing_key" .) }} diff --git a/kiali-server/templates/dashboards/envoy.yaml b/kiali-server/templates/dashboards/envoy.yaml index 85b4020..e642a33 100644 --- a/kiali-server/templates/dashboards/envoy.yaml +++ b/kiali-server/templates/dashboards/envoy.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: envoy diff --git a/kiali-server/templates/dashboards/go.yaml b/kiali-server/templates/dashboards/go.yaml index 2d2f42a..fdead4c 100644 --- a/kiali-server/templates/dashboards/go.yaml +++ b/kiali-server/templates/dashboards/go.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: go diff --git a/kiali-server/templates/dashboards/kiali.yaml b/kiali-server/templates/dashboards/kiali.yaml index b1f011b..5ecac7f 100644 --- a/kiali-server/templates/dashboards/kiali.yaml +++ b/kiali-server/templates/dashboards/kiali.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: kiali diff --git a/kiali-server/templates/dashboards/micrometer-1.0.6-jvm-pool.yaml b/kiali-server/templates/dashboards/micrometer-1.0.6-jvm-pool.yaml index 2e1ed5c..50fce70 100644 --- a/kiali-server/templates/dashboards/micrometer-1.0.6-jvm-pool.yaml +++ b/kiali-server/templates/dashboards/micrometer-1.0.6-jvm-pool.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: micrometer-1.0.6-jvm-pool diff --git a/kiali-server/templates/dashboards/micrometer-1.0.6-jvm.yaml b/kiali-server/templates/dashboards/micrometer-1.0.6-jvm.yaml index d645968..8481009 100644 --- a/kiali-server/templates/dashboards/micrometer-1.0.6-jvm.yaml +++ b/kiali-server/templates/dashboards/micrometer-1.0.6-jvm.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: micrometer-1.0.6-jvm diff --git a/kiali-server/templates/dashboards/micrometer-1.1-jvm.yaml b/kiali-server/templates/dashboards/micrometer-1.1-jvm.yaml index 76e8d0a..a28c402 100644 --- a/kiali-server/templates/dashboards/micrometer-1.1-jvm.yaml +++ b/kiali-server/templates/dashboards/micrometer-1.1-jvm.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: micrometer-1.1-jvm diff --git a/kiali-server/templates/dashboards/microprofile-1.1.yaml b/kiali-server/templates/dashboards/microprofile-1.1.yaml index 1d49511..00e2415 100644 --- a/kiali-server/templates/dashboards/microprofile-1.1.yaml +++ b/kiali-server/templates/dashboards/microprofile-1.1.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: microprofile-1.1 diff --git a/kiali-server/templates/dashboards/microprofile-x.y.yaml b/kiali-server/templates/dashboards/microprofile-x.y.yaml index 57ddc60..5851753 100644 --- a/kiali-server/templates/dashboards/microprofile-x.y.yaml +++ b/kiali-server/templates/dashboards/microprofile-x.y.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: microprofile-x.y diff --git a/kiali-server/templates/dashboards/nodejs.yaml b/kiali-server/templates/dashboards/nodejs.yaml index 1ffe0aa..7676a7c 100644 --- a/kiali-server/templates/dashboards/nodejs.yaml +++ b/kiali-server/templates/dashboards/nodejs.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: nodejs diff --git a/kiali-server/templates/dashboards/quarkus.yaml b/kiali-server/templates/dashboards/quarkus.yaml index cef5f3d..a4f3037 100644 --- a/kiali-server/templates/dashboards/quarkus.yaml +++ b/kiali-server/templates/dashboards/quarkus.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: quarkus diff --git a/kiali-server/templates/dashboards/springboot-jvm-pool.yaml b/kiali-server/templates/dashboards/springboot-jvm-pool.yaml index 42d87d8..3aa7d66 100644 --- a/kiali-server/templates/dashboards/springboot-jvm-pool.yaml +++ b/kiali-server/templates/dashboards/springboot-jvm-pool.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: springboot-jvm-pool diff --git a/kiali-server/templates/dashboards/springboot-jvm.yaml b/kiali-server/templates/dashboards/springboot-jvm.yaml index ced3acd..22ea155 100644 --- a/kiali-server/templates/dashboards/springboot-jvm.yaml +++ b/kiali-server/templates/dashboards/springboot-jvm.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: springboot-jvm diff --git a/kiali-server/templates/dashboards/springboot-tomcat.yaml b/kiali-server/templates/dashboards/springboot-tomcat.yaml index c07016a..7020ddc 100644 --- a/kiali-server/templates/dashboards/springboot-tomcat.yaml +++ b/kiali-server/templates/dashboards/springboot-tomcat.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: springboot-tomcat diff --git a/kiali-server/templates/dashboards/thorntail.yaml b/kiali-server/templates/dashboards/thorntail.yaml index 6bd85e6..0e94c50 100644 --- a/kiali-server/templates/dashboards/thorntail.yaml +++ b/kiali-server/templates/dashboards/thorntail.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: thorntail diff --git a/kiali-server/templates/dashboards/tomcat.yaml b/kiali-server/templates/dashboards/tomcat.yaml index 9a80334..29467e9 100644 --- a/kiali-server/templates/dashboards/tomcat.yaml +++ b/kiali-server/templates/dashboards/tomcat.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: tomcat diff --git a/kiali-server/templates/dashboards/vertx-client.yaml b/kiali-server/templates/dashboards/vertx-client.yaml index 2d591d6..9409adf 100644 --- a/kiali-server/templates/dashboards/vertx-client.yaml +++ b/kiali-server/templates/dashboards/vertx-client.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: vertx-client diff --git a/kiali-server/templates/dashboards/vertx-eventbus.yaml b/kiali-server/templates/dashboards/vertx-eventbus.yaml index 65f9ee2..384e7b1 100644 --- a/kiali-server/templates/dashboards/vertx-eventbus.yaml +++ b/kiali-server/templates/dashboards/vertx-eventbus.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: vertx-eventbus diff --git a/kiali-server/templates/dashboards/vertx-jvm.yaml b/kiali-server/templates/dashboards/vertx-jvm.yaml index 2663186..8439ce6 100644 --- a/kiali-server/templates/dashboards/vertx-jvm.yaml +++ b/kiali-server/templates/dashboards/vertx-jvm.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: vertx-jvm diff --git a/kiali-server/templates/dashboards/vertx-pool.yaml b/kiali-server/templates/dashboards/vertx-pool.yaml index f6af921..8334d47 100644 --- a/kiali-server/templates/dashboards/vertx-pool.yaml +++ b/kiali-server/templates/dashboards/vertx-pool.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: vertx-pool diff --git a/kiali-server/templates/dashboards/vertx-server.yaml b/kiali-server/templates/dashboards/vertx-server.yaml index de6b89d..b88b270 100644 --- a/kiali-server/templates/dashboards/vertx-server.yaml +++ b/kiali-server/templates/dashboards/vertx-server.yaml @@ -1,6 +1,6 @@ {{- if (include "kiali-server.isDashboardEnabled" .) }} --- -apiVersion: "monitoring.kiali.io/v1alpha1" +apiVersion: monitoring.kiali.io/v1alpha1 kind: MonitoringDashboard metadata: name: vertx-server diff --git a/kiali-server/values.yaml b/kiali-server/values.yaml index e7866a5..a5e91f5 100644 --- a/kiali-server/values.yaml +++ b/kiali-server/values.yaml @@ -1,4 +1,8 @@ -nameOverride: "kiali" +# 'fullnameOverride' is deprecated. Use 'deployment.instance_name' instead. +# This is only supported for backward compatibility and will be removed in a future version. +# If 'fullnameOverride' is not "kiali" and 'deployment.instance_name' is "kiali", +# then 'deployment.instance_name' will take the value of 'fullnameOverride' value. +# Otherwise, 'fullnameOverride' is ignored and 'deployment.instance_name' is used. fullnameOverride: "kiali" # This is required for "openshift" auth strategy. @@ -42,6 +46,7 @@ deployment: image_pull_secrets: [] image_version: ${HELM_IMAGE_TAG} ingress_enabled: true + instance_name: "kiali" logger: log_format: "text" log_level: "info"