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

[operator] operator is attempting to grant RBAC permissions not currently held #1434

Open
grandwizard28 opened this issue Nov 28, 2024 · 1 comment · May be fixed by #1436
Open

[operator] operator is attempting to grant RBAC permissions not currently held #1434

grandwizard28 opened this issue Nov 28, 2024 · 1 comment · May be fixed by #1436
Assignees

Comments

@grandwizard28
Copy link

grandwizard28 commented Nov 28, 2024

Description

The operator starts failing with the following errors::

is attempting to grant RBAC permissions not currently held: {APIGroups:[""], Resources:["nodes/proxy"], Verbs:["get"]}
is attempting to grant RBAC permissions not currently held: {APIGroups:[""], Resources:["nodes/stats"], Verbs:["get"]}

My guess is this is has something to do with the configuration of my collector:

config:
  extensions:
    k8s_observer/pods:
    health_check:
    file_storage/filelog:
  receivers:
    kubeletstats:
    hostmetrics:
    otlp/grpc:
    receiver_creator/prometheus:
      watch_observers: [k8s_observer/pods]
    receiver_creator/filelog:
      watch_observers: [k8s_observer/pods]
  processors:
    resourcedetection:
      detectors:
        - env
        - gcp
        - k8snode
      k8snode:
        node_from_env_var: K8S_NODE_NAME
        auth_type: serviceAccount
      timeout: 2s
      override: true
    k8sattributes:
      extract:
        metadata:
          - "k8s.namespace.name"
          - "k8s.deployment.name"
          - "k8s.statefulset.name"
          - "k8s.daemonset.name"
          - "k8s.cronjob.name"
          - "k8s.job.name"
          - "k8s.node.name"
          - "k8s.node.uid"
          - "k8s.pod.name"
          - "k8s.pod.uid"
          - "k8s.pod.start_time"
          - "k8s.container.name"
          - "container.image.name"
          - "container.image.tag"
      filter:
        node_from_env_var: K8S_NODE_NAME
      passthrough: false
      pod_association:
        - sources:
          - from: resource_attribute
            name: k8s.pod.ip
        - sources:
          - from: resource_attribute
            name: k8s.pod.uid
        - sources:
          - from: connection

I'm not sure which processor/receiver/extension is asking for these permissions. Can we add these permissions to the helm chart?

The fix is to add the above roles in the clusterrole by running:

kubectl edit clusterrole/opentelemetry-operator-manager

Versions

Helm Chart: 0.74.2
Collector Image: 0.113.0

@grandwizard28
Copy link
Author

I'm happy to raise a fix for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant