Closed ghost closed 7 years ago
possibly related to https://github.com/openshift/origin/issues/15783
@juanvallejo given the changes you made for that issue, any chance you can take a look here?
@bparees sure, will take a look
I suspect this issue is happening due to brokers
not being supported in the client yet. In both cases of oc new-app ...
and oc process ... | oc create -f -
, the client deals with a *runtime.Unknown
object. The only difference is that oc new-app
fails when trying to use the metadata.Accessor to add annotations to the *runtime.Unknown object, which does not implement a metav1.Object
, and after that would also fail here when attempting to extract type info from a *runtime.Unknown
object.
cc @deads2k
I thought our clients were supposed to handle this through api discovery?
After looking through, I found that a list of result objects is generated from a template here, before being decoded using the LegacyCodec, which still gives us a list of *runtime.Unknown
objects when it fails to decode servicecatalog.k8s.io/Broker
objects.
I have made a patch that uses the universal decoder / unstrucutred decoder instead, and it succeeds in creating a Broker template on the server: https://github.com/openshift/origin/pull/16049
When adding a broker object to a template, it can be used an oc process, but not oc new-app.
Version
oc v3.6.0+c4dd4cf kubernetes v1.6.1+5115d708d7 features: Basic-Auth GSSAPI Kerberos SPNEGO
Steps To Reproduce
oc process -f broker.yaml -p BROKER_URL=http://asb-1338.example.com -p NAMESPACE=sample | oc create -f -
oc new-app --file=broker.yaml -p BROKER_URL=http://asb-1338.example.com -p NAMESPACE=sample
Current Result
failed to add annotation to object of type "servicecatalog.k8s.io/v1alpha1, Kind=Broker", this resource type is probably unsupported by your client version.
Expected Result
Same as 2.