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] kluctl target inherit from another target #676

Open
4 of 14 tasks
jcpunk opened this issue Jul 19, 2023 · 1 comment
Open
4 of 14 tasks

[FEATURE] kluctl target inherit from another target #676

jcpunk opened this issue Jul 19, 2023 · 1 comment

Comments

@jcpunk
Copy link
Contributor

jcpunk commented Jul 19, 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 have one target inherit the args and context from another target, but let me add extra args or change the target.

Why do you need that?

I'm using args to permit simplified tweaking of the deployment items. I've got some limited targets that are subsets of a full deployment target[1].

Having one target inherit from the other would permit dropping some boiler plate copy/paste bits.

[1]
https://github.com/DUNE-DAQ/daq-kube/blob/develop/.kluctl.yaml

@codablock
Copy link
Collaborator

codablock commented Jan 8, 2024

@jcpunk Independent from the feature request in this issue, it looks like you're "overusing" args a lot. They are meant as an "entrypoint" into configuration, while the actual configuration is loaded from vars files.

We for example have "target types", e.g. "prod", "test", "local" and then multiple targets that set an arg like target_type: prod. Then, in the root deployment.yaml we load a vars file via:

vars:
  - file: config/{{ args.target_type }}.yaml

Based on that we can then also introduce defaults:

vars:
  - file: config/{{ args.target_type }}.yaml
  - file: config/defaults.yaml
    noOverride: true

Same for the credentials you currently configure via args. It's better to put these into vars files (also allows to use SOPS) and only specify something like a "credentials_set" via args, so that deployment.yaml can load the correct one.

FYI: I plan to add a "receipts" section on kluctl.io, that will contains infos like this.

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

No branches or pull requests

2 participants