Skip to content

Commit

Permalink
feat: add ability to override nginx domain (#129)
Browse files Browse the repository at this point in the history
* feat: add ability to override nginx domain

* chore: add admin domain / set zarf variables

* fix: set default admin domain

* fix: set correct values file
  • Loading branch information
joelmccoy authored Dec 17, 2024
1 parent 93be017 commit 3c0a28c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
10 changes: 7 additions & 3 deletions chart/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions values/dev-stack-values.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
extraPorts: ###ZARF_VAR_NGINX_EXTRA_PORTS###

domain: "###ZARF_VAR_DOMAIN###"
adminDomain: "###ZARF_VAR_ADMIN_DOMAIN###"
7 changes: 7 additions & 0 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ variables:
description: "Optionally allow more ports through Nginx (combine with K3D_EXTRA_ARGS '-p <port>:<port>@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
Expand Down

0 comments on commit 3c0a28c

Please sign in to comment.