feat(1765): remove useless keys from the output yml#1775
feat(1765): remove useless keys from the output yml#1775k8s-ci-robot merged 2 commits intokubernetes:mainfrom
Conversation
Signed-off-by: Martin Jirku <martin@jirku.sk>
|
Welcome @martinjirku! |
|
I did not update docker tests, I will update it in next commit |
|
@martinjirku any updates on this? |
|
@AhmedGrati I've got much at work before Christmas. Still working... I've updated cca 40 tests sofar. |
…veEmptyInterfaces algo Signed-off-by: Martin Jirku <martin@jirku.sk>
|
AMAZING work! Thank you so much 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 LGTM! |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdrage, martinjirku The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR transforms yaml output by removing map[string]interfaces{} with no keys, or the nil fields. This PR utilizes the current implementation of the yaml transformation process in the "kompose"
(1) object -> (2) []byte (json) -> (3) interface{} -> (4) []byte (yaml). Between steps 3 and 4, there is a chance to clean the data structure by removing any empty fields.Which issue(s) this PR fixes:
Fixes #1758
Special notes for your reviewer:
IMHO, The empty artifacts (such as strategy {} , resources: {},...) are present because we have e.g. in the
DeploymentSpec.Strategystruct not the reference (a pointer) to the struct, since this change would be outside of the kompose scope and I am not sure if it is feasible, I've decided to fix it by removing all empty fields.Is this correct approach I should proceed with, or should I open (or search if a ticket exists) in the k8s/kubernetes repo for change in the API app types?