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

global.fleet.clusterLabels not rendered in plain list items #921

Open
1 task done
gervaso opened this issue Aug 18, 2022 · 1 comment
Open
1 task done

global.fleet.clusterLabels not rendered in plain list items #921

gervaso opened this issue Aug 18, 2022 · 1 comment
Labels

Comments

@gervaso
Copy link

gervaso commented Aug 18, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I can use the Grafana labs Helm Chart as an example and I think this bug is related to #363 and #402

I defined a clusterlabel myproduct/hostname and in one particular case it doesn't get rendered

defaultNamespace: grafana
helm:
  repo: https://grafana.github.io/helm-charts
  chart: grafana
  releaseName: grafana
  version: 6.32.12
  values:
    serviceMonitor:
      enabled: true
      path: /metrics
    ingress:
      enabled: true
      ingressClassName: nginx
      annotations:
        # cert-manager.io/cluster-issuer: generic-cluster-issuer
        ingress.kubernetes.io/proxy-body-size: "0"
        # ingress.kubernetes.io/ssl-redirect: "true"
      labels: {}
      path: /grafana
      pathType: Prefix
      hosts:
        - global.fleet.clusterLabels.myproduct/hostname
      # tls:
      # - secretName: grafana-tls
      #   hosts:
      #     - global.fleet.clusterLabels.myproduct/hostname
    persistence:
      type: pvc
      enabled: true
      storageClassName: openebs-zfspv
      accessModes:
        - ReadWriteOnce
      size: 1Gi

The cluster labels appear correctly in the rendered values, but not in the "hosts" list

> helm get values -n grafana grafana
USER-SUPPLIED VALUES:
global:
  fleet:
    clusterLabels:
      brainkin-fleet: enabled
      myproduct/hostname: myhostname.int.company.tld
      management.cattle.io/cluster-display-name: myproduct-dev
      management.cattle.io/cluster-name: c-m-xvxjw2sg
      provider.cattle.io: k3s
ingress:
  annotations:
    ingress.kubernetes.io/proxy-body-size: "0"
  enabled: true
  hosts:
  - global.fleet.clusterLabels.myproduct/hostname
  ingressClassName: nginx
  labels: {}
  path: /grafana
  pathType: Prefix
persistence:
  accessModes:
  - ReadWriteOnce
  enabled: true
  size: 1Gi
  storageClassName: openebs-zfspv
  type: pvc
serviceMonitor:
  enabled: true
  path: /metrics

Expected Behavior

I would expect it to correctly render the clusterlabels value of "myhostname.int.company.tld" as it happens with other charts

Steps To Reproduce

No response

Environment

- Architecture: amd64
- Fleet Version: 0.3.9
- Cluster:
  - Provider: k3s (the the same happens with vanilla k8s or rke)
  - Options: the cluster is joined to a rancher server running version 2.6.6
  - Kubernetes Version: 1.23.8

Logs

No response

Anything else?

No response

@ngoeddel-openi
Copy link

I am experiencing the same issue. It also won't work with "${ .ClusterLabels.LABEL }" like mentioned in the gitrepo structure or with "{{ .ClusterLabels }}" like @gregsidelinger mentioned it here.

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

No branches or pull requests

4 participants