Is there an existing issue for this?
Current Behavior
The local clusters.fleet.cattle.io object should have the labels as defined in the bootstrap options, but they are not added:
apiVersion: fleet.cattle.io/v1alpha1
kind: Cluster
metadata:
labels:
management.cattle.io/cluster-display-name: local
management.cattle.io/cluster-name: local
name: local
objectset.rio.cattle.io/hash: ...
provider.cattle.io: rke2
Expected Behavior
The local clusters.fleet.cattle.io object should have the labels as defined in the bootstrap options:
apiVersion: fleet.cattle.io/v1alpha1
kind: Cluster
metadata:
labels:
example.com/cluster-display-name: kube-test
example.com/environment: test
management.cattle.io/cluster-display-name: local
management.cattle.io/cluster-name: local
name: local
objectset.rio.cattle.io/hash: ...
provider.cattle.io: rke2
Steps To Reproduce
Deploy the Rancher Helm Chart with the following fleet values:
fleet:
bootstrap:
enabled: true
clusterLabels:
example.com/environment: test
example.com/cluster-display-name: kube-test
repo: https://git.example.com/fleet/bundles
branch: main
# helm -n cattle-fleet-system get values fleet
agentTLSMode: system-store
apiServerCA: ""
apiServerURL: ""
bootstrap:
agentNamespace: cattle-fleet-local-system
branch: main
clusterLabels:
example.com/cluster-display-name: kube-test
example.com/environment: test
enabled: true
repo: https://git.example.com/fleet/bundles
gitops:
enabled: true
global:
cattle:
systemDefaultRegistry: ""
priorityClassName: rancher-critical
Environment
- Architecture: amd64
- Fleet Version: 0.15.2
- Cluster:
- Provider: RKE2
- Options: 3 Nodes
- Kubernetes Version: v1.35.5+rke2r1
Logs
Anything else?
The setup is a fresh new one, with no previous instances of Fleet, Rancher or RKE2 running.
Manually adding the labels works:
kubectl patch clusters.management.cattle.io local --type merge -p '{"metadata":{"labels":{"example.com/environment":"test"}}}'
kubectl patch clusters.management.cattle.io local --type merge -p '{"metadata":{"labels":{"example.com/cluster-display-name":"kube-test"}}}'
Is there an existing issue for this?
Current Behavior
The local
clusters.fleet.cattle.ioobject should have the labels as defined in the bootstrap options, but they are not added:Expected Behavior
The local
clusters.fleet.cattle.ioobject should have the labels as defined in the bootstrap options:Steps To Reproduce
Deploy the Rancher Helm Chart with the following fleet values:
Environment
Logs
Anything else?
The setup is a fresh new one, with no previous instances of Fleet, Rancher or RKE2 running.
Manually adding the labels works: