From 62e63910350bc24b83b590b495fa93828773ff9d Mon Sep 17 00:00:00 2001 From: douzeb Date: Wed, 21 Dec 2022 02:00:43 +0100 Subject: [PATCH] kustomize ingress in overlay --- deploy/k8s-poc-demo/base/ingress.yaml | 4 ++-- deploy/k8s-poc-demo/prod/ingress.yaml | 25 +++++++++++++++++++++ deploy/k8s-poc-demo/prod/kustomization.yaml | 1 + 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 deploy/k8s-poc-demo/prod/ingress.yaml diff --git a/deploy/k8s-poc-demo/base/ingress.yaml b/deploy/k8s-poc-demo/base/ingress.yaml index af4c286..4c11f8f 100644 --- a/deploy/k8s-poc-demo/base/ingress.yaml +++ b/deploy/k8s-poc-demo/base/ingress.yaml @@ -9,10 +9,10 @@ metadata: spec: tls: - hosts: - - k8s-poc.distrilab.org + - k8s-poc.example.com secretName: k8s-poc-tls-secret rules: - - host: k8s-poc.distrilab.org + - host: k8s-poc.example.com http: paths: - pathType: Prefix diff --git a/deploy/k8s-poc-demo/prod/ingress.yaml b/deploy/k8s-poc-demo/prod/ingress.yaml new file mode 100644 index 0000000..af4c286 --- /dev/null +++ b/deploy/k8s-poc-demo/prod/ingress.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: k8s-poc-ingress + annotations: + kubernetes.io/ingress.class: "nginx" + #cert-manager.io/issuer: "letsencrypt-staging" +spec: + tls: + - hosts: + - k8s-poc.distrilab.org + secretName: k8s-poc-tls-secret + rules: + - host: k8s-poc.distrilab.org + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: k8s-poc-nginx-service + port: + number: 80 + diff --git a/deploy/k8s-poc-demo/prod/kustomization.yaml b/deploy/k8s-poc-demo/prod/kustomization.yaml index f5d4f25..e556de0 100644 --- a/deploy/k8s-poc-demo/prod/kustomization.yaml +++ b/deploy/k8s-poc-demo/prod/kustomization.yaml @@ -4,3 +4,4 @@ namePrefix: prod- patchesStrategicMerge: - replicas.yaml - resources.yaml +- ingress.yaml