Class KubernetesClientUtils


  • public class KubernetesClientUtils
    extends java.lang.Object
    Kubernetes client utils.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient​(FlinkOperatorConfiguration operatorConfig, org.apache.flink.metrics.MetricGroup metricGroup)  
      static io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient​(FlinkOperatorConfiguration operatorConfig, org.apache.flink.metrics.MetricGroup metricGroup, io.fabric8.kubernetes.client.Config kubernetesClientConfig)  
      static boolean isCrdInstalled​(java.lang.Class<? extends io.fabric8.kubernetes.api.model.HasMetadata> clazz)
      Checks if the class for a Custom Resource is installed in the current Kubernetes cluster.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KubernetesClientUtils

        public KubernetesClientUtils()
    • Method Detail

      • getKubernetesClient

        public static io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient​(FlinkOperatorConfiguration operatorConfig,
                                                                                        org.apache.flink.metrics.MetricGroup metricGroup)
      • getKubernetesClient

        @VisibleForTesting
        public static io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient​(FlinkOperatorConfiguration operatorConfig,
                                                                                        org.apache.flink.metrics.MetricGroup metricGroup,
                                                                                        io.fabric8.kubernetes.client.Config kubernetesClientConfig)
      • isCrdInstalled

        public static boolean isCrdInstalled​(java.lang.Class<? extends io.fabric8.kubernetes.api.model.HasMetadata> clazz)
        Checks if the class for a Custom Resource is installed in the current Kubernetes cluster. TODO: remove method when FlinkStateSnapshot CRD is made mandatory
        Parameters:
        clazz - class of Custom Resource
        Returns:
        true if the CRD present in the Kubernetes cluster