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

Enable multiple kustomizations in the kustomize deployer #3585

Merged

Conversation

corneliusweig
Copy link
Contributor

Fixes #1872.

Description

So far, the kustomize deployer only accepted a single path to a kustomization folder. This required an umbrella kustomization when working with multiple kustomization folders. On the other hand, for helm it has always been possible to deploy multiple charts, so that the UX between the differnent deployers was kind of inconsistent as pointed out in #1872.
Therefore, this PR enables multiple kustomization folders/paths in a single deployer stanza.

User facing changes

The (string) key changed to deploy.kustomize.paths ([]string). When not specified, it defaults to []string{"."} and behaves equivalently to the previous config version.

Before

The pipeline had a key deploy.kustomize.path of type string to specify a single kustomization folder. When empty it defaults to ".".

After

The pipeline has a key deploy.kustomize.paths of type []string to specify a multiple kustomization folders. When empty (nil or length zero) it defaults to []string{"."}.

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

Examples of user facing changes:
- The Kustomize deployer now handles multiple kustomization root paths.

@codecov
Copy link

codecov bot commented Jan 26, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@1e6a52c). Click here to learn what that means.
The diff coverage is 92%.

Impacted Files Coverage Δ
pkg/skaffold/schema/latest/config.go 100% <ø> (ø)
pkg/skaffold/schema/defaults/defaults.go 94.41% <100%> (ø)
pkg/skaffold/schema/v2alpha2/upgrade.go 85.71% <100%> (ø)
pkg/skaffold/deploy/deploy_mux.go 89.13% <100%> (ø)
pkg/skaffold/deploy/kustomize.go 71.62% <87.5%> (ø)

Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
PRs GoogleContainerTools#3577 and GoogleContainerTools#3578 introduced a conflict with respect to trailing newlines.
@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Jan 26, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jan 26, 2020
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thank you @corneliusweig! And thanks for fixing the init_test.go bug - our lines has crossed there somehow with out of order PR merges or something.

@balopat balopat merged commit 461a278 into GoogleContainerTools:master Jan 27, 2020
@corneliusweig corneliusweig deleted the w/multiple-kustomize branch January 27, 2020 22:31
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.

[feature request] multiple Kustomizations
4 participants