Skip to content

Feature Request - toggle for Prometheus scraping as ClusterRole #717

@dplusic

Description

@dplusic

Expected Behaviour

Helm Chart should not create ClusterRole when clusterRole=false.

Current Behaviour

It creates ClusterRole even if clusterRole=false.

Possible Solution

It should create Role instead of ClusterRole.

Steps to Reproduce (for bugs)

  1. Prepare a service account without permission creating ClusterRole
  2. Run helm install openfaas openfaas/openfaas --set clusterRole=false --set createCRDs=false
  3. Error message: Error: rendered manifests contain a resource that already exists. Unable to continue with install: could not get information about the resource: clusterroles.rbac.authorization.k8s.io "openfaas-prometheus" is forbidden: User "system:serviceaccount:default:default" cannot get resource "clusterroles" in API group "rbac.authorization.k8s.io" at the cluster scope

Context

I want namespaced installation of openfaas.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ): -

  • Docker version docker version (e.g. Docker 17.0.05 ): -

  • What version and distriubtion of Kubernetes are you using? kubectl version

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4", GitCommit:"d360454c9bcd1634cf4cc52d1867af5491dc9c5f", GitTreeState:"clean", BuildDate:"2020-11-11T13:17:17Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18+", GitVersion:"v1.18.9-eks-d1db3c", GitCommit:"d1db3c46e55f95d6a7d3e5578689371318f95ff9", GitTreeState:"clean", BuildDate:"2020-10-20T22:18:07Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
  • Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu 18.04 on WSL

  • Link to your project or a code example to reproduce issue: -

  • What network driver are you using and what CIDR? i.e. Weave net / Flannel: -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions