From 559ebe0476cdf266e883190ca92b114ea6c19270 Mon Sep 17 00:00:00 2001 From: Ashley Felton Date: Thu, 7 Dec 2023 11:29:26 +0800 Subject: [PATCH] Created Kustomize prod overlay definitions. --- kustomize/overlays/prod/deployment_patch.yaml | 26 +++++++++++++++++++ kustomize/overlays/prod/ingress.yaml | 17 ++++++++++++ kustomize/overlays/prod/kustomization.yaml | 21 +++++++++++++++ kustomize/overlays/prod/pdb.yaml | 10 +++++++ kustomize/overlays/prod/service_patch.yaml | 9 +++++++ 5 files changed, 83 insertions(+) create mode 100644 kustomize/overlays/prod/deployment_patch.yaml create mode 100644 kustomize/overlays/prod/ingress.yaml create mode 100644 kustomize/overlays/prod/kustomization.yaml create mode 100644 kustomize/overlays/prod/pdb.yaml create mode 100644 kustomize/overlays/prod/service_patch.yaml diff --git a/kustomize/overlays/prod/deployment_patch.yaml b/kustomize/overlays/prod/deployment_patch.yaml new file mode 100644 index 0000000..c92cc5c --- /dev/null +++ b/kustomize/overlays/prod/deployment_patch.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mapproxy-deployment + labels: + app: mapproxy-prod +spec: + selector: + matchLabels: + app: mapproxy-prod + template: + metadata: + labels: + app: mapproxy-prod + spec: + containers: + - name: mapproxy + volumeMounts: + - mountPath: /app/config + name: mapproxy-configmap + volumes: + - configMap: + name: mapproxy-configmap-prod + defaultMode: 292 + optional: false + name: mapproxy-configmap diff --git a/kustomize/overlays/prod/ingress.yaml b/kustomize/overlays/prod/ingress.yaml new file mode 100644 index 0000000..b99a2bb --- /dev/null +++ b/kustomize/overlays/prod/ingress.yaml @@ -0,0 +1,17 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: mapproxy-ingress +spec: + ingressClassName: nginx + rules: + - host: mapproxy.dbca.wa.gov.au + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: mapproxy-clusterip-prod + port: + number: 8080 diff --git a/kustomize/overlays/prod/kustomization.yaml b/kustomize/overlays/prod/kustomization.yaml new file mode 100644 index 0000000..7a20dd7 --- /dev/null +++ b/kustomize/overlays/prod/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +nameSuffix: -prod +resources: + - ../../base + - ingress.yaml + - pdb.yaml +labels: + - includeSelectors: true + pairs: + variant: prod +images: + - name: ghcr.io/dbca-wa/mapproxy + newTag: 1.16.0 +patches: + - path: deployment_patch.yaml + - path: service_patch.yaml +configMapGenerator: + - name: mapproxy-configmap + files: + - mapproxy.yaml diff --git a/kustomize/overlays/prod/pdb.yaml b/kustomize/overlays/prod/pdb.yaml new file mode 100644 index 0000000..2c662d2 --- /dev/null +++ b/kustomize/overlays/prod/pdb.yaml @@ -0,0 +1,10 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: mapproxy-pdb +spec: + minAvailable: 1 + selector: + matchLabels: + app: mapproxy-prod + variant: prod diff --git a/kustomize/overlays/prod/service_patch.yaml b/kustomize/overlays/prod/service_patch.yaml new file mode 100644 index 0000000..f1a5d43 --- /dev/null +++ b/kustomize/overlays/prod/service_patch.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Service +metadata: + name: mapproxy-clusterip +spec: + type: ClusterIP + selector: + app: mapproxy-prod + variant: prod