-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: allow and deny list support for schema field overwriting (namely label and image fields atm) #7056
Conversation
c7c18ef
to
7e2f507
Compare
354a266
to
8ff17e2
Compare
Codecov Report
@@ Coverage Diff @@
## main #7056 +/- ##
==========================================
- Coverage 70.48% 68.43% -2.05%
==========================================
Files 515 560 +45
Lines 23150 26437 +3287
==========================================
+ Hits 16317 18093 +1776
- Misses 5776 7094 +1318
- Partials 1057 1250 +193
Continue to review full report at Codecov.
|
be86e5d
to
67bb08f
Compare
9bb7832
to
4170f41
Compare
22c6a14
to
c1c4698
Compare
ce8ef96
to
d45fb07
Compare
The only failing test - the kokoro test failure is a known flake - |
843e134
to
8dddc83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed offline with @aaron-prindle. Having resourceSelector
be top level can have issues with applying profiles and config upgrades. It's safer nested under deploy.resourceSelector
.
Otherwise, LGTM.
8dddc83
to
edd7352
Compare
Current status: Possible issue:
@gsquared94 can you clarify if this field is nested if |
1320455
to
e891951
Compare
…y label and image fields atm)
e891951
to
39b6c0a
Compare
Final status, Cloud Deploy needs this field to be top level for their module usage requirments.
|
@aaron-prindle I'm really excited about this feature! Are there already docs for it? If not, perhaps the DD (https://goto.google.com/skaffold-field-overwriting) could be made public? |
Awesome @afirth! There are public docs for it here: Please file any issues w/ the docs or feature that you encounter. Currently I would recommend using this for:
|
fixes #6416
Related DD here: go/skaffold-field-overwriting
This PR adds the abillity to configure what K8s Group Kind's and which fields specifically are overwritten by skaffold when it renders & deploys manifests. Use cases and related issues include:
rendering & deploying custom CRDs as part of a skaffold dev session (currently skaffold only supports a set of hardcoded CRDs here)
rendering and deploying any schema that has immutable spec that would previously cause skaffold to fail on re-deployment
.spec.volumeClaimTemplates.*.metadata.labels
immutable field. While fix(labelling): hotfix for issues related to deploy erroring due to nested yaml field overriding in StatefulSet w/ PVC #7011 fixed that specific issue, this PR generalizes to work with any such immutable field as it is user configurable.Related Issues
Allow-List of supported k8s kinds should be used only when applying labels #4489
Skaffold labels cause incompatibility with subsequent standard kubectl commands #6416
Question: How to handle immutable tags? #6998
Image not recognized in crd k8s manifest #4081
Example usage of the
transform
field:Open Questions:
transform
a good name. IIUC, skaffold v2 introduces arender
phase which also has something likerender.transform
as a field. Any opinions on better alternatives for naming or if that might be a source of confusion worth addressing now once V2 is introduced?Future Work: