From 9053d4babc2be3a39f8ed1d05843b01e690479ff Mon Sep 17 00:00:00 2001 From: Thomas Perronin Date: Sun, 15 Dec 2024 19:42:11 +0100 Subject: [PATCH] feat(ingress-nas-pihole): add ingress --- .../external-svc/svc/kustomization.yaml | 1 - .../apps/network/external-svc/svc/nas.yaml | 21 +++++++++++++++ .../apps/network/external-svc/svc/octopi.yaml | 26 ------------------- .../apps/network/external-svc/svc/pihole.yaml | 21 +++++++++++++++ 4 files changed, 42 insertions(+), 27 deletions(-) delete mode 100644 kubernetes/apps/network/external-svc/svc/octopi.yaml diff --git a/kubernetes/apps/network/external-svc/svc/kustomization.yaml b/kubernetes/apps/network/external-svc/svc/kustomization.yaml index 654ea215..18949ec5 100644 --- a/kubernetes/apps/network/external-svc/svc/kustomization.yaml +++ b/kubernetes/apps/network/external-svc/svc/kustomization.yaml @@ -4,5 +4,4 @@ kind: Kustomization namespace: network resources: - ./nas.yaml - - ./octopi.yaml - ./pihole.yaml diff --git a/kubernetes/apps/network/external-svc/svc/nas.yaml b/kubernetes/apps/network/external-svc/svc/nas.yaml index 87c5562d..b86bb06e 100644 --- a/kubernetes/apps/network/external-svc/svc/nas.yaml +++ b/kubernetes/apps/network/external-svc/svc/nas.yaml @@ -1,4 +1,25 @@ --- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: nas + namespace: network + annotations: + external-dns.alpha.kubernetes.io/target: internal.${SECRET_DOMAIN} +spec: + ingressClassName: internal + rules: + - host: nas.${SECRET_DOMAIN} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: nas + port: + number: 443 +--- apiVersion: v1 kind: Service metadata: diff --git a/kubernetes/apps/network/external-svc/svc/octopi.yaml b/kubernetes/apps/network/external-svc/svc/octopi.yaml deleted file mode 100644 index 420c7389..00000000 --- a/kubernetes/apps/network/external-svc/svc/octopi.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: octopi - namespace: network - labels: - app: octopi -spec: - ports: - - protocol: TCP - port: 80 - targetPort: 80 ---- -apiVersion: v1 -kind: Endpoints -metadata: - name: octopi - namespace: network - labels: - app: octopi -subsets: - - addresses: - - ip: 192.168.10.80 - ports: - - port: 80 diff --git a/kubernetes/apps/network/external-svc/svc/pihole.yaml b/kubernetes/apps/network/external-svc/svc/pihole.yaml index b3cc8e67..060be643 100644 --- a/kubernetes/apps/network/external-svc/svc/pihole.yaml +++ b/kubernetes/apps/network/external-svc/svc/pihole.yaml @@ -1,4 +1,25 @@ --- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: pihole + namespace: network + annotations: + external-dns.alpha.kubernetes.io/target: internal.${SECRET_DOMAIN} +spec: + ingressClassName: internal + rules: + - host: pihole.${SECRET_DOMAIN} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: pihole + port: + number: 80 +--- apiVersion: v1 kind: Service metadata: