Replies: 1 comment 2 replies
-
AFAIR the practice of reusing the same class to represent multiple CRD versions is something that was to be discouraged. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the past versions of Fabric8 Kubernetes Client, I was able to create the
MixedOperation
instance for managing my custom resources using thecustomResources(...)
method. It allowed me to specify my CRD class, the List class as well as the customCustomResourceDefinitionContext
instance where I was able to configure the APi version of the resource I want to use. This was super useful when working with multiple different versions of my custom resource, such asv1beta1
andv1
.However, in the recent versions of Fabric8, it seems this option is gone. I can either us the
resources(...)
method. But that always takes the APi version from the@Version
annotation on the CRD class. Or I can use thegenericKubernetesResources()
method, which allows me to specify any API version. But it does not let me use my own CRD classes. It always uses theGenericKubernetesResource
type :-(.Is there some way how to use my own CRD types while also specifying the API version manually and not through their
@Version
annotation?Just to give some background ... Strimzi uses the same CRD class as multiple resource versions. So, for example, the
Kafka
class is used for bothv1beta2
as well asv1
. But it can have only one@Version
annotation. So in order to be able to easily transition between the versions without changing the annotation, we would need to configure the API version differently.Beta Was this translation helpful? Give feedback.
All reactions