• Clayton Coleman's avatar
    Break kubectl from assuming details of codecs · 2fd38a7d
    Clayton Coleman authored
    Most of the logic related to type and kind retrieval belongs in the
    codec, not in the various classes. Make it explicit that the codec
    should handle these details.
    
    Factory now returns a universal Decoder and a JSONEncoder to assist code
    in kubectl that needs to specifically deal with JSON serialization
    (apply, merge, patch, edit, jsonpath). Add comments to indicate the
    serialization is explicit in those places. These methods decode to
    internal and encode to the preferred API version as previous, although
    in the future they may be changed.
    
    React to removing Codec from version interfaces and RESTMapping by
    passing it in to all the places that it is needed.
    2fd38a7d
sorting_printer_test.go 4.51 KB