Skip to content

Commit

Permalink
Updated kubernetes deployment
Browse files Browse the repository at this point in the history
- No of replicas to 1
- Always pull the images
- Add Reviews v2 Deployment
  • Loading branch information
hossambarakat committed Feb 8, 2019
1 parent 46755d3 commit ed772c1
Showing 1 changed file with 48 additions and 9 deletions.
57 changes: 48 additions & 9 deletions kubernetes/all.yaml → kubernetes/espresso-shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ apiVersion: apps/v1
metadata:
name: espresso-shop-web
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: espresso-shop-web
template:
metadata:
labels:
app: espresso-shop-web
version: v1
spec:
containers:
- image: hossambarakat/espresso-shop-web
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
name: espresso-shop-web
ports:
- containerPort: 80
Expand All @@ -39,6 +40,7 @@ spec:
ports:
- port: 8090
targetPort: 80
name: http
---
###############################################
## Espresso Shop Product Catalog
Expand All @@ -48,18 +50,19 @@ apiVersion: apps/v1
metadata:
name: espresso-shop-product-catalog
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: espresso-shop-product-catalog
template:
metadata:
labels:
app: espresso-shop-product-catalog
version: v1
spec:
containers:
- image: hossambarakat/espresso-shop-product-catalog
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
name: espresso-shop-product-catalog
ports:
- containerPort: 80
Expand All @@ -76,31 +79,37 @@ spec:
ports:
- port: 8091
targetPort: 80
name: http
###############################################
## Espresso Shop Reviews
## Espresso Shop Reviews V1
###############################################
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: espresso-shop-reviews
name: espresso-shop-reviews-v1
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
app: espresso-shop-reviews
version: v1
template:
metadata:
labels:
app: espresso-shop-reviews
version: v1
spec:
containers:
- image: hossambarakat/espresso-shop-reviews
imagePullPolicy: IfNotPresent
imagePullPolicy: Always
name: espresso-shop-reviews
ports:
- containerPort: 80
name: http
env:
- name: SERVICE_VERSION
value: "v1"
---
kind: Service
apiVersion: v1
Expand All @@ -113,4 +122,34 @@ spec:
ports:
- port: 8092
targetPort: 80
name: external
name: http
###############################################
## Espresso Shop Reviews V2
###############################################
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: espresso-shop-reviews-v2
spec:
replicas: 1
selector:
matchLabels:
app: espresso-shop-reviews
version: v2
template:
metadata:
labels:
app: espresso-shop-reviews
version: v2
spec:
containers:
- image: hossambarakat/espresso-shop-reviews
imagePullPolicy: Always
name: espresso-shop-reviews
ports:
- containerPort: 80
name: http
env:
- name: SERVICE_VERSION
value: "v2"

0 comments on commit ed772c1

Please sign in to comment.