Skip to content

Commit

Permalink
Ensure unique names for ClusterRoles in e2e tests (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm authored Feb 15, 2024
1 parent 822a24f commit b32c855
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ automountServiceAccountToken: true
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ta
name: create-sm-prometheus
rules:
- apiGroups: [""]
resources:
Expand Down Expand Up @@ -60,7 +60,7 @@ rules:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl create clusterrolebinding simplest-targetallocator-create-sm-prometheus --clusterrole=ta --serviceaccount=create-sm-prometheus:ta
- command: kubectl create clusterrolebinding simplest-targetallocator-create-sm-prometheus --clusterrole=create-sm-prometheus --serviceaccount=create-sm-prometheus:ta
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ automountServiceAccountToken: true
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: pod-view
name: promreceiver-allocatorconfig
rules:
- apiGroups: [""]
resources: [ "pods", "namespaces" ]
Expand All @@ -16,7 +16,7 @@ rules:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl -n $NAMESPACE create clusterrolebinding default-view-$NAMESPACE --clusterrole=pod-view --serviceaccount=$NAMESPACE:ta
- command: kubectl -n $NAMESPACE create clusterrolebinding default-view-$NAMESPACE --clusterrole=promreceiver-allocatorconfig --serviceaccount=$NAMESPACE:ta
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/smoke-targetallocator/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ automountServiceAccountToken: true
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: pod-view
name: smoke-targetallocator
rules:
- apiGroups: [""]
resources: [ "pods", "namespaces" ]
Expand All @@ -16,7 +16,7 @@ rules:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- command: kubectl -n $NAMESPACE create clusterrolebinding default-view-$NAMESPACE --clusterrole=pod-view --serviceaccount=$NAMESPACE:ta
- command: kubectl -n $NAMESPACE create clusterrolebinding default-view-$NAMESPACE --clusterrole=smoke-targetallocator --serviceaccount=$NAMESPACE:ta
---
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
Expand Down

0 comments on commit b32c855

Please sign in to comment.