Skip to content

Commit

Permalink
Make ClusterRoles deployment configurable (#240)
Browse files Browse the repository at this point in the history
* Make ClusterRoles deployment configurable

* comments1

* Update values.yaml

* Update clusterrole.yaml

* Update clusterrolebinding.yaml

* Update Chart.yaml

* Update clusterrole.yaml

* Update clusterrolebinding.yaml
  • Loading branch information
Allex1 authored Jun 24, 2022
1 parent 4f1c089 commit 3ef62e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/opentelemetry-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-operator
version: 0.8.3
version: 0.8.4
description: OpenTelemetry Operator Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
2 changes: 2 additions & 0 deletions charts/opentelemetry-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.clusterRole.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -191,3 +192,4 @@ rules:
- subjectaccessreviews
verbs:
- create
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.clusterRole.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down Expand Up @@ -27,3 +28,4 @@ subjects:
- kind: ServiceAccount
name: {{ template "opentelemetry-operator.name" . }}-controller-manager
namespace: {{ .Release.Namespace }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ admissionWebhooks:
# kind:
# name:

## Create the provided ClusterRoles and ClusterRoleBindings
##
clusterRole:
create: true

affinity: {}
tolerations: []
nodeSelector: {}
Expand Down

0 comments on commit 3ef62e3

Please sign in to comment.