Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#220 from monopole/noglobbing
Browse files Browse the repository at this point in the history
Eschew globbing doc
  • Loading branch information
k8s-ci-robot authored Jul 31, 2018
2 parents 6647745 + 37e9708 commit e68411b
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions docs/eschewedFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ capture improvements from the upstream base.
## Environment Variable Substitution

Kustomize wants to support the best practice of storing one's
configuration in a version control system.
entire configuration in a version control system.

Dynamically mixing in data from the environment (at `kustomize
build` time) would violate that goal.
Consulting the environment at `kustomize build` time would
violate that goal.

Kustomize will instead provide kustomization file editting
commands that can accept environment variable arguments, expand
them at _edit time_, and store the result in the kustomization
file.

If one wants to, say, set the tag used on an image to match an
environment variable, the best practice would be to make
Expand All @@ -47,6 +52,29 @@ part of some encapsulating work flow executed before `kustomize
build`.


## Globs in Kustomization Files

Kustomize wants to support the best practice of storing one's
entire configuration in a version control system.

Globbing the local file system for files not explicitly
declared in the kustomization file at `kustomize build` time
would violate that goal.

Allowing globbing in a kustomization file would also introduce
the same problems as allowing globbing in [java import]
declarations or BUILD/Makefile dependency rules.

Kustomize will instead provide kustomization file editting
commands that accept globbed arguments, expand them at _edit
time_ relative to the local file system, and store the resulting
explicit names into the kustomization file.

In this way the resources, patches and bases used at _build time_
remain explicitly declared in version control.


[base]: glossary.md#base
[kustomization]: glossary.md#kustomization
[OTS workflow]: workflows.md#off-the-shelf-configuration
[java import]: https://www.codebyamir.com/blog/pitfalls-java-import-wildcards

0 comments on commit e68411b

Please sign in to comment.