Take another test of NFS

This commit is contained in:
kiloreux 2018-01-12 00:58:59 +01:00
parent 25c1b78e9d
commit 367ba5a8b3
No known key found for this signature in database
GPG Key ID: 8B81EA3FA91EB758
3 changed files with 20 additions and 18 deletions

14
.infra/kube/nfs.yaml Normal file
View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-tusd
namespace: tus
spec:
capacity:
storage: 20Gi
accessModes:
- ReadWriteMany
nfs:
# FIXME: use the right IP
server: NFS_SERVER_IP
path: "/"

View File

@ -1,17 +1,3 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-tusd
namespace: tus
spec:
capacity:
storage: 50Gi
accessModes:
- ReadWriteMany
nfs:
server: NFS_SERVER_IP
path: "/tusd"
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
@ -23,7 +9,7 @@ spec:
storageClassName: "" storageClassName: ""
resources: resources:
requests: requests:
storage: 50Gi storage: 20Gi
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
@ -58,8 +44,8 @@ spec:
ports: ports:
- containerPort: 8080 - containerPort: 8080
securityContext: securityContext:
runAsUser: 1000 runAsUser: 0
fsGroup: 1000 fsGroup: 0
volumeMounts: volumeMounts:
- name: tusd-disk - name: tusd-disk
mountPath: /srv/tusd-data mountPath: /srv/tusd-data

View File

@ -30,7 +30,9 @@ 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 sed -i "s#NFS_SERVER_IP#${NFS_SERVER_IP}#" ./.infra/kube/nfs.yaml
kubectl apply -f "${__root}/.infra/kube/nfs.yaml"
sleep 10s # This cost me some precious debugging time.
kubectl apply --validate=false -f "${__root}/.infra/kube/tusd-kube.yaml" kubectl apply --validate=false -f "${__root}/.infra/kube/tusd-kube.yaml"