istio-java-api icon indicating copy to clipboard operation
istio-java-api copied to clipboard

createOrReplace not working

Open chestarss opened this issue 3 years ago • 2 comments

DestinationRule destinationRule = objectMapper.readValue(yaml, DestinationRule.class); Object o = istioClient.inAnyNamespace().v1alpha3DestinationRule().createOrReplace(destinationRule);

java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Lio.fabric8.kubernetes.api.model.HasMetadata; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap'; [Lio.fabric8.kubernetes.api.model.HasMetadata; is in unnamed module of loader 'app')

at io.fabric8.kubernetes.client.dsl.base.BaseOperation.createOrReplace(BaseOperation.java:79)
at so.dian.zerg.nydus.server.service.k8s.impl.K8sResourceServiceImpl.syncDR(K8sResourceServiceImpl.java:50)

chestarss avatar Apr 12 '21 10:04 chestarss

Which version of the API are you using?

metacosm avatar Jun 04 '21 13:06 metacosm

Which version of the API are you using?

1.7.7

chestarss avatar Jun 07 '21 07:06 chestarss