From 555871bbeee64985493f848b15a581683dced24b Mon Sep 17 00:00:00 2001 From: Steffen Illium Date: Fri, 29 Mar 2024 20:47:19 +0100 Subject: [PATCH] traefik dualstack services --- .../03-traefik/base/traefik-service.yaml | 17 --------------- .../overlay-external/kustomization.yaml | 3 ++- .../traefik-service-patch.yaml} | 3 +-- .../patches/traefik-service-patch.yaml | 21 +++++++++++++++++++ 4 files changed, 24 insertions(+), 20 deletions(-) rename infrastructure/03-traefik/overlay-external/{traefik-service.yaml => patches/traefik-service-patch.yaml} (95%) create mode 100644 infrastructure/03-traefik/overlay-internal/patches/traefik-service-patch.yaml diff --git a/infrastructure/03-traefik/base/traefik-service.yaml b/infrastructure/03-traefik/base/traefik-service.yaml index c148ea6..d426944 100644 --- a/infrastructure/03-traefik/base/traefik-service.yaml +++ b/infrastructure/03-traefik/base/traefik-service.yaml @@ -4,21 +4,4 @@ metadata: name: traefik namespace: traefik spec: - loadBalancerIP: 192.168.178.102 - ports: - - name: web - port: 80 - protocol: TCP - targetPort: web - - name: websecure - port: 443 - protocol: TCP - targetPort: websecure - - name: dns - port: 53 - protocol: UDP - targetPort: dns - selector: - app.kubernetes.io/instance: lcl-default - app.kubernetes.io/name: traefik type: LoadBalancer diff --git a/infrastructure/03-traefik/overlay-external/kustomization.yaml b/infrastructure/03-traefik/overlay-external/kustomization.yaml index 6d90fe1..3dce799 100644 --- a/infrastructure/03-traefik/overlay-external/kustomization.yaml +++ b/infrastructure/03-traefik/overlay-external/kustomization.yaml @@ -7,12 +7,13 @@ namePrefix: front- resources: #### OVERLAYS for internal traefik only - + ### Traefik base - ../base patches: + - path: patches/traefik-service-patch.yaml - path: patches/traefik-deployment-patch.yaml - path: patches/nodeselector.yaml target: diff --git a/infrastructure/03-traefik/overlay-external/traefik-service.yaml b/infrastructure/03-traefik/overlay-external/patches/traefik-service-patch.yaml similarity index 95% rename from infrastructure/03-traefik/overlay-external/traefik-service.yaml rename to infrastructure/03-traefik/overlay-external/patches/traefik-service-patch.yaml index 4db1181..a104d14 100644 --- a/infrastructure/03-traefik/overlay-external/traefik-service.yaml +++ b/infrastructure/03-traefik/overlay-external/patches/traefik-service-patch.yaml @@ -4,6 +4,7 @@ metadata: name: traefik namespace: traefik spec: + type: NodePort ports: - name: web port: 80 @@ -20,5 +21,3 @@ spec: protocol: UDP targetPort: dns nodeport: 53 - - diff --git a/infrastructure/03-traefik/overlay-internal/patches/traefik-service-patch.yaml b/infrastructure/03-traefik/overlay-internal/patches/traefik-service-patch.yaml new file mode 100644 index 0000000..a765bc4 --- /dev/null +++ b/infrastructure/03-traefik/overlay-internal/patches/traefik-service-patch.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: traefik + namespace: traefik +spec: + loadBalancerIP: 192.168.178.2 + type: LoadBalancer + ports: + - name: web + port: 80 + protocol: TCP + targetPort: web + - name: websecure + port: 443 + protocol: TCP + targetPort: websecure + - name: dns + port: 53 + protocol: UDP + targetPort: dns