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

[kpt deployer] Fix non-kustomize manifests not rendered issue #5627

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

yuwenma
Copy link
Contributor

@yuwenma yuwenma commented Apr 2, 2021

Fixes: #5580

Description
root cause: version changes. kpt-sourced manfiest cannot pipeline directly into the kpt function pipeline.
Fix: The sourced manifest is of type "ResourceList" and the raw manifests are stored in the ResourceList.Items.

@yuwenma yuwenma requested a review from nkubala April 2, 2021 21:43
@yuwenma yuwenma requested a review from a team as a code owner April 2, 2021 21:43
@google-cla google-cla bot added the cla: yes label Apr 2, 2021
@codecov
Copy link

codecov bot commented Apr 2, 2021

Codecov Report

Merging #5627 (6e19c6e) into master (2e55bec) will decrease coverage by 0.89%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5627      +/-   ##
==========================================
- Coverage   71.42%   70.53%   -0.90%     
==========================================
  Files         398      410      +12     
  Lines       14654    15643     +989     
==========================================
+ Hits        10467    11034     +567     
- Misses       3409     3796     +387     
- Partials      778      813      +35     
Impacted Files Coverage Δ
pkg/skaffold/deploy/kpt/kpt.go 74.22% <50.00%> (-1.05%) ⬇️
pkg/skaffold/build/build.go 0.00% <0.00%> (-85.72%) ⬇️
cmd/skaffold/app/cmd/run.go 71.42% <0.00%> (-16.08%) ⬇️
cmd/skaffold/app/cmd/commands.go 81.25% <0.00%> (-9.00%) ⬇️
pkg/skaffold/debug/transform_python.go 73.68% <0.00%> (-5.77%) ⬇️
pkg/skaffold/util/tar.go 50.66% <0.00%> (-5.34%) ⬇️
pkg/skaffold/runner/new.go 62.56% <0.00%> (-5.02%) ⬇️
pkg/skaffold/schema/validation/validation.go 86.64% <0.00%> (-3.78%) ⬇️
pkg/skaffold/instrumentation/meter.go 54.54% <0.00%> (-3.52%) ⬇️
pkg/skaffold/server/server.go 41.96% <0.00%> (-1.61%) ⬇️
... and 90 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e55bec...6e19c6e. Read the comment docs.

Copy link
Contributor

@MarlonGamez MarlonGamez 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 overall, I would just like to have a bit of documentation in code to explain what's happening here

@@ -312,7 +312,28 @@ func (k *Deployer) renderManifests(ctx context.Context, _ io.Writer, builds []bu
if err != nil {
return nil, fmt.Errorf("kustomize build: %w", err)
}
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add a comment here to just explain why this workaround is needed because I don't think it's super clear what's happening here without context from the github issue/PR

root cause: version changes. kpt-sourced manfiest cannot pipeline directly into the kpt function pipeline.
Fix: The sourced manifest is of type "ResourceList" and the raw manifests are stored in the ResourceList.Items.
@MarlonGamez
Copy link
Contributor

Thanks for the changes, CI flaked on this but I restarted the job. Once it's green I'll go ahead and merge

@MarlonGamez MarlonGamez merged commit bb89cbb into GoogleContainerTools:master Apr 8, 2021
@yuwenma
Copy link
Contributor Author

yuwenma commented Apr 8, 2021

Thank you @MarlonGamez!

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.

kpt deployer fails when there's no kustomization.yaml
2 participants