update to app/v1 and yaml parity
update yaml to current deployment manifest defaults and try for more pairity between kube-deploy.yml and k8s-specifications
This commit is contained in:
parent
1cea6e5bb0
commit
c0e29c622c
@ -1,10 +1,15 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: db
|
||||||
name: db
|
name: db
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: db
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -12,7 +17,10 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: postgres:9.4
|
- image: postgres:9.4
|
||||||
name: db
|
name: postgres
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
name: postgres
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/lib/postgresql/data
|
- mountPath: /var/lib/postgresql/data
|
||||||
name: db-data
|
name: db-data
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: db
|
||||||
name: db
|
name: db
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- port: 5432
|
- name: "db-service"
|
||||||
|
port: 5432
|
||||||
targetPort: 5432
|
targetPort: 5432
|
||||||
selector:
|
selector:
|
||||||
app: db
|
app: db
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
name: redis
|
name: redis
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: redis
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -13,6 +18,9 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- image: redis:alpine
|
- image: redis:alpine
|
||||||
name: redis
|
name: redis
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
name: redis
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /data
|
- mountPath: /data
|
||||||
name: redis-data
|
name: redis-data
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: redis
|
||||||
name: redis
|
name: redis
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- port: 6379
|
- name: "redis-service"
|
||||||
|
port: 6379
|
||||||
targetPort: 6379
|
targetPort: 6379
|
||||||
selector:
|
selector:
|
||||||
app: redis
|
app: redis
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: result
|
||||||
name: result
|
name: result
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: result
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -13,3 +18,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- image: dockersamples/examplevotingapp_result:before
|
- image: dockersamples/examplevotingapp_result:before
|
||||||
name: result
|
name: result
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: result
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: result
|
||||||
name: result
|
name: result
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: vote
|
||||||
name: vote
|
name: vote
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: vote
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -13,3 +18,6 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- image: dockersamples/examplevotingapp_vote:before
|
- image: dockersamples/examplevotingapp_vote:before
|
||||||
name: vote
|
name: vote
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: vote
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: vote
|
||||||
name: vote
|
name: vote
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: worker
|
||||||
name: worker
|
name: worker
|
||||||
namespace: vote
|
namespace: vote
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: db
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
# redis
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -8,23 +9,23 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
ports:
|
ports:
|
||||||
- name: redis
|
- name: redis-service
|
||||||
port: 6379
|
port: 6379
|
||||||
targetPort: 6379
|
targetPort: 6379
|
||||||
selector:
|
selector:
|
||||||
app: redis
|
app: redis
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: redis
|
name: redis
|
||||||
labels:
|
labels:
|
||||||
app: redis
|
app: redis
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: redis
|
app: redis
|
||||||
replicas: 1
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -37,6 +38,7 @@ spec:
|
|||||||
- containerPort: 6379
|
- containerPort: 6379
|
||||||
name: redis
|
name: redis
|
||||||
|
|
||||||
|
# db
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -47,43 +49,44 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
clusterIP: None
|
clusterIP: None
|
||||||
ports:
|
ports:
|
||||||
-
|
- name: db
|
||||||
name: db
|
port: 5432
|
||||||
port: 5432
|
targetPort: 5432
|
||||||
targetPort: 5432
|
|
||||||
selector:
|
selector:
|
||||||
app: db
|
app: db
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: db
|
name: db
|
||||||
# labels:
|
labels:
|
||||||
# app: db
|
app: db
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: db
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: db
|
app: db
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
-
|
- name: db
|
||||||
|
image: postgres:9.4
|
||||||
|
env:
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
name: db
|
name: db
|
||||||
image: postgres:9.4
|
volumeMounts:
|
||||||
env:
|
|
||||||
- name: PGDATA
|
|
||||||
value: /var/lib/postgresql/data/pgdata
|
|
||||||
ports:
|
|
||||||
- containerPort: 5432
|
|
||||||
name: db
|
|
||||||
volumeMounts:
|
|
||||||
- name: db-data
|
|
||||||
mountPath: /var/lib/postgresql/data
|
|
||||||
volumes:
|
|
||||||
- name: db-data
|
- name: db-data
|
||||||
persistentVolumeClaim:
|
mountPath: /var/lib/postgresql/data
|
||||||
claimName: postgres-pv-claim
|
volumes:
|
||||||
|
- name: db-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: postgres-pv-claim
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@ -96,6 +99,7 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
storage: 1Gi
|
storage: 1Gi
|
||||||
|
|
||||||
|
# result
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -106,15 +110,13 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
-
|
- port: 5001
|
||||||
port: 5001
|
targetPort: 80
|
||||||
targetPort: 80
|
name: result-service
|
||||||
name: result
|
|
||||||
selector:
|
selector:
|
||||||
app: result
|
app: result
|
||||||
# clusterIP: None
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: result
|
name: result
|
||||||
@ -122,6 +124,9 @@ metadata:
|
|||||||
app: result
|
app: result
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: result
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -134,6 +139,7 @@ spec:
|
|||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
name: result
|
name: result
|
||||||
|
|
||||||
|
# vote
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -146,12 +152,11 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- port: 5000
|
- port: 5000
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
name: vote
|
name: vote-service
|
||||||
selector:
|
selector:
|
||||||
app: vote
|
app: vote
|
||||||
# clusterIP: None
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: vote
|
name: vote
|
||||||
@ -159,19 +164,22 @@ metadata:
|
|||||||
app: vote
|
app: vote
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: vote
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: vote
|
app: vote
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: vote
|
- name: vote
|
||||||
image: dockersamples/examplevotingapp_vote:before
|
image: dockersamples/examplevotingapp_vote:before
|
||||||
ports:
|
ports:
|
||||||
-
|
- containerPort: 80
|
||||||
containerPort: 80
|
name: vote
|
||||||
name: vote
|
|
||||||
|
|
||||||
|
# worker
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@ -184,7 +192,7 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: worker
|
app: worker
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -192,12 +200,14 @@ metadata:
|
|||||||
name: worker
|
name: worker
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: worker
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: worker
|
app: worker
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
-
|
- image: dockersamples/examplevotingapp_worker
|
||||||
image: dockersamples/examplevotingapp_worker
|
name: worker
|
||||||
name: worker
|
|
||||||
|
Loading…
Reference in New Issue
Block a user