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

Grafana Oncall Helm chart with mostly-default values results in clashing names #1104

Open
scubbo opened this issue Jan 9, 2023 · 1 comment

Comments

@scubbo
Copy link
Contributor

scubbo commented Jan 9, 2023

This might be deliberate behaviour, but I wanted to flag it up just in case.

The Grafana Oncall Helm chart depends on Grafana itself. When installing this chart with default values, 2 of the resultant ServiceAccounts are templated with the same name:

# Note that you may have to set `grafana.rbac.pspEnabled=false` if you have a recent version of Kubernetes
$ helm template -n grafana grafana-oncall grafana/oncall | yq 'select(.kind=="ServiceAccount")'
---
# Source: oncall/charts/grafana/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    helm.sh/chart: grafana-6.29.6
    app.kubernetes.io/name: grafana
    app.kubernetes.io/instance: grafana-oncall
    app.kubernetes.io/version: "8.5.3"
    app.kubernetes.io/managed-by: Helm
  name: grafana-oncall
  namespace: grafana
---
[...]
# Source: oncall/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: grafana-oncall
  labels:
    helm.sh/chart: oncall-1.1.0
    app.kubernetes.io/name: oncall
    app.kubernetes.io/instance: grafana-oncall
    app.kubernetes.io/version: "v1.1.5"
    app.kubernetes.io/managed-by: Helm

These two accounts are created from files here and here, which ultimately take their naming from here/here and here/here. Thus, a helm install that doesn't override the Helm ServiceAccountName will result in Error: INSTALLATION FAILED: serviceaccounts "grafana-oncall" already exists.

There are plenty of ways to get around this by overriding names in values - but this was (to me) a surprising failure with the default Helm values.

@andrezaycev
Copy link

Try rename you release from "grafana-oncall" to "oncall". Fix for me

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

No branches or pull requests

3 participants