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

Add --name-template flag for generate cluster sub-command #8534

Closed
rbjorklin opened this issue Apr 15, 2023 · 5 comments
Closed

Add --name-template flag for generate cluster sub-command #8534

rbjorklin opened this issue Apr 15, 2023 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@rbjorklin
Copy link

What would you like to be added (User Story)?

  1. As an operator I would like to be able to exclude the cluster name from the name of all the generated resources. Given that all resources are namespaced the value of having the name also included in each resource name eludes me.

Detailed Description

I would like to be able to call clusterctl generate cluster --name-template '{{ .Name }}' and have that exclude the cluster name from each individual resource. The current default could be considered to be of the form: {{ .ClusterName }}-{{ .Name }}

Anything else you would like to add?

This idea is not new, helm has this feature. See helm/helm#1015

Label(s) to be applied

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 15, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 15, 2023
@fabriziopandini fabriziopandini added the triage/needs-information Indicates an issue needs more information in order to work on it. label May 1, 2023
@fabriziopandini
Copy link
Member

fabriziopandini commented May 1, 2023

Let's see if other users have similar needs, but IMO we should not compare clusterctl to full-fledged template engines, and thus also assume advanced template features should be considered out of scope.

The core scope of clusterctl is to provide a solution to manage the lifecycle of providers - which is a complex and very specific problem - while managing templates is a facility we provided to get users started, but we are well aware that the majority of users rely on other tools existing in the ecosystem which are great in managing yaml, like helm, kapp or git-ops tools.

Also, clusterctl already supports pluggable template engines, so if someone wants more advanced templating features this can be achieved by using clusterctl as a library and providing a type that implements this interface.

There are also "no code" options, like https://cluster-api.sigs.k8s.io/clusterctl/configuration.html#provider-repositories or https://cluster-api.sigs.k8s.io/clusterctl/configuration.html#overrides-layer.

Last but not least, I would prefer to not add more complexity to our yaml processor before we define a path forward for #8325

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 18, 2024
@rbjorklin
Copy link
Author

assume advanced template features should be considered out of scope.

Fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants