diff --git a/deploy/base/ingress.yaml b/deploy/base/ingress.yaml index b22f57169f82a07d9fc04e72da518dcc6cf09eb3..a33be22f08181157de6d107a821c42d425e07a14 100644 --- a/deploy/base/ingress.yaml +++ b/deploy/base/ingress.yaml @@ -8,4 +8,18 @@ metadata: namespace: teckids-website spec: ingressClassName: nginx - rules: [] + rules: + - host: teckids.org + http: + paths: + - backend: + service: + name: teckids-website + port: + number: 80 + path: / + pathType: Prefix + tls: + - hosts: + - teckids.org + secretName: teckids-website-tls diff --git a/deploy/overlays/production/ingress_patch.yaml b/deploy/overlays/production/ingress_patch.yaml deleted file mode 100644 index a7d713b063730a34a6c206898b72519f6a3e2d66..0000000000000000000000000000000000000000 --- a/deploy/overlays/production/ingress_patch.yaml +++ /dev/null @@ -1,102 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - kubernetes.io/tls-acme: "true" - name: teckids-website-caddy - namespace: teckids-website -spec: - ingressClassName: nginx - rules: - - host: teckids.org - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: www.teckids.org - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: hacknsun.camp - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: www.hacknsun.camp - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: hacknfun.camp - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: www.hacknfun.camp - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: teckids.de - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - - host: www.teckids.de - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - tls: - - hosts: - - teckids.org - - www.teckids.org - - hacknsun.camp - - www.hacknsun.camp - - hacknfun.camp - - www.hacknfun.camp - - teckids.de - - www.teckids.de - secretName: teckids-website-tls diff --git a/deploy/overlays/production/kustomization.yaml b/deploy/overlays/production/kustomization.yaml index e5903017ada6000717f739bab73aff5373ec2d2c..e02d0bfd83ce7a06e8c8954a54cdb6ebea4da69f 100644 --- a/deploy/overlays/production/kustomization.yaml +++ b/deploy/overlays/production/kustomization.yaml @@ -8,5 +8,14 @@ commonLabels: app: teckids-website environment: production namespace: teckids-website -patchesStrategicMerge: -- ingress_patch.yaml +patches: +- target: + kind: Ingress + name: teckids-website-caddy + patch: |- + - op: replace + path: /spec/rules/0/host + value: teckids.org + - op: replace + path: /spec/tls/0/hosts/0 + value: teckids.org diff --git a/deploy/overlays/review/ingress_patch.yaml b/deploy/overlays/review/ingress_patch.yaml deleted file mode 100644 index f4e70331c34fad7eb90af4bc46b8c4c8f9f871e0..0000000000000000000000000000000000000000 --- a/deploy/overlays/review/ingress_patch.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - kubernetes.io/tls-acme: "true" - name: teckids-website-caddy - namespace: teckids-website -spec: - ingressClassName: nginx - rules: - - host: __REVIEW_ENVIRONMENT__.staging.teckids.org - http: - paths: - - backend: - service: - name: teckids-website - port: - number: 80 - path: / - pathType: Prefix - tls: - - hosts: - - __REVIEW_ENVIRONMENT__.staging.teckids.org - secretName: __REVIEW_ENVIRONMENT__-teckids-website-tls diff --git a/deploy/overlays/review/kustomization.yaml b/deploy/overlays/review/kustomization.yaml index 549a7e02cf15e709c3d3d5a51621e295a51abbb6..bef5863c410d486c75f88d538a4518957116681b 100644 --- a/deploy/overlays/review/kustomization.yaml +++ b/deploy/overlays/review/kustomization.yaml @@ -1,13 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization bases: - ../../base commonAnnotations: source-repository: https://edugit.org/Teckids/team-pr/teckids.org commonLabels: app: teckids-website - environment: __REVIEW_ENVIRONMENT__ -namePrefix: __REVIEW_ENVIRONMENT__- + environment: production namespace: teckids-website -patchesStrategicMerge: -- ingress_patch.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +patches: +- target: + kind: Ingress + name: teckids-website-caddy + patch: |- + - op: replace + path: /spec/rules/0/host + value: review.teckids.org + - op: replace + path: /spec/tls/0/hosts/0 + value: review.teckids.org