From 8321dec6332862f1632a465faa885a52b16aafad Mon Sep 17 00:00:00 2001 From: Justin Law Date: Fri, 27 Sep 2024 13:58:15 -0400 Subject: [PATCH] docs and tasks update --- docs/DNS.md | 15 +++++++++++++++ tasks.yaml | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docs/DNS.md b/docs/DNS.md index 5e9f9bf..e3353c5 100644 --- a/docs/DNS.md +++ b/docs/DNS.md @@ -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. diff --git a/tasks.yaml b/tasks.yaml index 00fb80c..6404a23 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -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 @@ -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