Skip to content

Commit

Permalink
Merge branch 'main' into chainsaw-3
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
  • Loading branch information
eddycharly committed Feb 16, 2024
2 parents 3da4895 + d190a3e commit 1cfc4b2
Show file tree
Hide file tree
Showing 13 changed files with 115 additions and 77 deletions.
2 changes: 1 addition & 1 deletion autoinstrumentation/java/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.32.1
2.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ rules:
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: simplest-targetallocator-create-sm-prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: create-sm-prometheus
subjects:
- kind: ServiceAccount
name: ta
namespace: create-sm-prometheus
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ spec:
file: 07-error.yaml
- name: step-08
try:
- command:
args:
- create
- clusterrolebinding
- simplest-targetallocator-create-sm-prometheus
- --clusterrole=create-sm-prometheus
- --serviceaccount=create-sm-prometheus:ta
entrypoint: kubectl
- apply:
file: 08-install.yaml
- assert:
Expand Down
13 changes: 13 additions & 0 deletions tests/e2e-targetallocator/targetallocator-features/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ rules:
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['default-view', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: targetallocator-features
subjects:
- kind: ServiceAccount
name: ta
namespace: ($namespace)
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ spec:
selector: app.kubernetes.io/component=opentelemetry-targetallocator
name: step-00
try:
- command:
args:
- -n
- $NAMESPACE
- create
- clusterrolebinding
- default-view-$NAMESPACE
- --clusterrole=targetallocator-features
- --serviceaccount=$NAMESPACE:ta
entrypoint: kubectl
- apply:
file: 00-install.yaml
- assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,32 @@ rules:
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['ta', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: targetallocator-kubernetessd
subjects:
- kind: ServiceAccount
name: ta
namespace: ($namespace)
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['collector', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: collector-kubernetessd
subjects:
- kind: ServiceAccount
name: collector
namespace: ($namespace)
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,17 @@ metadata:
name: targetallocator-kubernetessd
spec:
steps:
- catch:
- script:
content: ./tests/e2e/smoke-daemonset/check-daemonset.sh
- podLogs:
selector: app.kubernetes.io/managed-by=opentelemetry-operator
name: step-00
- name: step-00
try:
- command:
args:
- create
- clusterrolebinding
- ta-$NAMESPACE
- --clusterrole=targetallocator-kubernetessd
- --serviceaccount=$NAMESPACE:ta
entrypoint: kubectl
- command:
args:
- create
- clusterrolebinding
- collector-$NAMESPACE
- --clusterrole=collector-kubernetessd
- --serviceaccount=$NAMESPACE:collector
entrypoint: kubectl
- apply:
file: 00-install.yaml
- assert:
file: 00-assert.yaml
catch:
- script:
content: ./tests/e2e/smoke-daemonset/check-daemonset.sh
- podLogs:
selector: app.kubernetes.io/managed-by=opentelemetry-operator
- name: step-01
try:
- apply:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,32 @@ rules:
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['ta', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: targetallocator-prometheuscr
subjects:
- kind: ServiceAccount
name: ta
namespace: ($namespace)
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['collector', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: collector-prometheuscr
subjects:
- kind: ServiceAccount
name: collector
namespace: ($namespace)
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,15 @@ metadata:
name: targetallocator-prometheuscr
spec:
steps:
- catch:
- podLogs:
selector: app.kubernetes.io/managed-by=opentelemetry-operator
name: step-00
- name: step-00
try:
- command:
args:
- create
- clusterrolebinding
- ta-$NAMESPACE
- --clusterrole=targetallocator-prometheuscr
- --serviceaccount=$NAMESPACE:ta
entrypoint: kubectl
- command:
args:
- create
- clusterrolebinding
- collector-$NAMESPACE
- --clusterrole=collector-prometheuscr
- --serviceaccount=$NAMESPACE:collector
entrypoint: kubectl
- apply:
file: 00-install.yaml
- assert:
file: 00-assert.yaml
catch:
- podLogs:
selector: app.kubernetes.io/managed-by=opentelemetry-operator
- name: step-01
try:
- apply:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ rules:
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['default-view', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: promreceiver-allocatorconfig
subjects:
- kind: ServiceAccount
name: ta
namespace: ($namespace)
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down
6 changes: 0 additions & 6 deletions tests/e2e/prometheus-config-validation/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ spec:
steps:
- name: step-00
try:
- script:
content: |
kubectl -n $NAMESPACE \
create clusterrolebinding default-view-$NAMESPACE \
--clusterrole=promreceiver-allocatorconfig \
--serviceaccount=$NAMESPACE:ta
- apply:
file: 00-promreceiver-allocatorconfig.yaml
- assert:
Expand Down
13 changes: 13 additions & 0 deletions tests/e2e/smoke-targetallocator/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ rules:
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: (join('-', ['default-view', $namespace]))
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: smoke-targetallocator
subjects:
- kind: ServiceAccount
name: ta
namespace: ($namespace)
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down
10 changes: 0 additions & 10 deletions tests/e2e/smoke-targetallocator/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ spec:
selector: app.kubernetes.io/component=opentelemetry-targetallocator
name: step-00
try:
- command:
args:
- -n
- $NAMESPACE
- create
- clusterrolebinding
- default-view-$NAMESPACE
- --clusterrole=smoke-targetallocator
- --serviceaccount=$NAMESPACE:ta
entrypoint: kubectl
- apply:
file: 00-install.yaml
- assert:
Expand Down

0 comments on commit 1cfc4b2

Please sign in to comment.