Browse Source

Forward DNS via ingress

- Forward UDP DNS requests from maas-ingress to the region pod
  for PXE networks that do not have access to upstream DNS servers.

Change-Id: Icf88bac4c0df1a351a5bd246e3fa8bf28135d37e
Scott Hussey 3 months ago
parent
commit
c7caae59e4

+ 2
- 1
charts/maas/templates/bin/_maas-ingress.sh.tpl View File

@@ -32,7 +32,8 @@ function start () {
32 32
       --ingress-class=maas-ingress \
33 33
       --default-backend-service=${POD_NAMESPACE}/${ERROR_PAGE_SERVICE} \
34 34
       --configmap=${POD_NAMESPACE}/maas-ingress-config \
35
-      --tcp-services-configmap=${POD_NAMESPACE}/maas-ingress-services-tcp
35
+      --tcp-services-configmap=${POD_NAMESPACE}/maas-ingress-services-tcp \
36
+      --udp-services-configmap=${POD_NAMESPACE}/maas-ingress-services-udp
36 37
 }
37 38
 
38 39
 function stop () {

+ 8
- 0
charts/maas/templates/configmap-ingress.yaml View File

@@ -27,6 +27,14 @@ data:
27 27
 ---
28 28
 apiVersion: v1
29 29
 kind: ConfigMap
30
+metadata:
31
+  name: maas-ingress-services-udp
32
+data:
33
+  '53': "{{- .Release.Namespace -}}/{{- tuple "maas_region" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" -}}:region-dns"
34
+...
35
+---
36
+apiVersion: v1
37
+kind: ConfigMap
30 38
 metadata:
31 39
   name: maas-ingress-config
32 40
 data:

+ 3
- 0
charts/maas/templates/service-region.yaml View File

@@ -34,6 +34,9 @@ spec:
34 34
       {{ if .Values.network.region_proxy.node_port.enabled }}
35 35
       nodePort:  {{ tuple "maas_region" "nodeport" "region_proxy" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
36 36
       {{ end }}
37
+    - name: region-dns
38
+      port: 53
39
+      targetPort: 53
37 40
   selector:
38 41
 {{ tuple $envAll "maas" "region" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
39 42
   {{ if or .Values.network.region_proxy.node_port.enabled .Values.network.region_api.node_port.enabled }}

Loading…
Cancel
Save