Class ModelMapper

java.lang.Object
io.micronaut.kubernetes.client.ModelMapper

public class ModelMapper extends Object
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 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 the clazz. To resolve the api group of the clazz use DiscoveryCache.
      Parameters:
      clazz - class to resolve
      Returns:
      version kind