Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-zh authored Aug 13, 2021
0 parents commit ec235ef
Show file tree
Hide file tree
Showing 9 changed files with 208 additions and 0 deletions.
34 changes: 34 additions & 0 deletions postgres-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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"
14 changes: 14 additions & 0 deletions postgres-service.yaml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions redis-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions redis-service.yaml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions result-app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions result-app-service.yaml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions voting-app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions voting-app-service.yaml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions worker-app-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit ec235ef

Please sign in to comment.