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

[Feature] -t mandatory field for .kluctl.yaml #470

Closed
4 of 14 tasks
jcpunk opened this issue May 9, 2023 · 3 comments · Fixed by #939
Closed
4 of 14 tasks

[Feature] -t mandatory field for .kluctl.yaml #470

jcpunk opened this issue May 9, 2023 · 3 comments · Fixed by #939

Comments

@jcpunk
Copy link
Contributor

jcpunk commented May 9, 2023

Command

  • check-image-updates
  • delete
  • deploy
  • diff
  • helm-pull
  • helm-update
  • list-images
  • list-targets
  • poke-images
  • prune
  • render
  • seal
  • validate
  • version

Who are you?

Pat Riehecky, Computing Specialist at Fermilab

What do you want to do?

I'd like to provide a useful error when someone runs kluctl deploy on a repository but my discriminator expects that a target will be set.

Why do you need that?

With .kluctl.yaml containing:

discriminator: "example-{{ target.name }}"

Just running kluctl deploy results in invalid kubernetes objects. This is essentially a config issue on my end (example- is not a valid object and I'm running it wrongly).

But having a way to kick out an error to the user saying "select from the list of valid targets" when I know it is required would be handy.

@benedikt-bartscher
Copy link

Hi @jcpunk, i just wanted to mention that i am using a similar discriminator and i got the same error. So it is probably a good idea to add some kind of warning.

Maybe we could add an option for a default target to .kluctl.yml and if it's not defined make -t required?

@jcpunk
Copy link
Contributor Author

jcpunk commented May 16, 2023

I like the idea of having a "default target" but I wonder if that reduces the explicit nature of the current commands.

Right now there is "no hidden magic", folks must be explicit about which target they want.

@codablock
Copy link
Collaborator

I'm also for not having a default target. IMHO it's better to have this as explicit as possible. But I'm also open to be convinced otherwise if good use-cases are brought up.

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

Successfully merging a pull request may close this issue.

3 participants