Skip to content

Commit 699e034

Browse files
authored
Fix tests migrated to Chainsaw (#2650)
1 parent d9e1d16 commit 699e034

File tree

63 files changed

+488
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+488
-297
lines changed

.chainsaw.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ metadata:
66
spec:
77
parallel: 4
88
timeouts:
9-
assert: 5m0s
9+
assert: 6m0s
1010
cleanup: 5m0s
1111
delete: 5m0s
1212
error: 5m0s
13+
apply: 10s

.github/workflows/e2e.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
path: bin
5252
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
5353
- name: Install chainsaw
54-
uses: kyverno/[email protected].4
54+
uses: kyverno/[email protected].6
5555
- name: Install tools
5656
run: make install-tools
5757
- name: Prepare e2e tests

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ KUSTOMIZE_VERSION ?= v5.0.3
367367
CONTROLLER_TOOLS_VERSION ?= v0.12.0
368368
GOLANGCI_LINT_VERSION ?= v1.54.0
369369
KIND_VERSION ?= v0.20.0
370-
CHAINSAW_VERSION ?= v0.1.4
370+
CHAINSAW_VERSION ?= v0.1.6
371371

372372
.PHONY: install-tools
373373
install-tools: kustomize golangci-lint kind controller-gen envtest crdoc kind operator-sdk chainsaw

tests/e2e-autoscale/autoscale/02-install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
- --otlp-insecure
1616
# High duration to ensure the trace creation doesn't stop.
1717
# It'll be stopped in step 4
18-
- --duration=1m
18+
- --duration=6m
1919
- --workers=20
2020
- traces
2121
restartPolicy: Never

tests/e2e-instrumentation/instrumentation-apache-httpd/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@ kind: Test
44
metadata:
55
name: instrumentation-apache-httpd
66
spec:
7-
namespaceTemplate:
8-
metadata:
9-
annotations:
10-
openshift.io/sa.scc.uid-range: 1000/1000
11-
openshift.io/sa.scc.supplemental-groups: 3000/1000
127
steps:
138
- name: step-00
149
try:
10+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
11+
- command:
12+
entrypoint: kubectl
13+
args:
14+
- annotate
15+
- namespace
16+
- ${NAMESPACE}
17+
- openshift.io/sa.scc.uid-range=1000/1000
18+
- --overwrite
19+
- command:
20+
entrypoint: kubectl
21+
args:
22+
- annotate
23+
- namespace
24+
- ${NAMESPACE}
25+
- openshift.io/sa.scc.supplemental-groups=3000/1000
26+
- --overwrite
1527
- apply:
1628
file: 00-install-collector.yaml
1729
- apply:

tests/e2e-instrumentation/instrumentation-dotnet-musl/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-dotnet-musl
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-dotnet/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-dotnet
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-go/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-go
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 0/0
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=0/0
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-java-other-ns/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-java-other-ns
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-01
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- delete:
1729
ref:
1830
apiVersion: v1

tests/e2e-instrumentation/instrumentation-java/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-java
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-nginx-contnr-secctx
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 3000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=3000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-nginx-multicontainer/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-nginx-multicontainer
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 3000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=3000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-nginx/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-nginx
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 3000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=3000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-nodejs/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-nodejs
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

tests/e2e-instrumentation/instrumentation-python/chainsaw-test.yaml

+17-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,26 @@ metadata:
55
creationTimestamp: null
66
name: instrumentation-python
77
spec:
8-
namespaceTemplate:
9-
metadata:
10-
annotations:
11-
openshift.io/sa.scc.uid-range: 1000/1000
12-
openshift.io/sa.scc.supplemental-groups: 2000/1000
138
steps:
149
- name: step-00
1510
try:
11+
# In OpenShift, when a namespace is created, all necessary SCC annotations are automatically added. However, if a namespace is created using a resource file with only selected SCCs, the other auto-added SCCs are not included. Therefore, the UID-range and supplemental groups SCC annotations must be set after the namespace is created.
12+
- command:
13+
entrypoint: kubectl
14+
args:
15+
- annotate
16+
- namespace
17+
- ${NAMESPACE}
18+
- openshift.io/sa.scc.uid-range=1000/1000
19+
- --overwrite
20+
- command:
21+
entrypoint: kubectl
22+
args:
23+
- annotate
24+
- namespace
25+
- ${NAMESPACE}
26+
- openshift.io/sa.scc.supplemental-groups=2000/1000
27+
- --overwrite
1628
- apply:
1729
file: 00-install-collector.yaml
1830
- apply:

0 commit comments

Comments
 (0)