-
Notifications
You must be signed in to change notification settings - Fork 26
/
openshift.sakuli.pod.run.template.yaml
126 lines (125 loc) · 3.3 KB
/
openshift.sakuli.pod.run.template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
apiVersion: v1
kind: Template
labels:
template: sakuli-e2e-run-pod
metadata:
annotations:
description: Sakuli End-2-End testing client template (run as pod)
iconClass: icon-beaker
tags: consol, sakuli, e2e-testing, e2e-monitoring
version: 1.1.0
creationTimestamp: null
name: sakuli-e2e-run-pod
### template parameter defined via `oc process -f this.yaml -p PARAMETER=value`
parameters:
## REQUIRED
- name: E2E_TEST_NAME
description: The name for the E2E test suite.
required: true
- name: BAKERY_BAKERY_URL
required: true
- name: BAKERY_REPORT_URL
required: true
## OPTIONAL
- description: 'Custom hostname for http service route. Leave blank for default hostname, e.g.: <E2E_TEST_NAME-name>-<project>.<default-domain-suffix>'
name: HOSTNAME_HTTP
- description: 'Sakuli End-2-End image (see `docker search sakuli`) or internal build docker image of openshift'
name: IMAGE_NAME
required: true
value: sakuli-test-image:latest
### Configuration of OpenShift objects
objects:
### POD config (run one time)
- apiVersion: v1
kind: Pod
metadata:
labels:
application: ${E2E_TEST_NAME}
housekeeping: delete
name: ${E2E_TEST_NAME}
spec:
### ensure that the pod won't start again
restartPolicy: Never
dnsPolicy: ClusterFirst
terminationGracePeriodSeconds: 5
containers:
- name: ${E2E_TEST_NAME}
image: ${IMAGE_NAME}
imagePullPolicy: Always
env:
- name: BAKERY_REPORT_URL
value: "${BAKERY_REPORT_URL}"
- name: BAKERY_BAKERY_URL
value: "${BAKERY_BAKERY_URL}"
- name: JVM_HEAP_XMX_MAX
value: '350'
- name: TZ
value: 'Europe/Berlin'
args:
### make normal UI startup to connect via: oc rsh <pod-name> bash
# - --tail-log
### run in chrome
- run
- /headless/sakuli/bakery/${E2E_TEST_NAME}
# - -browser
# - chrome
### set e.g. debug level
# - -D
# - log.level.sakuli=DEBUG
### checks that vnc server is up and running
livenessProbe:
tcpSocket:
port: 5901
initialDelaySeconds: 3
timeoutSeconds: 5
### checks if http-vnc connection is working
### (removed to reduce the load on the openshift cluster
#readinessProbe:
# httpGet:
# path: /
# port: 6901
# scheme: HTTP
# initialDelaySeconds: 1
# timeoutSeconds: 1
resources:
limits:
cpu: 750m
memory: 2200Mi
### Service -> POD config
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Sakuli client vnc and http port
labels:
application: ${E2E_TEST_NAME}
name: ${E2E_TEST_NAME}-ser
spec:
ports:
- name: http-port-tcp
protocol: TCP
port: 6901
targetPort: 6901
- name: vnc-port-tcp
protocol: TCP
port: 5901
targetPort: 5901
selector:
application: ${E2E_TEST_NAME}
### Route -> Service config
- apiVersion: v1
id: ${E2E_TEST_NAME}
kind: Route
metadata:
annotations:
description: Route for vnc's http service.
labels:
application: ${E2E_TEST_NAME}
router: public
name: ${E2E_TEST_NAME}
spec:
host: ${HOSTNAME_HTTP}
to:
name: ${E2E_TEST_NAME}-ser
port:
targetPort: http-port-tcp