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

kustomize dependencies include environment files (#3720) #3721

Merged

Conversation

nicknovitski
Copy link
Contributor

@nicknovitski nicknovitski commented Feb 22, 2020

Fixes #3720.

Description

ConfigMapGenerators and SecretGenerators can have env or envs fields, with paths to "environment files", with a format like this:

foo=bar
baz=qux

Each line in the file creates a new key-value pair in the generated ConfigMap or Secret. Thus, changes to the contents of those files should trigger redeploys.

User facing changes

Before

While running skaffold dev or debug, changes to the environment files would not trigger a redeploy.

After

They do.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Mentions any output changes.
  • Adds documentation as needed: user docs, YAML reference, CLI reference.
  • Adds integration tests if needed.

Reviewer Notes

  • The code flow looks good.
  • Unit test added.
  • User facing changes look good.

Release Notes

- kustomize deployer correctly watches for changes to files listed in the `env` or `envs` keys of `configMapGenerators` and `SecretGenerators`

@nicknovitski
Copy link
Contributor Author

If I remember right, a maintainer has to approve the running of the kokoro tests.

@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Feb 28, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Feb 28, 2020
pkg/skaffold/deploy/kustomize.go Outdated Show resolved Hide resolved
pkg/skaffold/deploy/kustomize.go Show resolved Hide resolved
pkg/skaffold/util/util.go Outdated Show resolved Hide resolved
@tejal29 tejal29 self-assigned this Feb 28, 2020
@codecov
Copy link

codecov bot commented Feb 28, 2020

Codecov Report

Merging #3721 into master will decrease coverage by 0.2%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/deploy/kustomize.go 73.8% <100%> (+1.3%) ⬆️
pkg/skaffold/util/term.go 50% <0%> (-50%) ⬇️
pkg/skaffold/color/formatter.go 90% <0%> (-10%) ⬇️
pkg/skaffold/initializer/analyze/analyze.go 89.09% <0%> (-2.58%) ⬇️
pkg/skaffold/build/custom/script.go 52.38% <0%> (-1.47%) ⬇️
pkg/skaffold/deploy/helm.go 77.47% <0%> (-1.18%) ⬇️
pkg/skaffold/update/update.go 34.37% <0%> (-1.11%) ⬇️
pkg/skaffold/runner/dev.go 66.66% <0%> (-0.63%) ⬇️
pkg/skaffold/build/parallel.go 93.93% <0%> (-0.43%) ⬇️
pkg/skaffold/initializer/config.go 100% <0%> (ø) ⬆️
... and 12 more

@tejal29
Copy link
Member

tejal29 commented Feb 28, 2020

Thank you for your PR! This looks really great, except for some nits. If you append Env to Envs you don't need the extra AbosultePath func.

Thank you! looking forward to get this in!

@nicknovitski
Copy link
Contributor Author

Thanks for your suggestions, I've added them.

@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Mar 16, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Mar 16, 2020
@balopat balopat merged commit 6f829c0 into GoogleContainerTools:master Apr 2, 2020
balopat added a commit to balopat/skaffold that referenced this pull request Apr 2, 2020
@nicknovitski nicknovitski deleted the kustomize-watch-env-files branch February 1, 2021 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kustomize deployer does not watch changes to environment files
5 participants