diff --git a/pkg/build/templates/coredns/cm-coredns-default.yaml.tmpl b/pkg/build/templates/coredns/cm-coredns-default.yaml.tmpl index 3b3f5a88..5c9f0f3f 100644 --- a/pkg/build/templates/coredns/cm-coredns-default.yaml.tmpl +++ b/pkg/build/templates/coredns/cm-coredns-default.yaml.tmpl @@ -5,9 +5,12 @@ metadata: namespace: kube-system data: default.conf: | - # subdomain names resolves to ingress IP. e.g. gitea.cnoe.localtest.me becomes ingress-nginx-controller.ingress-nginx.svc.cluster.local + # Goal: Rewrite rules for in-cluster access to a service: gitea, argocd, etc using the same FQDN as for external access + + # subdomain names e.g. gitea.cnoe.localtest.me resolves to the IP address of the kubernetes ingress service and then will become ingress-nginx-controller.ingress-nginx.svc.cluster.local rewrite stop { - name regex (.*).{{ .Host }} ingress-nginx-controller.ingress-nginx.svc.cluster.local + name regex (.*).{{ .Host }} ingress-nginx-controller.ingress-nginx.svc.cluster.local answer auto } - # host name resolves to ingress IP + + # host name resolves to the IP address of the kubernetes ingress service rewrite name exact {{ .Host }} ingress-nginx-controller.ingress-nginx.svc.cluster.local