-
Notifications
You must be signed in to change notification settings - Fork 536
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
Properly parse metadata of custom Kubernetes objects #1695
Properly parse metadata of custom Kubernetes objects #1695
Conversation
/assign brendandburns |
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.
Great work - only a couple of nitpicks.
I think we should port this over to release-1.x
as well so that we will have it in the next major release as well.
/assign mstruebing |
Whats the process here? |
Yes exactly, otherwise these changes will be lost once we release the new client without the request library as a replacement for the current master. You can probably reuse most of the code you've created in this PR. Your changes looking good from my point of view - will just wait a bit for @brendandburns to have a look as well probably. |
Looks good to me also. /lgtm Once this merges, you can cherry-pick this against the release-1.x branch, but it may require reworking. |
Looks like this is failing linting. Please fix to match our style guide. |
ok will do that once merged |
From the github action logs:
You should run: |
thanks. Pushed all changes |
/lgtm Thanks 🚀 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mstruebing, schrodit The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Properly parse metadata of custom Kubernetes objects
### What does this PR do? * Removes undeeded metadata objects which are not applicable / not needed when applying a patch. This includes resourceVersion, UID, selfLink and creationTimestamp. These are automatically created when applying a resource if undefined / blank. * This change is needed as Kubernetes javascript client added serialization / checks with regards to creationTimestamps as well as other metadata objects from PR: kubernetes-client/javascript#1695 ### Screenshot / video of UI <!-- If this PR is changing UI, please include screenshots or screencasts showing the difference --> ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes podman-desktop#9260 Closes podman-desktop#9262 ### How to test this PR? <!-- Please explain steps to verify the functionality, do not forget to provide unit/component tests --> - [X] Tests are covering the bug fix or the new feature 1. Edit any k8s yaml 2. Press apply 3. Success 4. Edit again 5. Press apply 6. Success Signed-off-by: Charlie Drage <charlie@charliedrage.com>
### What does this PR do? * Removes undeeded metadata objects which are not applicable / not needed when applying a patch. This includes resourceVersion, UID, selfLink and creationTimestamp. These are automatically created when applying a resource if undefined / blank. * This change is needed as Kubernetes javascript client added serialization / checks with regards to creationTimestamps as well as other metadata objects from PR: kubernetes-client/javascript#1695 ### Screenshot / video of UI <!-- If this PR is changing UI, please include screenshots or screencasts showing the difference --> ### What issues does this PR fix or reference? <!-- Include any related issues from Podman Desktop repository (or from another issue tracker). --> Closes #9260 Closes #9262 ### How to test this PR? <!-- Please explain steps to verify the functionality, do not forget to provide unit/component tests --> - [X] Tests are covering the bug fix or the new feature 1. Edit any k8s yaml 2. Press apply 3. Success 4. Edit again 5. Press apply 6. Success Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Partially fixed #852 by adding a helper Seriliazer.
That serializer is aware of Kubernetes objects and parses them accordingly to a valid KubernetesObject (before some types were wrongly parsed e.g.
creationTimestamp
was a string instead of a Date).Supporting custom objects will follow in a separate PR.
But the idea is that there will be a second map in the new Serializer were custom objects can be added at runtime.