• Kubernetes Submit Queue's avatar
    Merge pull request #59264 from atlassian/set-gvk-on-conversion-to-unstructured · aded0d92
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Conversion from typed to unstructured should set GVK
    
    **What this PR does / why we need it**:
    By convention typed objects do not have `TypeMeta` information filled. When the scheme converts a typed object into Unstructured it should set type meta information explicitly otherwise Unstructured object is not recognizable.
    
    **Special notes for your reviewer**:
    Bug was not visible to tests because tests were working with a typed object with `TypeMeta` information filled. It was filled by previous tests. I have refactored tests for better isolation. Also fixed some other issues in tests.
    
    Add `?w=1` to the PR's URL to see the diff with whitespace changes ignored.
    
    **Release note**:
    ```release-note
    NONE
    ```
    /kind bug
    /sig api-machinery
    /cc @smarterclayton @deads2k
    aded0d92
Name
Last commit
Last update
..
src/k8s.io Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...