Skip to content

Commit

Permalink
docs and tasks update
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw committed Sep 27, 2024
1 parent 686ff43 commit 8321dec
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/DNS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ This package includes a CoreDNS configuration override designed to rewrite reque

The outcome of this is a pods in the cluster can resolve domains like sso.uds.dev to an address (not 127.0.0.1) that will ultimately get routed correctly.

You can use Zarf Helm overrides to overwrite the overrides provided by default in this package. To do so you must have Zarf >= v0.33.0. An example of how one might use this override with the default UDS task is as follows:

```bash
# Define the overrides
COREDNS_OVERRIDES=$(cat << 'EOF'
rewrite stop {
name regex (.*\.uds\.dev) host.k3d.internal answer auto
}
EOF
)

# Now use the variable in your command
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.
12 changes: 12 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ variables:
default: ""
- name: NGINX_EXTRA_PORTS
default: "[]"
- name: COREDNS_OVERRIDES
default: |
rewrite stop {
name regex (.*\.admin\.uds\.dev) admin-ingressgateway.istio-admin-gateway.svc.cluster.local answer auto
}
rewrite stop {
name regex (.*\.uds\.dev) tenant-ingressgateway.istio-tenant-gateway.svc.cluster.local answer auto
}
rewrite stop {
name regex (.*\.uds\.dev) host.k3d.internal answer auto
}
tasks:
- name: default
Expand All @@ -21,6 +32,7 @@ tasks:
--set K3D_IMAGE=${IMAGE_NAME}:${VERSION} \
--set K3D_EXTRA_ARGS="${K3D_EXTRA_ARGS}" \
--set NGINX_EXTRA_PORTS="${NGINX_EXTRA_PORTS}" \
--set COREDNS_OVERRIDES="${COREDNS_OVERRIDES}" \
--no-progress --confirm
- name: validate
Expand Down

0 comments on commit 8321dec

Please sign in to comment.