4

Currently I do this:

configMapGenerator:
  - name: sql-config-map
    files:
      - "someDirectory/one.sql"
      - "someDirectory/two.sql"
      - "someDirectory/three.sql"

and I would like to do sth. like this:

configMapGenerator:
  - name: sql-config-map
    files:
      - "someDirectory/*.sql"

Is this somehow possible?

eventhorizon
  • 2,977
  • 8
  • 33
  • 57

2 Answers2

2

Nope.

See discussion around that feature in comment on "configMapGenerator should allow directories as input"

The main reason:

To move towards explicit dependency declaration, we're moving away from allowing globs in the kustomization file

Jonas
  • 121,568
  • 97
  • 310
  • 388
-1

This command works fine and will edit your kustomization.yaml:

kustomize edit add configmap my-configmap --from-file="$PWD/my-files/*"

The my-files directory has to be in the same folder that the kustomization.yaml file.

Fabrice Jammes
  • 2,275
  • 1
  • 26
  • 39