diff --git a/chart/templates/nginx.yaml b/chart/templates/nginx.yaml index 36a3d27..8a90421 100644 --- a/chart/templates/nginx.yaml +++ b/chart/templates/nginx.yaml @@ -11,9 +11,13 @@ data: stream { map $ssl_preread_server_name $selected_upstream { - hostnames; - *.admin.uds.dev backend_admin; - *.uds.dev backend_tenant; + hostnames; + {{- if .Values.adminDomain }} + *.{{ .Values.adminDomain }} backend_admin; + {{- else }} + *.admin.{{ .Values.domain }} backend_admin; + {{- end }} + *.{{ .Values.domain }} backend_tenant; {{- if .Values.customGateway | default false}} *.{{ .Values.customGateway.domainName }} backend_custom_gateway; {{- end }} diff --git a/values/dev-stack-values.yaml b/values/dev-stack-values.yaml index a67e584..3082061 100644 --- a/values/dev-stack-values.yaml +++ b/values/dev-stack-values.yaml @@ -1 +1,4 @@ extraPorts: ###ZARF_VAR_NGINX_EXTRA_PORTS### + +domain: "###ZARF_VAR_DOMAIN###" +adminDomain: "###ZARF_VAR_ADMIN_DOMAIN###" diff --git a/zarf.yaml b/zarf.yaml index e67bd2b..2e0bf6f 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -27,6 +27,13 @@ variables: description: "Optionally allow more ports through Nginx (combine with K3D_EXTRA_ARGS '-p :@server:*')" default: "[]" + - name: DOMAIN + description: "Cluster domain" + default: "uds.dev" + + - name: ADMIN_DOMAIN + description: "Domain for admin services, defaults to `admin.DOMAIN`" + components: - name: destroy-cluster required: true