diff --git a/cluster/images/conformance/README.md b/cluster/images/conformance/README.md index 4e1d7dcff42..c32c84eb00e 100644 --- a/cluster/images/conformance/README.md +++ b/cluster/images/conformance/README.md @@ -32,36 +32,10 @@ $ make push VERSION={target_version} ARCH=s390x If you don't want to push the images, run `make` or `make build` instead -#### How to setup RBAC needed +#### How to run tests ``` -kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=default:default +kubectl create -f conformance-e2e.yaml ``` -#### How to run a single test - -``` -apiVersion: v1 -kind: Pod -metadata: - name: e2e-producer-consumer-test -spec: - containers: - - name: conformance-container - image: staging-k8s.gcr.io/conformance-amd64:v1.12.1 - imagePullPolicy: IfNotPresent - env: - - name: E2E_FOCUS - value: "Pods should be submitted and removed" - volumeMounts: - - name: output-volume - mountPath: /tmp/results - volumes: - - name: output-volume - hostPath: - path: /tmp/results - restartPolicy: Never -``` - - [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/images/conformance/README.md?pixel)]() diff --git a/cluster/images/conformance/conformance-e2e.yaml b/cluster/images/conformance/conformance-e2e.yaml new file mode 100644 index 00000000000..4070b71731c --- /dev/null +++ b/cluster/images/conformance/conformance-e2e.yaml @@ -0,0 +1,71 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: conformance +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + component: conformance + name: conformance-serviceaccount + namespace: conformance +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + component: conformance + name: conformance-serviceaccount-role +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: conformance-serviceaccount +subjects: +- kind: ServiceAccount + name: conformance-serviceaccount + namespace: conformance +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + component: conformance + name: conformance-serviceaccount +rules: +- apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' +- nonResourceURLs: + - '/metrics' + - '/logs' + - '/logs/*' + verbs: + - 'get' +--- +apiVersion: v1 +kind: Pod +metadata: + name: e2e-conformance-test + namespace: conformance +spec: + containers: + - name: conformance-container + image: staging-k8s.gcr.io/conformance-amd64:v1.14-alpha4 + imagePullPolicy: IfNotPresent + env: + - name: E2E_FOCUS + value: "Pods should be submitted and removed" + volumeMounts: + - name: output-volume + mountPath: /tmp/results + volumes: + - name: output-volume + hostPath: + path: /tmp/results + restartPolicy: Never + serviceAccountName: conformance-serviceaccount