banzaicloud / banzai-charts

Curated list of Banzai Cloud Helm charts used by the Pipeline Platform
Apache License 2.0
368 stars 283 forks source link

sigv4_auth_enabled not allowed #1254

Closed adamstrawson closed 1 year ago

adamstrawson commented 3 years ago

Describe the bug I'm not sure if this is a bug with integreatly or banzaicloud, but the integreatly docs seem to mention support for this, so posting here initially.

When referencing sigv4_auth_enabled: true in the Grafana config block, the generated ConfigMap excludes the key.

Steps to reproduce the issue:

Create the grafana-operator as normal;

---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  name: grafana-operator
spec:
  helmVersion: v3
  chart:
    repository: https://kubernetes-charts.banzaicloud.com
    name: grafana-operator
    version: 0.3.0
  values:
    createCustomResource: false

And then create a Grafana resource using the CRD

---
apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
  name: grafana
spec:
  config:
    auth.proxy:
      enabled: true
      header_name: X-Auth-Request-Email
      header_property: email
      auto_sign_up: true
      sync_ttl: 60
      enable_login_token: true
    auth:
      sigv4_auth_enabled: true
    users:
      allow_sign_up: false
      auto_assign_org: true
      auto_assign_org_role: Editor

Once applyed, the generated config is missing the sigv4_auth_enabled key

kubectl get configmap grafana-config -o yaml
apiVersion: v1
data:
  grafana.ini: |+
    [auth]

    [auth.proxy]
    auto_sign_up = true
    enable_login_token = true
    enabled = true
    header_name = X-Auth-Request-Email
    header_property = email

    [paths]
    data = /var/lib/grafana
    logs = /var/log/grafana
    plugins = /var/lib/grafana/plugins
    provisioning = /etc/grafana/provisioning/

    [users]
    allow_sign_up = false
    auto_assign_org = true
    auto_assign_org_role = Editor

kind: ConfigMap
metadata:
  name: grafana-config

If I add any other such as disable_login_form = true it will appear as expected, this issue seems to be specific to sigv4_auth_enabled

Expected behavior

I would expect for sigv4_auth_enabled: true to show under the [auth] block within the configmap

Additional context The integreatly base CRD showing support for the key: https://github.com/integr8ly/grafana-operator/blob/fe0020ab7b75e59c28732a6a664fe8323a8c4246/config/crd/bases/integreatly.org_grafanas.yaml#L102