You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cleanup deadcode in preperation for k8s gogo changes
See
kubernetes/enhancements#5590 (comment);
we use a lot of very questionable gogoproto on k8s type operations.
The good news is, as far as I can every single one of these is on code
paths that never actually touch k8s types (anymore), or are on entirely
dead code paths.
My plan is to split this into two PRs to make things simpler/safer.
This PR removes strictly dead code that is in this area. There is a
surprising amount here! I think this is as we moved more and more stuff
away from these legacy `config.Config` paths towards kclient/krt the
cruft just stayed around.
In the next PRs I will remove the gogo proto handling (TBD how, if we
want to fail or fallback).
I've analyzed the remaining usages:
```
DeepCopy
UpdateHealth, DeleteHealthCondition (WE only)
mergeVirtualServicesIfNeeded (on VS spec)
mergeDestinationRule
mergeHTTPRoutes (its a VirtualService though, not a HTTPRoute)
resolveVirtualServiceShortnames (on VS only)
convertToWasmPluginWrapper (On WasmPlugin)
In a bunch of tests
ApplyJSON
FromJSON
ConvertObject
webhook.validate (only called for istio types)
ParseInputs (should be called for everything)
kube/file.NewController
Only allows Istio objects but I think its going to read all of them, so we couldn't panic or something?
ApplyJSONStrict
fromSchemaAndJSONMap
validateResource (in istioctl, only used on Istio types)
Equals()
We already explicitly do not use gogoproto.Equals EXCEPT in `needsPush` which only operates on istio.io types
ToProto():
PilotConfigToResource (I think this will only have Istio types)
ToJSON():
ToRaw()
ConvertConfig
used in configz handler, which should only have Istio types
ToPrettyJSON():
Not even used on protos, bug in xds/debug.go
```
0 commit comments