Overrides not working in .cluster-api/ only in .config/cluster-api
What steps did you take and what happened?
clusterctl generate cluster k8s-management --infrastructure vsphere --kubernetes-version v1.29.1 --control-plane-machine-count 1 --worker-machine-count 1 --flavor=test -v8 --infrastructure vsphere:v1.9.0 > /dev/null
This should use overrides from ~/.cluster-api/overrides yet this wasn't found. Upon stepping through a debugger i noticed that the path at https://github.com/kubernetes-sigs/cluster-api/blob/main/cmd/clusterctl/client/repository/overrides.go#L110 was set to the $XDG_CONFIG_HOME/cluster-api location - perhaps from this change: https://github.com/kubernetes-sigs/cluster-api/pull/6913 ?
Once i moved my overrides to ~/.config/cluster-api/overrides this was then picked up:
ryan@box:~$ clusterctl generate cluster k8s-management --infrastructure vsphere --kubernetes-version v1.29.1 --control-plane-machine-count 1 --worker-machine-count 1 --flavor=test -v8 --infrastructure vsphere:v1.9.0 > /dev/null
Using configuration File="/home/ryan/.cluster-api/clusterctl.yaml"
Using Override="cluster-template-test.yaml" Provider="infrastructure-vsphere" Version="v1.9.0"
...
What did you expect to happen?
According to the docs, overrides can be picked up from both ~/.cluster-api/overrides or ~/.config/cluster-api/overrides
Cluster API version
1.6.1
Kubernetes version
No response
Anything else you would like to add?
No response
Label(s) to be applied
/kind bug /area clusterctl /area provider/vmware
/triage accepted I don't remember in detail the change for $XDG_CONFIG_HOME but we should look into it and eventually fix or improve documentation /help
@fabriziopandini: This request has been marked as needing help from a contributor.
Guidelines
Please ensure that the issue body includes answers to the following questions:
- Why are we solving this issue?
- To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
- Does this issue have zero to low barrier of entry?
- How can the assignee reach out to you for help?
For more details on the requirements of such an issue, please see here and ensure that they are met.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.
In response to this:
/triage accepted I don't remember in detail the change for $XDG_CONFIG_HOME but we should look into it and eventually fix or improve documentation /help
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/priority important-soon
This issue is labeled with priority/important-soon but has not been updated in over 90 days, and should be re-triaged.
Important-soon issues must be staffed and worked on either currently, or very soon, ideally in time for the next release.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Deprioritize it with
/priority important-longtermor/priority backlog - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
This issue is labeled with priority/important-soon but has not been updated in over 90 days, and should be re-triaged.
Important-soon issues must be staffed and worked on either currently, or very soon, ideally in time for the next release.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Deprioritize it with
/priority important-longtermor/priority backlog - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
/priority backlog
/assign