The client-go result requires a runtime.Object to decode into: https://github.com/kubernetes/kubernetes/blob/dfbe79674a33c47c1f0fd7b75882314f6db5e136/staging/src/k8s.io/client-go/rest/request.go#L1449
Because of this, the controller-runtime typed apply wraps the passed applyconfiguration with something that implements runtime.Object and embedds an interface for the applyconfiguration:
|
Into(runtimeObjectFromApplyConfiguration(obj)) |
|
func runtimeObjectFromApplyConfiguration(ac runtime.ApplyConfiguration) runtime.Object { |
|
return &applyconfigurationRuntimeObject{ApplyConfiguration: ac} |
|
} |
The json unmarshaller however doesn't inline interfaces, only embedded structs. As a result, only hypothetical fields under an ApplyConfiguration key would be deserialized into the applyconfiguration and hence we never update the passed applyconfiguration.
Deserialization of the result works fine in the case of unstructured.
/kind bug
/assign
The client-go result requires a runtime.Object to decode into: https://github.com/kubernetes/kubernetes/blob/dfbe79674a33c47c1f0fd7b75882314f6db5e136/staging/src/k8s.io/client-go/rest/request.go#L1449
Because of this, the controller-runtime typed apply wraps the passed applyconfiguration with something that implements runtime.Object and embedds an interface for the applyconfiguration:
controller-runtime/pkg/client/typed_client.go
Line 159 in 105baa6
controller-runtime/pkg/client/applyconfigurations.go
Lines 60 to 62 in 105baa6
The json unmarshaller however doesn't inline interfaces, only embedded structs. As a result, only hypothetical fields under an
ApplyConfigurationkey would be deserialized into the applyconfiguration and hence we never update the passed applyconfiguration.Deserialization of the result works fine in the case of unstructured.
/kind bug
/assign