diff --git a/chart/templates/nginx.yaml b/chart/templates/nginx.yaml index 4ad71bf..36a3d27 100644 --- a/chart/templates/nginx.yaml +++ b/chart/templates/nginx.yaml @@ -14,6 +14,9 @@ data: hostnames; *.admin.uds.dev backend_admin; *.uds.dev backend_tenant; + {{- if .Values.customGateway | default false}} + *.{{ .Values.customGateway.domainName }} backend_custom_gateway; + {{- end }} } upstream backend_admin { @@ -24,6 +27,12 @@ data: server ###ZARF_VAR_BASE_IP###.201:443; } + {{- if .Values.customGateway | default false}} + upstream backend_custom_gateway { + server ###ZARF_VAR_BASE_IP###.202:443; + } + {{- end }} + server { listen 443; proxy_pass $selected_upstream; diff --git a/chart/values.yaml b/chart/values.yaml index fe7e6f0..27bc18f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -7,3 +7,7 @@ coreDnsOverrides: | rewrite stop { name regex (.*\.uds\.dev) tenant-ingressgateway.istio-tenant-gateway.svc.cluster.local answer auto } + +# Enable the following to use a custom gateway +# customGateway: +# domainName: uds2.dev diff --git a/docs/DNS.md b/docs/DNS.md index e3353c5..c1ed06e 100644 --- a/docs/DNS.md +++ b/docs/DNS.md @@ -28,3 +28,14 @@ uds run --set COREDNS_OVERRIDES="$COREDNS_OVERRIDES" ## Nginx Configuration Additionally, the package includes Nginx configuration that assumes the use of `uds.dev` as the base domain. This configuration is tailored to support the development environment setup, ensuring that Nginx correctly handles requests and routes them within the cluster, based on the `uds.dev` domain. + +### Nginx Additional Gateway Support + +You can add an additional Gateway to the Nginx configuration by overriding the helm value `customGateway.domainName` with the desired domain name. + +For example, to add a custom gateway with the domain `uds2.dev` you would add the following helm overrides for the `uds-dev-stack` chart: + +```yaml +customGateway: + domainName: uds2.dev +```