diff --git a/src/istio/common/chart/templates/classification-banner.yaml b/src/istio/common/chart/templates/classification-banner.yaml index d74263928..31c757cac 100644 --- a/src/istio/common/chart/templates/classification-banner.yaml +++ b/src/istio/common/chart/templates/classification-banner.yaml @@ -1,7 +1,7 @@ # Copyright 2024 Defense Unicorns # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial -{{- if .Values.classificationBanner.enabled }} +{{- if .Values.classificationBanner.enabledHosts }} apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata: @@ -101,7 +101,7 @@ spec: -- List of enabled hosts as a table for quick lookup, injected via Helm local enabled_hosts = { {{- range .Values.classificationBanner.enabledHosts }} - ["{{ tpl . $.Values }}"] = true, + ["{{ tpl . $ }}"] = true, {{- end }} } diff --git a/src/istio/common/chart/values.schema.json b/src/istio/common/chart/values.schema.json index c1737f651..79a7d60ac 100644 --- a/src/istio/common/chart/values.schema.json +++ b/src/istio/common/chart/values.schema.json @@ -5,10 +5,6 @@ "classificationBanner": { "type": "object", "properties": { - "enabled": { - "type": "boolean", - "description": "Enable or disable the classification banner." - }, "addFooter": { "type": "boolean", "description": "Indicates whether to add a footer to the classification banner." diff --git a/src/istio/common/chart/values.yaml b/src/istio/common/chart/values.yaml index 83c2acac7..5c6da4d45 100644 --- a/src/istio/common/chart/values.yaml +++ b/src/istio/common/chart/values.yaml @@ -1,9 +1,13 @@ # SPDX-License-Identifier: AGPL-3.0-or-later OR Commercial classificationBanner: - enabled: true - text: "UNCLASSIFIED" + text: "UNKNOWN" addFooter: true - enabledHosts: - - keycloak.{{ "###ZARF_VAR_ADMIN_DOMAIN###" | default "admin.###ZARF_VAR_DOMAIN###" }} - - grafana.{{ "###ZARF_VAR_ADMIN_DOMAIN###" | default "admin.###ZARF_VAR_DOMAIN###" }} - - sso.###ZARF_VAR_DOMAIN### + # Hosts to enable the banner on + enabledHosts: [] + # Examples (supports helm templating) + # - keycloak.{{ .Values.adminDomain }} + # - sso.{{ .Values.domain }} + # - grafana.admin.uds.dev + +domain: "###ZARF_VAR_DOMAIN###" +adminDomain: '{{ "###ZARF_VAR_ADMIN_DOMAIN###" | default "admin.###ZARF_VAR_DOMAIN###" }}'