Interface KubernetesClusterProvider
- All Superinterfaces:
ClusterProvider,PluginProvider
ClusterProvider for Kubernetes-based clusters (managed control-plane
offerings such as EKS, AKS, and GKE, as well as self-managed kubeadm-style clusters).
On the appliance side this provider is backed by a host service that extends the built-in
KubernetesHostService. That means a plugin implementing this interface inherits the full
suite of core Kubernetes operations (namespace management, node drain/cordon, kubectl/helm
execution, service-account handling, brownfield node sync, etc.) for free. A plugin only needs to
implement the Facet interfaces below to supply the small, genuinely cloud-specific seams
where the managed offering differs from a vanilla cluster.
Routing model. The host service routes each overridable operation by checking
whether this provider implements the corresponding facet (instanceof); if it does, the
facet is invoked, otherwise the inherited core Kubernetes behavior runs. This mirrors the existing
facet convention on ClusterProvider (ServerPowerFacet, ClusterUpdateFacet)
and on ProvisionProvider.
Refresh model. When a cluster is refreshed, the appliance runs the full
built-in Kubernetes sync first (node discovery, namespaces, workloads, etc.). Individual
pieces of that sync can be customized by implementing the facets below (ApiAccessFacet,
NodeSyncFacet, the per-resource *CacheFacets, etc.) — the host service
substitutes your facet wherever the core sync reaches one of those seams. After the built-in sync
completes, the base
ClusterProvider.refresh(com.morpheusdata.model.ComputeServerGroup) is invoked last. For
most Kubernetes clusters this final call is a no-op: the built-in sync has already done the work.
Only implement refresh when you have a genuine cloud-side concern to reconcile that the
core Kubernetes sync does not cover (for example cloud node-group or autoscaler state).
- Since:
- 1.4.x
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceImplement this facet when the kubeconfig / API access document cannot be assembled generically from the cluster'sserviceUrl,serviceCert, and token, and instead requires a cloud-specific construction (for example an exec-credential plugin stanza).static interfaceImplement this facet to delegate node-count changes to the cloud's managed autoscaling / node group API instead of Morpheus provisioning individual nodes.static interfaceReplace the "cache config maps" step.static interfaceReplace the "cache containers (workloads)" step.static interfaceManaged Kubernetes offerings issue API credentials from the cloud control plane rather than from a long-lived in-cluster service account.static interfaceReplace the "cache cron jobs" step.static interfaceReplace the "cache endpoints" step.static interfaceReplace the "cache events" step.static interfaceReplace the "cache helm status" step.static interfaceReplace the "cache hosts" (node sync) step.static interfaceReplace the "cache ingresses" step.static interfaceReplace the "cache jobs" step.static interfaceReplace the "cache join command" step.static interfaceReplace the "cache namespaces" step.static interfaceReplace the "cache network policies" step.static interfaceImplement this facet to post-process the list of nodes discovered during a cluster sync.static interfaceReplace the "cache role bindings" step.static interfaceReplace the "cache roles" step.static interfaceReplace the "cache secrets" step.static interfaceImplement this facet to reconcile cluster-level state after a server group is updated — most commonly to swap nodeComputeServerTypes and layouts when a cluster transitions between managed and unmanaged, and to regenerate API credentials as a result.static interfaceReplace the "cache service accounts" step.static interfaceReplace the "cache services" step.static interfaceReplace the "cache storage classes" step.static interfaceReplace the "cache version" step.static interfaceReplace the "cache volumes" step.static interfaceReplace the "cache volume claims" step.Nested classes/interfaces inherited from interface com.morpheusdata.core.providers.ClusterProvider
ClusterProvider.ClusterUpdateFacet, ClusterProvider.ServerPowerFacetNested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.ConfigurationDriftCheckFacet<T>, PluginProvider.EventSubscriberFacet<E extends Event>, PluginProvider.UpdateFacet<T> -
Method Summary
Modifier and TypeMethodDescriptiondefault StringKubernetes cluster providers default their provider type to"kubernetes"so that the appliance applies Kubernetes-specific category conventions and resolves the Kubernetes host service.Methods inherited from interface com.morpheusdata.core.providers.ClusterProvider
canDeleteVirtualImages, convertClusterToManaged, deleteCluster, deleteServer, filterStorageVolumeTypes, finalizeLinuxComputeServer, getAvailableBackupProviders, getAvailableProvisionProviders, getCircularIcon, getControllerTypes, getDatastoreTypes, getDefaultNamespace, getDeployTargetService, getDescription, getIacResourceMappingProvider, getIcon, getNetworkTypes, getOptionTypes, getProvisionProvider, getSupportedNetworkProviderCodes, getTabList, getWorkerTypes, hasAffinityGroups, hasClusterStorage, hasDatastoreStorage, hasDefaultDataDisk, hasMasters, hasPricing, hasWorkers, isRefreshable, refresh, refreshDaily, supportsCloudScaling, supportsCustomLayouts, useLocalKubeCtl, validateServerGroup, validateServerGroupConfigMethods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin
-
Method Details
-
getProviderType
Kubernetes cluster providers default their provider type to"kubernetes"so that the appliance applies Kubernetes-specific category conventions and resolves the Kubernetes host service. Override only if a more specific type discriminator is required.- Specified by:
getProviderTypein interfaceClusterProvider- Returns:
- the provider type discriminator,
"kubernetes"by default
-