Commit bb4cd385 authored by Luc Bourdot's avatar Luc Bourdot
Browse files

Merge branch 'loadbalancer' into 'master'

euser, mongo volumes

See merge request !7
parents a49a1035 92ea7d84
kind: Deployment
apiVersion: extensions/v1beta1 # for versions before 1.9.0 use apps/v1beta2
metadata:
name: e-user
labels:
service: e-user
spec:
replicas: 1
strategy: {}
selector:
matchLabels:
service: e-user
replicas: 1 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
service: e-user
spec:
containers:
- env:
- name: MONGODB_URI
value: mongodb://mongodb/dbu
name: e-user
image: luceole/e-user-prod:0.5.5
ports:
- containerPort: 8080
name: e-user
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /usr/src/app/server/config
name: e-user
volumes:
- name: e-user
persistentVolumeClaim:
claimName: e-user
---
kind: Service
apiVersion: v1
metadata:
name: e-user
spec:
type: NodePort
selector:
service: e-user
ports:
- port: 80
targetPort: 8080
protocol: TCP
type: LoadBalancer
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: e-user
spec:
capacity:
storage: 500Mi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /tmp/euser
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- matthieu-pc
---
# Persistent Volume Claim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: e-user
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storageClassName: local-storage
status: {}
......@@ -33,6 +33,11 @@ spec:
name: mongodb
protocol: TCP
resources: {}
volumeMounts:
- mountPath: /data/db
name: mongodb-data
- mountPath: /backup
name: mongodb-save
volumes:
- name: mongodb-data
persistentVolumeClaim:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment