fleet icon indicating copy to clipboard operation
fleet copied to clipboard

namespaceLabels does not work as a targetCustomizations

Open jhoblitt opened this issue 11 months ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

I attempted to add additional namespace labels as targetCustomizations[0].namespaceLabels and no change was made to the existing labels on the default namespace.

Expected Behavior

I expected either the top level namespaceLabels to merged with targetCustomization namespaceLabels or overridden completely. I did not expect nothing at all to happen as namespaceLabels is part of BundleDeploymentOptions.

Steps To Reproduce

---
defaultNamespace: &name mimir
labels:
  bundle: *name
namespaceLabels:
  foo: bar
helm:
  chart: &chart mimir-distributed
  releaseName: *chart
  repo: https://grafana.github.io/helm-charts
  version: 5.2.0
  timeoutSeconds: 600
  waitForJobs: true
targetCustomizations:
  - name: ruka
    clusterName: ruka
    helm:
      valuesFiles:
        - overlays/ruka/values.yaml
    namespaceLabels:
      this.is/a: test

Environment

- Architecture: amd64
- Fleet Version: 0.90 / rancher 2.8.2
- Cluster:
  - Provider: rke[1]
  - Options: extra cheese
  - Kubernetes Version: v1.25.9

Logs

No response

Anything else?

No response

jhoblitt avatar Mar 23 '24 18:03 jhoblitt

Is this possibly related to #1994?

jhoblitt avatar Mar 23 '24 18:03 jhoblitt

This is not supported yet: https://fleet.rancher.io/gitrepo-targets#supported-customizations

manno avatar Apr 10 '24 13:04 manno

My use case for wanting to customize namsepaceLabels is to use different prometheus scraping labels on different groups of clusters.

jhoblitt avatar Apr 10 '24 15:04 jhoblitt

Closing this as we're tracking the feature in https://github.com/rancher/fleet/issues/2441

manno avatar Jul 25 '24 15:07 manno