Skip to content

[kube-state-metrics] Allow easy configuring of --auth-filter #6787

Description

@ibotty

Is your feature request related to a problem ?

It's possible to mostly configure a working version with --auth-filter today using the following values.

    extraArgs:
    - --auth-filter

    rbac:
      extraRules:
      - apiGroups:
        - authentication.k8s.io
        resources:
        - tokenreviews
        verbs:
        - create
      - apiGroups:
        - authorization.k8s.io
        resources:
        - subjectaccessreviews
        verbs:
        - create

    prometheus:
      monitor:
        http:
          bearerTokenFile: /run/secrets/kubernetes.io/serviceaccount/token

This is still missing the role and rolebinding to the agent scraping the servicemonitor as described in upstream documentation.

Describe the solution you'd like.

I propose we add a simple knob to enable --auth-filter and an additional knob to create the role and rolebinding to a given service account.

Describe alternatives you've considered.

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions