Package io.micronaut.kubernetes.client
Class ModelMapper
java.lang.Object
io.micronaut.kubernetes.client.ModelMapper
This class is inspired by the implementation of the io.kubernetes.client.util.ModelMapper.java.
The difference is that this class doesn't prefetch all model classes but instead does the resolution
on demand. Also the integration with Discovery
is placed in the DiscoveryCache
bean.
- Since:
- 3.1
- Author:
- Pavol Gressa
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.kubernetes.client.apimachinery.GroupVersionKind
getGroupVersionKindByClass
(Class<? extends io.kubernetes.client.common.KubernetesObject> clazz) Resolves version and kind of the theclazz
.
-
Constructor Details
-
ModelMapper
public ModelMapper()
-
-
Method Details
-
getGroupVersionKindByClass
public io.kubernetes.client.apimachinery.GroupVersionKind getGroupVersionKindByClass(Class<? extends io.kubernetes.client.common.KubernetesObject> clazz) Resolves version and kind of the theclazz
. To resolve the api group of the clazz useDiscoveryCache
.- Parameters:
clazz
- class to resolve- Returns:
- version kind
-