Skip to content

Commit

Permalink
feat: Add option to enable --create-rbac-permission on operator
Browse files Browse the repository at this point in the history
  • Loading branch information
thefirstofthe300 committed Apr 3, 2024
1 parent 0d56957 commit e5069d9
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 20 deletions.
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.52.4
version: 0.53.0
description: OpenTelemetry Operator Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -91,7 +91,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -30,7 +30,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -214,7 +214,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -233,7 +233,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -26,7 +26,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -32,7 +32,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: opentelemetry-operator
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-cert-manager"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: "example-opentelemetry-operator-metrics"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -44,7 +44,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.52.4
helm.sh/chart: opentelemetry-operator-0.53.0
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.96.0"
app.kubernetes.io/managed-by: Helm
Expand Down
15 changes: 15 additions & 0 deletions charts/opentelemetry-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ rules:
- patch
- update
- watch
{{- if .Values.manager.createRbacPermissions }}
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
- clusterrolebindings
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
{{- end }}
- apiGroups:
- config.openshift.io
resources:
Expand Down
3 changes: 3 additions & 0 deletions charts/opentelemetry-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
{{- if .Values.manager.featureGates }}
- --feature-gates={{ .Values.manager.featureGates }}
{{- end }}
{{- if .Values.manager.createRbacPermissions }}
- --create-rbac-permissions
{{- end }}
{{- if .Values.manager.extraArgs }}
{{- .Values.manager.extraArgs | toYaml | nindent 12 }}
{{- end }}
Expand Down
8 changes: 8 additions & 0 deletions charts/opentelemetry-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,14 @@
"annotations": {}
}]
},
"createRbacPermissions": {
"type": "boolean",
"default": false,
"title": "Whether the operator should create RBAC permissions for collector deployments",
"examples": [
false
]
},
"extraArgs": {
"type": "array",
"default": [],
Expand Down
3 changes: 2 additions & 1 deletion charts/opentelemetry-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ manager:
# add annotations on the PrometheusRule
annotations: {}


# Whether the operator should create RBAC permissions for collectors
createRbacPermissions: false
## List of additional cli arguments to configure the manager
## for example: --labels, etc.
extraArgs: []
Expand Down

0 comments on commit e5069d9

Please sign in to comment.