fix: not inject metadata.namespace in manifests rendered with kustomize#8409
Merged
aaron-prindle merged 3 commits intoGoogleContainerTools:mainfrom Feb 14, 2023
Merged
Conversation
57cc928 to
e731ecd
Compare
Codecov Report
@@ Coverage Diff @@
## main #8409 +/- ##
==========================================
- Coverage 70.48% 65.13% -5.36%
==========================================
Files 515 609 +94
Lines 23150 30178 +7028
==========================================
+ Hits 16317 19656 +3339
- Misses 5776 9042 +3266
- Partials 1057 1480 +423
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
e731ecd to
46da7a4
Compare
| manifests, err := g.Generate(rCtx, out) | ||
| // TODO(https://github.com/GoogleContainerTools/skaffold/issues/8318): revisit this code to better tackle this case for kustomize. | ||
| // We could have a different renderer for kustomize that doesn't inject namespaces. | ||
| kustomizeManifests, otherManifests, err := g.Generate(rCtx, out) |
Contributor
There was a problem hiding this comment.
NOTE: @ericzzzzzzz has added a seperate kustomize renderer in his WIP PR here:
#8365
Contributor
Author
There was a problem hiding this comment.
Yes! 😄 with it we can tackle this case better.
Contributor
|
@renzodavid9 Seems this needs a rebase now after merging #8365 |
…amespaces for each renderer. Delete function that is not used
46da7a4 to
58165d1
Compare
Contributor
Author
Done! I rebased with the latest changes and changed the code to tackle this. Let me know what do you think. |
ericzzzzzzz
approved these changes
Feb 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #8403
Description
This is to to fix a v1 regression: manifests rendered with kustomize shouldn't have a
metadata.namespacefield injected by skaffold.A new
InjectNamespaceproperty is added to decide if Skaffold should inject a namespace by itself or not. For 8318 we can use this new property, reading its value from a flag or configuration.Follow-up Work
8318