kudobuilder / kudo

Kubernetes Universal Declarative Operator (KUDO)
https://kudo.dev
Apache License 2.0
1.17k stars 103 forks source link

Allow KUDO to apply all files in a folder, without having to manually list out each file individually. #1793

Open ChristianKlass opened 3 years ago

ChristianKlass commented 3 years ago

What would you like to be added: If say I have folder in the templates folder, let's call it config, so the folder structure is as follows:

operators/someoperator:
operator.yaml  params.yaml  templates

operators/someoperator/templates:
configs  deployment.yaml  service.yaml

operators/someoperator/templates/configs:
configmap_001.yaml  configmap_002.yaml  ...

It would be good if I could do something like this to have KUDO process all the files in that folder:

tasks:
  - name: add-configs
    kind: apply
    spec:
      resources:
        - configs/*.yaml
        # or maybe
        - configs

Why is this needed: It would be nice because it's possible that we would have generated configmaps in the config folder (like in my situation), and we wouldn't know how many there will be.

Thanks!