Skip to content

update Kubernetes manifests to app/v1 and yaml parity #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions k8s-specifications/db-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: db
name: db
namespace: vote
spec:
replicas: 1
selector:
matchLabels:
app: db
template:
metadata:
labels:
app: db
spec:
containers:
- image: postgres:9.4
name: db
name: postgres
ports:
- containerPort: 5432
name: postgres
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: db-data
Expand Down
5 changes: 4 additions & 1 deletion k8s-specifications/db-service.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: db
name: db
namespace: vote
spec:
type: ClusterIP
ports:
- port: 5432
- name: "db-service"
port: 5432
targetPort: 5432
selector:
app: db
Expand Down
10 changes: 9 additions & 1 deletion k8s-specifications/redis-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: redis
name: redis
namespace: vote
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
Expand All @@ -13,6 +18,9 @@ spec:
containers:
- image: redis:alpine
name: redis
ports:
- containerPort: 6379
name: redis
volumeMounts:
- mountPath: /data
name: redis-data
Expand Down
5 changes: 4 additions & 1 deletion k8s-specifications/redis-service.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: redis
name: redis
namespace: vote
spec:
type: ClusterIP
ports:
- port: 6379
- name: "redis-service"
port: 6379
targetPort: 6379
selector:
app: redis
Expand Down
10 changes: 9 additions & 1 deletion k8s-specifications/result-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: result
name: result
namespace: vote
spec:
replicas: 1
selector:
matchLabels:
app: result
template:
metadata:
labels:
Expand All @@ -13,3 +18,6 @@ spec:
containers:
- image: dockersamples/examplevotingapp_result:before
name: result
ports:
- containerPort: 80
name: result
2 changes: 2 additions & 0 deletions k8s-specifications/result-service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: result
name: result
namespace: vote
spec:
Expand Down
10 changes: 9 additions & 1 deletion k8s-specifications/vote-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: vote
name: vote
namespace: vote
spec:
replicas: 1
selector:
matchLabels:
app: vote
template:
metadata:
labels:
Expand All @@ -13,3 +18,6 @@ spec:
containers:
- image: dockersamples/examplevotingapp_vote:before
name: vote
ports:
- containerPort: 80
name: vote
2 changes: 2 additions & 0 deletions k8s-specifications/vote-service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: vote
name: vote
namespace: vote
spec:
Expand Down
7 changes: 6 additions & 1 deletion k8s-specifications/worker-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: worker
name: worker
namespace: vote
spec:
replicas: 1
selector:
matchLabels:
app: db
template:
metadata:
labels:
Expand Down
104 changes: 57 additions & 47 deletions kube-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# redis
---
apiVersion: v1
kind: Service
Expand All @@ -8,23 +9,23 @@ metadata:
spec:
clusterIP: None
ports:
- name: redis
port: 6379
targetPort: 6379
- name: redis-service
port: 6379
targetPort: 6379
selector:
app: redis
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
replicas: 1
template:
metadata:
labels:
Expand All @@ -37,6 +38,7 @@ spec:
- containerPort: 6379
name: redis

# db
---
apiVersion: v1
kind: Service
Expand All @@ -47,43 +49,44 @@ metadata:
spec:
clusterIP: None
ports:
-
name: db
port: 5432
targetPort: 5432
- name: db
port: 5432
targetPort: 5432
selector:
app: db
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: db
# labels:
# app: db
labels:
app: db
spec:
replicas: 1
selector:
matchLabels:
app: db
template:
metadata:
labels:
app: db
spec:
containers:
-
- name: db
image: postgres:9.4
env:
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
ports:
- containerPort: 5432
name: db
image: postgres:9.4
env:
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
ports:
- containerPort: 5432
name: db
volumeMounts:
- name: db-data
mountPath: /var/lib/postgresql/data
volumes:
volumeMounts:
- name: db-data
persistentVolumeClaim:
claimName: postgres-pv-claim

mountPath: /var/lib/postgresql/data
volumes:
- name: db-data
persistentVolumeClaim:
claimName: postgres-pv-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
Expand All @@ -96,6 +99,7 @@ spec:
requests:
storage: 1Gi

# result
---
apiVersion: v1
kind: Service
Expand All @@ -106,22 +110,23 @@ metadata:
spec:
type: LoadBalancer
ports:
-
port: 5001
targetPort: 80
name: result
- port: 5001
targetPort: 80
name: result-service
selector:
app: result
# clusterIP: None
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: result
labels:
app: result
spec:
replicas: 1
selector:
matchLabels:
app: result
template:
metadata:
labels:
Expand All @@ -134,6 +139,7 @@ spec:
- containerPort: 80
name: result

# vote
---
apiVersion: v1
kind: Service
Expand All @@ -146,32 +152,34 @@ spec:
ports:
- port: 5000
targetPort: 80
name: vote
name: vote-service
selector:
app: vote
# clusterIP: None
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: vote
labels:
app: vote
spec:
replicas: 2
selector:
matchLabels:
app: vote
template:
metadata:
labels:
app: vote
spec:
containers:
- name: vote
image: dockersamples/examplevotingapp_vote:before
ports:
-
containerPort: 80
name: vote
- name: vote
image: dockersamples/examplevotingapp_vote:before
ports:
- containerPort: 80
name: vote

# worker
---
apiVersion: v1
kind: Service
Expand All @@ -184,20 +192,22 @@ spec:
selector:
app: worker
---
apiVersion: apps/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: worker
name: worker
spec:
replicas: 1
selector:
matchLabels:
app: worker
template:
metadata:
labels:
app: worker
spec:
containers:
-
image: dockersamples/examplevotingapp_worker
name: worker
- image: dockersamples/examplevotingapp_worker
name: worker