-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathe2e.yaml
More file actions
173 lines (162 loc) · 7.98 KB
/
e2e.yaml
File metadata and controls
173 lines (162 loc) · 7.98 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
setup:
env: kind
file: ../kind.yaml
init-system-environment: ../env
steps:
- name: build images
command: |
chmod +x images/build.sh images/samples/build.sh
PULSAR_IMAGE_TAG=2.9.2.23 PULSAR_IMAGE=streamnative/pulsar-all KIND_PUSH=true images/build.sh
PULSAR_IMAGE_TAG=2.9.2.23 KIND_PUSH=true images/samples/build.sh
- name: install helm
command: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: setup cert-manager
command: |
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager --set installCRDs=true --version v1.8.2
wait:
- namespace: default
resource: pod
label-selector: app=cert-manager
for: condition=Ready
- name: setup vpa
command: |
helm repo add cowboysysop https://cowboysysop.github.io/charts/
helm repo update
helm install vpa cowboysysop/vertical-pod-autoscaler
wait:
- namespace: default
resource: pod
label-selector: app.kubernetes.io/name=vertical-pod-autoscaler
for: condition=Ready
- name: install pulsar cluster
command: |
helm repo add streamnative https://charts.streamnative.io
rm -rf pulsar-charts/
git clone https://github.com/streamnative/charts.git pulsar-charts
cd pulsar-charts/
./scripts/pulsar/prepare_helm_release.sh -n default -k ${PULSAR_RELEASE_NAME} -c
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
yq -i '.dependencies[0].repository = "https://grafana.github.io/helm-charts"' charts/pulsar/requirements.yaml
helm dependency update charts/pulsar
helm install ${PULSAR_RELEASE_NAME} --set initialize=true --values ../.ci/clusters/values_skywalking_e2e_cluster.yaml charts/pulsar
# required for vpa tests
- name: install metrics service
command: |
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl patch -n kube-system deployment metrics-server --type=json -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'
- name: wait for pulsar cluster ready
command: |
echo "wait until pulsar init job is completed"
succeeded_num=0
while [[ ${succeeded_num} -lt 1 ]]; do
sleep 10
kubectl get pods -n ${PULSAR_NAMESPACE}
succeeded_num=$(kubectl get jobs -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-pulsar-init -o jsonpath='{.status.succeeded}')
done
kubectl scale statefulset --replicas=1 ${PULSAR_RELEASE_NAME}-pulsar-bookie
wait:
- namespace: default
resource: pod
label-selector: app=pulsar
for: condition=Ready
- name: wait for producer active
command: |
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-toolset-0 -- bash -c 'until nslookup sn-platform-pulsar-broker; do sleep 3; done'
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-broker-0 -- bin/pulsar-admin tenants create sn-platform
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-broker-0 -- bin/pulsar-admin namespaces create sn-platform/test
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-broker-0 -- bin/pulsar-client produce -m "test-message" sn-platform/test/test-topic
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-bookie-0 -- df -h
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-bookie-0 -- cat conf/bookkeeper.conf
kubectl exec -n ${PULSAR_NAMESPACE} ${PULSAR_RELEASE_NAME}-pulsar-bookie-0 -- nc -zv 127.0.0.1 4181
# upload packages here to avoid retry error
- name: upload packages
command: |
bash .ci/upload_function.sh java
bash .ci/upload_function.sh py
bash .ci/upload_function.sh pyzip
bash .ci/upload_function.sh pypip
bash .ci/upload_function.sh go
bash .ci/upload_function.sh node
- name: install function-mesh operator
command: |
make generate
make helm-crds
image="function-mesh-operator:latest"
IMG=${image} make docker-build-skip-test
kind load docker-image ${image}
helm install ${FUNCTION_MESH_RELEASE_NAME} -n ${FUNCTION_MESH_NAMESPACE} --set operatorImage=${image} --create-namespace charts/function-mesh-operator
wait:
- namespace: function-mesh
resource: pod
label-selector: app.kubernetes.io/name=function-mesh-operator
for: condition=Ready
timeout: 80m
cleanup:
# always never success failure
on: success
verify:
# verify with retry strategy
retry:
# max retry count
count: 10
# the interval between two attempts, e.g. 10s, 1m.
interval: 10s
cases:
- query: timeout 5m bash .ci/tests/integration/cases/python-function/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/go-function/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/functionmesh/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/hpa/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/builtin-hpa/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/python-stateful-function/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/java-function/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/java-function-vpa/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/reconciliation/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/java-download-function/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/go-download-function/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/py-download-function/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/py-download-zip-function/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/py-download-pip-function/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/elasticsearch-sink/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/mongodb-source/verify.sh
expected: expected.data.yaml
- query: bash .ci/tests/integration/cases/crypto-function/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/java-log-config/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/java-log-level/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/python-log-config/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/python-log-level/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/logging-window-function/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/health-check/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/java-log-format-json/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/java-log-yaml/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/python-log-format-json/verify.sh
expected: expected.data.yaml
- query: timeout 5m bash .ci/tests/integration/cases/nodejs-function/verify.sh
expected: expected.data.yaml