From ec235efdfc3e109a4d4bb1a898cdb5287118d150 Mon Sep 17 00:00:00 2001 From: andrey-zh <87668873+andrey-zh@users.noreply.github.com> Date: Fri, 13 Aug 2021 14:10:14 +0300 Subject: [PATCH] Add files via upload --- postgres-deploy.yaml | 34 ++++++++++++++++++++++++++++++++++ postgres-service.yaml | 14 ++++++++++++++ redis-deploy.yaml | 29 +++++++++++++++++++++++++++++ redis-service.yaml | 14 ++++++++++++++ result-app-deploy.yaml | 29 +++++++++++++++++++++++++++++ result-app-service.yaml | 16 ++++++++++++++++ voting-app-deploy.yaml | 29 +++++++++++++++++++++++++++++ voting-app-service.yaml | 16 ++++++++++++++++ worker-app-deploy.yaml | 27 +++++++++++++++++++++++++++ 9 files changed, 208 insertions(+) create mode 100644 postgres-deploy.yaml create mode 100644 postgres-service.yaml create mode 100644 redis-deploy.yaml create mode 100644 redis-service.yaml create mode 100644 result-app-deploy.yaml create mode 100644 result-app-service.yaml create mode 100644 voting-app-deploy.yaml create mode 100644 voting-app-service.yaml create mode 100644 worker-app-deploy.yaml diff --git a/postgres-deploy.yaml b/postgres-deploy.yaml new file mode 100644 index 0000000..14c06e7 --- /dev/null +++ b/postgres-deploy.yaml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres-deploy + labels: + name: postgres-deploy + app: demo-voting-app +spec: + replicas: 1 + selector: + matchLabels: + name: postgres-pod + app: demo-voting-app + template: + metadata: + name: postgres-pod + labels: + name: postgres-pod + app: demo-voting-app + spec: + containers: + - name: postgres + image: postgres + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 5432 + env: + - name: POSTGRES_USER + value: "postgres" + - name: POSTGRES_PASSWORD + value: "postgres" \ No newline at end of file diff --git a/postgres-service.yaml b/postgres-service.yaml new file mode 100644 index 0000000..145a65c --- /dev/null +++ b/postgres-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: db + labels: + name: postgres-service + app: demo-voting-app +spec: + selector: + name: postgres-pod + app: demo-voting-app + ports: + - port: 5432 + targetPort: 5432 \ No newline at end of file diff --git a/redis-deploy.yaml b/redis-deploy.yaml new file mode 100644 index 0000000..5d00b7e --- /dev/null +++ b/redis-deploy.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis-deploy + labels: + name: redis-pod + app: demo-voting-app +spec: + replicas: 1 + selector: + matchLabels: + name: redis-pod + app: demo-voting-app + template: + metadata: + name: redis-pod + labels: + name: redis-pod + app: demo-voting-app + spec: + containers: + - name: redis + image: redis + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 6379 \ No newline at end of file diff --git a/redis-service.yaml b/redis-service.yaml new file mode 100644 index 0000000..19edacb --- /dev/null +++ b/redis-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis + labels: + name: redis-service + app: demo-voting-app +spec: + selector: + name: redis-pod + app: demo-voting-app + ports: + - port: 6379 + targetPort: 6379 diff --git a/result-app-deploy.yaml b/result-app-deploy.yaml new file mode 100644 index 0000000..64fb2f7 --- /dev/null +++ b/result-app-deploy.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: result-app-deploy + labels: + name: result-app-deploy + app: demo-voting-app +spec: + replicas: 1 + selector: + matchLabels: + name: result-app-pod + app: demo-voting-app + template: + metadata: + name: result-app-pod + labels: + name: result-app-pod + app: demo-voting-app + spec: + containers: + - name: result-app-pod + image: kodekloud/examplevotingapp_result:v1 + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 80 \ No newline at end of file diff --git a/result-app-service.yaml b/result-app-service.yaml new file mode 100644 index 0000000..35922ec --- /dev/null +++ b/result-app-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: result-service + labels: + name: result-service + app: demo-voting-app +spec: + type: NodePort + selector: + name: result-app-pod + app: demo-voting-app + ports: + - port: 80 + targetPort: 80 + nodePort: 30005 \ No newline at end of file diff --git a/voting-app-deploy.yaml b/voting-app-deploy.yaml new file mode 100644 index 0000000..f1a449e --- /dev/null +++ b/voting-app-deploy.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: voting-app-deploy + labels: + name: voting-app-deploy + app: demo-voting-app +spec: + replicas: 1 + selector: + matchLabels: + name: voting-app-pod + app: demo-voting-app + template: + metadata: + name: voting-app-pod + labels: + name: voting-app-pod + app: demo-voting-app + spec: + containers: + - name: voting-app + image: kodekloud/examplevotingapp_vote:v1 + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 80 \ No newline at end of file diff --git a/voting-app-service.yaml b/voting-app-service.yaml new file mode 100644 index 0000000..100c383 --- /dev/null +++ b/voting-app-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: voting-service + labels: + name: voting-service + app: demo-voting-app +spec: + type: NodePort + selector: + name: voting-app-pod + app: demo-voting-app + ports: + - port: 80 + targetPort: 80 + nodePort: 30004 \ No newline at end of file diff --git a/worker-app-deploy.yaml b/worker-app-deploy.yaml new file mode 100644 index 0000000..cd6dfea --- /dev/null +++ b/worker-app-deploy.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: worker-app-deploy + labels: + name: worker-app-deploy + app: demo-voting-app +spec: + replicas: 1 + selector: + matchLabels: + name: worker-app-pod + app: demo-voting-app + template: + metadata: + name: worker-app-pod + labels: + name: worker-app-pod + app: demo-voting-app + spec: + containers: + - name: worker-app + image: kodekloud/examplevotingapp_worker:v1 + resources: + limits: + memory: "128Mi" + cpu: "500m" \ No newline at end of file