Skip to content

Commit 1f14875

Browse files
committed
Merge branch 'main' into chainsaw-3
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
2 parents 3da4895 + d190a3e commit 1f14875

File tree

13 files changed

+120
-77
lines changed

13 files changed

+120
-77
lines changed

autoinstrumentation/java/version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.32.1
1+
2.1.0

tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,19 @@ rules:
6464
verbs:
6565
- get
6666
---
67+
apiVersion: rbac.authorization.k8s.io/v1
68+
kind: ClusterRoleBinding
69+
metadata:
70+
name: simplest-targetallocator-create-sm-prometheus
71+
roleRef:
72+
apiGroup: rbac.authorization.k8s.io
73+
kind: ClusterRole
74+
name: create-sm-prometheus
75+
subjects:
76+
- kind: ServiceAccount
77+
name: ta
78+
namespace: create-sm-prometheus
79+
---
6780
apiVersion: opentelemetry.io/v1alpha1
6881
kind: OpenTelemetryCollector
6982
metadata:

tests/e2e-prometheuscr/create-sm-prometheus-exporters/chainsaw-test.yaml

-8
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ spec:
6060
file: 07-error.yaml
6161
- name: step-08
6262
try:
63-
- command:
64-
args:
65-
- create
66-
- clusterrolebinding
67-
- simplest-targetallocator-create-sm-prometheus
68-
- --clusterrole=create-sm-prometheus
69-
- --serviceaccount=create-sm-prometheus:ta
70-
entrypoint: kubectl
7163
- apply:
7264
file: 08-install.yaml
7365
- assert:

tests/e2e-targetallocator/targetallocator-features/00-install.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ rules:
2727
- list
2828
- watch
2929
---
30+
apiVersion: rbac.authorization.k8s.io/v1
31+
kind: ClusterRoleBinding
32+
metadata:
33+
name: (join('-', ['default-view', $namespace]))
34+
roleRef:
35+
apiGroup: rbac.authorization.k8s.io
36+
kind: ClusterRole
37+
name: targetallocator-features
38+
subjects:
39+
- kind: ServiceAccount
40+
name: ta
41+
namespace: ($namespace)
42+
---
3043
apiVersion: opentelemetry.io/v1alpha1
3144
kind: OpenTelemetryCollector
3245
metadata:

tests/e2e-targetallocator/targetallocator-features/chainsaw-test.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,8 @@ spec:
1616
selector: app.kubernetes.io/component=opentelemetry-targetallocator
1717
name: step-00
1818
try:
19-
- command:
20-
args:
21-
- -n
22-
- $NAMESPACE
23-
- create
24-
- clusterrolebinding
25-
- default-view-$NAMESPACE
26-
- --clusterrole=targetallocator-features
27-
- --serviceaccount=$NAMESPACE:ta
28-
entrypoint: kubectl
2919
- apply:
20+
template: true
3021
file: 00-install.yaml
3122
- assert:
3223
file: 00-assert.yaml

tests/e2e-targetallocator/targetallocator-kubernetessd/00-install.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,32 @@ rules:
9292
verbs:
9393
- get
9494
---
95+
apiVersion: rbac.authorization.k8s.io/v1
96+
kind: ClusterRoleBinding
97+
metadata:
98+
name: (join('-', ['ta', $namespace]))
99+
roleRef:
100+
apiGroup: rbac.authorization.k8s.io
101+
kind: ClusterRole
102+
name: targetallocator-kubernetessd
103+
subjects:
104+
- kind: ServiceAccount
105+
name: ta
106+
namespace: ($namespace)
107+
---
108+
apiVersion: rbac.authorization.k8s.io/v1
109+
kind: ClusterRoleBinding
110+
metadata:
111+
name: (join('-', ['collector', $namespace]))
112+
roleRef:
113+
apiGroup: rbac.authorization.k8s.io
114+
kind: ClusterRole
115+
name: collector-kubernetessd
116+
subjects:
117+
- kind: ServiceAccount
118+
name: collector
119+
namespace: ($namespace)
120+
---
95121
apiVersion: opentelemetry.io/v1alpha1
96122
kind: OpenTelemetryCollector
97123
metadata:

tests/e2e-targetallocator/targetallocator-kubernetessd/chainsaw-test.yaml

+7-22
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,18 @@ metadata:
66
name: targetallocator-kubernetessd
77
spec:
88
steps:
9-
- catch:
10-
- script:
11-
content: ./tests/e2e/smoke-daemonset/check-daemonset.sh
12-
- podLogs:
13-
selector: app.kubernetes.io/managed-by=opentelemetry-operator
14-
name: step-00
9+
- name: step-00
1510
try:
16-
- command:
17-
args:
18-
- create
19-
- clusterrolebinding
20-
- ta-$NAMESPACE
21-
- --clusterrole=targetallocator-kubernetessd
22-
- --serviceaccount=$NAMESPACE:ta
23-
entrypoint: kubectl
24-
- command:
25-
args:
26-
- create
27-
- clusterrolebinding
28-
- collector-$NAMESPACE
29-
- --clusterrole=collector-kubernetessd
30-
- --serviceaccount=$NAMESPACE:collector
31-
entrypoint: kubectl
3211
- apply:
12+
template: true
3313
file: 00-install.yaml
3414
- assert:
3515
file: 00-assert.yaml
16+
catch:
17+
- script:
18+
content: ./tests/e2e/smoke-daemonset/check-daemonset.sh
19+
- podLogs:
20+
selector: app.kubernetes.io/managed-by=opentelemetry-operator
3621
- name: step-01
3722
try:
3823
- apply:

tests/e2e-targetallocator/targetallocator-prometheuscr/00-install.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,32 @@ rules:
101101
verbs:
102102
- get
103103
---
104+
apiVersion: rbac.authorization.k8s.io/v1
105+
kind: ClusterRoleBinding
106+
metadata:
107+
name: (join('-', ['ta', $namespace]))
108+
roleRef:
109+
apiGroup: rbac.authorization.k8s.io
110+
kind: ClusterRole
111+
name: targetallocator-prometheuscr
112+
subjects:
113+
- kind: ServiceAccount
114+
name: ta
115+
namespace: ($namespace)
116+
---
117+
apiVersion: rbac.authorization.k8s.io/v1
118+
kind: ClusterRoleBinding
119+
metadata:
120+
name: (join('-', ['collector', $namespace]))
121+
roleRef:
122+
apiGroup: rbac.authorization.k8s.io
123+
kind: ClusterRole
124+
name: collector-prometheuscr
125+
subjects:
126+
- kind: ServiceAccount
127+
name: collector
128+
namespace: ($namespace)
129+
---
104130
apiVersion: opentelemetry.io/v1alpha1
105131
kind: OpenTelemetryCollector
106132
metadata:

tests/e2e-targetallocator/targetallocator-prometheuscr/chainsaw-test.yaml

+5-20
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,16 @@ metadata:
66
name: targetallocator-prometheuscr
77
spec:
88
steps:
9-
- catch:
10-
- podLogs:
11-
selector: app.kubernetes.io/managed-by=opentelemetry-operator
12-
name: step-00
9+
- name: step-00
1310
try:
14-
- command:
15-
args:
16-
- create
17-
- clusterrolebinding
18-
- ta-$NAMESPACE
19-
- --clusterrole=targetallocator-prometheuscr
20-
- --serviceaccount=$NAMESPACE:ta
21-
entrypoint: kubectl
22-
- command:
23-
args:
24-
- create
25-
- clusterrolebinding
26-
- collector-$NAMESPACE
27-
- --clusterrole=collector-prometheuscr
28-
- --serviceaccount=$NAMESPACE:collector
29-
entrypoint: kubectl
3011
- apply:
12+
template: true
3113
file: 00-install.yaml
3214
- assert:
3315
file: 00-assert.yaml
16+
catch:
17+
- podLogs:
18+
selector: app.kubernetes.io/managed-by=opentelemetry-operator
3419
- name: step-01
3520
try:
3621
- apply:

tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ rules:
1919
- list
2020
- watch
2121
---
22+
apiVersion: rbac.authorization.k8s.io/v1
23+
kind: ClusterRoleBinding
24+
metadata:
25+
name: (join('-', ['default-view', $namespace]))
26+
roleRef:
27+
apiGroup: rbac.authorization.k8s.io
28+
kind: ClusterRole
29+
name: promreceiver-allocatorconfig
30+
subjects:
31+
- kind: ServiceAccount
32+
name: ta
33+
namespace: ($namespace)
34+
---
2235
apiVersion: opentelemetry.io/v1alpha1
2336
kind: OpenTelemetryCollector
2437
metadata:

tests/e2e/prometheus-config-validation/chainsaw-test.yaml

+1-6
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ spec:
88
steps:
99
- name: step-00
1010
try:
11-
- script:
12-
content: |
13-
kubectl -n $NAMESPACE \
14-
create clusterrolebinding default-view-$NAMESPACE \
15-
--clusterrole=promreceiver-allocatorconfig \
16-
--serviceaccount=$NAMESPACE:ta
1711
- apply:
12+
template: true
1813
file: 00-promreceiver-allocatorconfig.yaml
1914
- assert:
2015
file: 00-assert.yaml

tests/e2e/smoke-targetallocator/00-install.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ rules:
1919
- list
2020
- watch
2121
---
22+
apiVersion: rbac.authorization.k8s.io/v1
23+
kind: ClusterRoleBinding
24+
metadata:
25+
name: (join('-', ['default-view', $namespace]))
26+
roleRef:
27+
apiGroup: rbac.authorization.k8s.io
28+
kind: ClusterRole
29+
name: smoke-targetallocator
30+
subjects:
31+
- kind: ServiceAccount
32+
name: ta
33+
namespace: ($namespace)
34+
---
2235
apiVersion: opentelemetry.io/v1alpha1
2336
kind: OpenTelemetryCollector
2437
metadata:

tests/e2e/smoke-targetallocator/chainsaw-test.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,8 @@ spec:
1111
selector: app.kubernetes.io/component=opentelemetry-targetallocator
1212
name: step-00
1313
try:
14-
- command:
15-
args:
16-
- -n
17-
- $NAMESPACE
18-
- create
19-
- clusterrolebinding
20-
- default-view-$NAMESPACE
21-
- --clusterrole=smoke-targetallocator
22-
- --serviceaccount=$NAMESPACE:ta
23-
entrypoint: kubectl
2414
- apply:
15+
template: true
2516
file: 00-install.yaml
2617
- assert:
2718
file: 00-assert.yaml

0 commit comments

Comments
 (0)