Added NFS support for easier blue/green deployments
This commit is contained in:
parent
baceec15ed
commit
6795bd7669
|
@ -1,15 +1,30 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: tusd
|
name: nfs-tusd
|
||||||
namespace: tus
|
namespace: tusd
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 50Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
nfs:
|
||||||
|
server: NFS_SERVER_IP
|
||||||
|
path: "/tusd"
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: nfs-tusd
|
||||||
|
namespace: tusd
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteMany
|
||||||
|
storageClassName: ""
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 50Gi
|
storage: 50Gi
|
||||||
storageClassName: standard
|
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
@ -22,7 +37,7 @@ spec:
|
||||||
strategy:
|
strategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxSurge: 1
|
maxSurge: 2
|
||||||
maxUnavailable: 0
|
maxUnavailable: 0
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -52,7 +67,7 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: tusd-disk
|
- name: tusd-disk
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: tusd
|
claimName: nfs-tusd
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|
|
@ -30,7 +30,7 @@ kubectl config set-credentials travis --token=$SA_TOKEN
|
||||||
kubectl config set-context travis --cluster=$CLUSTER_NAME --user=travis --namespace=tus
|
kubectl config set-context travis --cluster=$CLUSTER_NAME --user=travis --namespace=tus
|
||||||
kubectl config use-context travis
|
kubectl config use-context travis
|
||||||
|
|
||||||
|
sed -i 's#NFS_SERVER_IP#${NFS_SERVER_IP}#' ./.infra/kube/*.yaml
|
||||||
kubectl apply --validate=false -f "${__root}/.infra/kube/tusd-kube.yaml"
|
kubectl apply --validate=false -f "${__root}/.infra/kube/tusd-kube.yaml"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue