Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #911 from wongma7/leader-election-nfs-e2e
Browse files Browse the repository at this point in the history
Revamp nfs e2e tests to fork k8s instead of vendoring it and use yamls
  • Loading branch information
wongma7 authored Aug 13, 2018
2 parents aa3e3c0 + 5fde0d3 commit 88a48d8
Show file tree
Hide file tree
Showing 19 changed files with 282 additions and 1,457 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ env:
- TEST_SUITE=osx
- TEST_SUITE=linux-local-volume
- TEST_SUITE=linux-everything-else
- TEST_SUITE=linux-nfs ETCD_VER=v3.0.14 KUBE_VERSION=1.5.4
- TEST_SUITE=linux-nfs ETCD_VER=v3.0.17 KUBE_VERSION=1.6.0
# - TEST_SUITE=linux-nfs ETCD_VER=v3.0.14 KUBE_VERSION=1.5.4
- TEST_SUITE=linux-nfs ETCD_VER=v3.2.18 KUBE_VERSION=1.11.2

before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then ulimit -n 8192; fi
Expand Down
1 change: 0 additions & 1 deletion ceph/cephfs/deploy/rbac/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cephfs-provisioner
namespace: cephfs
subjects:
- kind: ServiceAccount
name: cephfs-provisioner
Expand Down
1 change: 0 additions & 1 deletion digitalocean/manifests/rbac/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: digitalocean-provisioner
namespace: kube-system
subjects:
- kind: ServiceAccount
name: digitalocean-provisioner
Expand Down
3 changes: 1 addition & 2 deletions nfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ test:
.PHONY: test

test-e2e:
cd ./test/e2e; glide install -v
go test ./test/e2e -v --kubeconfig=$(HOME)/.kube/config
cd ./test/e2e; ./test.sh
.PHONY: test-e2e

clean:
Expand Down
2 changes: 2 additions & 0 deletions nfs/deploy/kubernetes/class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ apiVersion: storage.k8s.io/v1
metadata:
name: example-nfs
provisioner: example.com/nfs
parameters:
mountOptions: "vers=4.1" # TODO: reconcile with StorageClass.mountOptions
2 changes: 1 addition & 1 deletion nfs/deploy/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
app: nfs-provisioner
---
kind: Deployment
apiVersion: extensions/v1beta1
apiVersion: extensions/v1
metadata:
name: nfs-provisioner
spec:
Expand Down
1 change: 0 additions & 1 deletion nfs/deploy/kubernetes/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: run-nfs-provisioner
namespace: default
subjects:
- kind: ServiceAccount
name: nfs-provisioner
Expand Down
22 changes: 22 additions & 0 deletions nfs/deploy/kubernetes/read-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kind: Pod
apiVersion: v1
metadata:
name: read-pod
spec:
containers:
- name: read-pod
image: gcr.io/google_containers/busybox:1.24
command:
- "/bin/sh"
args:
- "-c"
- "test -f /mnt/SUCCESS && exit 0 || exit 1"
volumeMounts:
- name: nfs-pvc
mountPath: "/mnt"
restartPolicy: "Never"
volumes:
- name: nfs-pvc
persistentVolumeClaim:
claimName: nfs

9 changes: 5 additions & 4 deletions nfs/deploy/kubernetes/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@ spec:
app: nfs-provisioner
---
kind: StatefulSet
apiVersion: apps/v1beta1
apiVersion: apps/v1
metadata:
name: nfs-provisioner
spec:
selector:
matchLabels:
app: nfs-provisioner
serviceName: "nfs-provisioner"
replicas: 1
template:
metadata:
labels:
app: nfs-provisioner
annotations:
pod.alpha.kubernetes.io/initialized: "true"
spec:
serviceAccount: nfs-provisioner
terminationGracePeriodSeconds: 0
terminationGracePeriodSeconds: 10
containers:
- name: nfs-provisioner
image: quay.io/kubernetes_incubator/nfs-provisioner:latest
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions nfs/test/e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor
/src
35 changes: 0 additions & 35 deletions nfs/test/e2e/e2e_suite_test.go

This file was deleted.

Loading

0 comments on commit 88a48d8

Please sign in to comment.