Skip to content

Commit

Permalink
fix: hosts enablement
Browse files Browse the repository at this point in the history
  • Loading branch information
mjnagel committed Dec 16, 2024
1 parent 8c9e27f commit de3ae8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/istio/common/chart/templates/classification-banner.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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 }}
}
Expand Down
4 changes: 0 additions & 4 deletions src/istio/common/chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
16 changes: 10 additions & 6 deletions src/istio/common/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -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###" }}'

0 comments on commit de3ae8a

Please sign in to comment.