Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(opentelemetry-operator): add get on nodes/proxy and nodes/stats to the clusterrole #1436

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.74.3
version: 0.74.4
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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -90,7 +90,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -86,6 +86,18 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes/proxy
verbs:
- get
- apiGroups:
- ""
resources:
- nodes/stats
verbs:
- get
- apiGroups:
- config.openshift.io
resources:
Expand Down Expand Up @@ -222,7 +234,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -240,7 +252,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -31,7 +31,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -43,7 +43,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -90,7 +90,7 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -86,6 +86,18 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes/proxy
verbs:
- get
- apiGroups:
- ""
resources:
- nodes/stats
verbs:
- get
- apiGroups:
- config.openshift.io
resources:
Expand Down Expand Up @@ -236,7 +248,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -254,7 +266,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand All @@ -31,7 +31,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.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.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down Expand Up @@ -43,7 +43,7 @@ metadata:
name: "example-opentelemetry-operator-webhook"
namespace: default
labels:
helm.sh/chart: opentelemetry-operator-0.74.3
helm.sh/chart: opentelemetry-operator-0.74.4
app.kubernetes.io/name: opentelemetry-operator
app.kubernetes.io/version: "0.113.0"
app.kubernetes.io/managed-by: Helm
Expand Down
12 changes: 12 additions & 0 deletions charts/opentelemetry-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- nodes/proxy
verbs:
- get
- apiGroups:
- ""
resources:
- nodes/stats
verbs:
- get
Comment on lines +108 to +119
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaronoff97 if it is the collector that needs the permissions (I believe this is kubeletstatsreceiver or k8sattributesprocessor), why does the operator need them?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comes from the operator's RBAC magic that allows it to create the necessary RBAC for the collector (getting this from the issue) I think as a result this permission should only be in the section here which contains the permissions for operator RBAC magics

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I move it inside the createRbacPermissions block then?

- apiGroups:
- config.openshift.io
resources:
Expand Down
Loading