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]: Run all components of a ConfigTemplate #5831

Open
salotz opened this issue Mar 14, 2024 · 0 comments
Open

[FEATURE]: Run all components of a ConfigTemplate #5831

salotz opened this issue Mar 14, 2024 · 0 comments

Comments

@salotz
Copy link

salotz commented Mar 14, 2024

Feature Request

Background / Motivation

Using ConfigTemplates

What should the user be able to do?

If I have a ConfigTemplate e.g.:

---
kind: ConfigTemplate
name: tanka-export
inputsSchemaPath: tanka-export_schema.json

configs:

  - kind: Build
    name: ${parent.name}
    type: exec
    description: |
      Render K8s manifests using Tanka.

    include:
      - ${inputs.environment}
      # everything we need for tk to run
      - chartfile.yaml
      - charts
      - jsonnetfile.json
      - jsonnetfile.lock.json
      - lib
      # we need this but skip the symlinks that tanka maintains
      - vendor/github.com

    spec:
      shell: true
      command:
        - |
          tk export ./export/${inputs.name} ${inputs.environment}
          # remove this for downstream things that choke on this
          rm ./export/${inputs.name}/manifest.json
  

I should be able to run all the sub-components it generates by the name of the action that expands it, e.g. for:

---
kind: RenderTemplate
template: tanka-export
name: kapp-example-export
inputs:
  environment: ./environments/kapp-example
  name: kapp-example
garden do-template kapp-example-export

Should run all the generated actions.
Currently I have to know how the name is generated and run that:

garden build kapp-example-export

Which is why I don't format the name, otherwise its too confusing.

Why do they want to do this? What problem does it solve?

Using ConfigTemplates could easily become confusing without external documentation. I.e. the RenderTemplate isn't self-documenting on usage.

Suggested Implementation(s)

The ConfigTemplate could figure out the kind and names of the actions and just run them all for you.

How important is this feature for you/your team?

Between these two as I'm not depending on ConfigTemplate too much at this point:

🌵 Not having this feature makes using Garden painful

🌹 It’s a nice to have, but nice things are nice 🙂

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

No branches or pull requests

1 participant