Skip to content

Commit

Permalink
feat: add ability to support additional gateway/domain (#115)
Browse files Browse the repository at this point in the history
* feat: add ability to support additional gateway/domain

* chore: commit suggestion

Co-authored-by: Clint <catsby@users.noreply.github.com>

---------

Co-authored-by: Clint <catsby@users.noreply.github.com>
  • Loading branch information
joelmccoy and catsby authored Oct 9, 2024
1 parent 868ace5 commit 4c62e6c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chart/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions docs/DNS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 4c62e6c

Please sign in to comment.