From 5ed2c61dcc7aa66baaaf352bef6337bb4d0e5b66 Mon Sep 17 00:00:00 2001 From: Megha Mehta <76773785+mm2020-ind@users.noreply.github.com> Date: Tue, 2 Mar 2021 16:19:04 +0530 Subject: [PATCH] test changes for overlay --- .../base/guestbook-ui-deployment.yaml | 20 +++++++++++++++++++ .../base/guestbook-ui-svc.yaml | 10 ++++++++++ kustomize-guestbook/base/ingress.yaml | 20 +++++++++++++++++++ kustomize-guestbook/base/kustomization.yaml | 8 ++++++++ .../overlays/prod/kustomization.yaml | 2 +- 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 kustomize-guestbook/base/guestbook-ui-deployment.yaml create mode 100644 kustomize-guestbook/base/guestbook-ui-svc.yaml create mode 100644 kustomize-guestbook/base/ingress.yaml create mode 100644 kustomize-guestbook/base/kustomization.yaml diff --git a/kustomize-guestbook/base/guestbook-ui-deployment.yaml b/kustomize-guestbook/base/guestbook-ui-deployment.yaml new file mode 100644 index 0000000..5688dcf --- /dev/null +++ b/kustomize-guestbook/base/guestbook-ui-deployment.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: guestbook-ui +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app: guestbook-ui + template: + metadata: + labels: + app: guestbook-ui + spec: + containers: + - image: gcr.io/heptio-images/ks-guestbook-demo:0.1 + name: guestbook-ui + ports: + - containerPort: 80 diff --git a/kustomize-guestbook/base/guestbook-ui-svc.yaml b/kustomize-guestbook/base/guestbook-ui-svc.yaml new file mode 100644 index 0000000..e619b5c --- /dev/null +++ b/kustomize-guestbook/base/guestbook-ui-svc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: guestbook-ui +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: guestbook-ui diff --git a/kustomize-guestbook/base/ingress.yaml b/kustomize-guestbook/base/ingress.yaml new file mode 100644 index 0000000..7a96bbf --- /dev/null +++ b/kustomize-guestbook/base/ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: kustomize-guestbook-ingress + namespace: guestbook + labels: + app.kubernetes.io/component: server + app.kubernetes.io/name: guestbook-server + app.kubernetes.io/part-of: guestbook + annotations: + kubernetes.io/ingress.class: traefik +spec: + rules: + - host: kustomize-guestbook-argocd.natwest-labs.com + http: + paths: + - backend: + serviceName: guestbook-ui + servicePort: 80 + path: / \ No newline at end of file diff --git a/kustomize-guestbook/base/kustomization.yaml b/kustomize-guestbook/base/kustomization.yaml new file mode 100644 index 0000000..d22b5c8 --- /dev/null +++ b/kustomize-guestbook/base/kustomization.yaml @@ -0,0 +1,8 @@ +namePrefix: kustomize- + +resources: +- guestbook-ui-deployment.yaml +- guestbook-ui-svc.yaml +- ingress.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization diff --git a/kustomize-guestbook/overlays/prod/kustomization.yaml b/kustomize-guestbook/overlays/prod/kustomization.yaml index 2310c0d..f511d3f 100644 --- a/kustomize-guestbook/overlays/prod/kustomization.yaml +++ b/kustomize-guestbook/overlays/prod/kustomization.yaml @@ -1,3 +1,3 @@ bases: -- ../../ +- ../../base namePrefix: prod-