Better manifest for running conformance image

Change-Id: I137180ed781edd4a9877cabe039e40a72aa71366
pull/564/head
Davanum Srinivas 2019-02-26 10:29:12 -05:00
parent 069eeb541b
commit 94ad1dfb11
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59
2 changed files with 73 additions and 28 deletions

View File

@ -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)]()

View File

@ -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