@stolostron/multicluster-sdk
Version:
Provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management.
24 lines • 1.26 kB
TypeScript
import { K8sResourceCommon } from '@openshift-console/dynamic-plugin-sdk';
import { V1CustomResourceDefinitionCondition } from '@kubernetes/client-node';
/**
* Helper function to check for condition - similar to checkForCondition from status-conditions.ts
*/
export declare const checkForCondition: (condition: string, conditions: V1CustomResourceDefinitionCondition[], status?: string) => boolean;
/**
* Checks if a managed cluster meets the default filtering criteria:
* - Has the cluster proxy addon available label
* - Has ManagedClusterConditionAvailable status: 'True'
*/
export declare const isClusterAvailable: (cluster: K8sResourceCommon) => boolean;
/**
* Gets the cluster set name from a ManagedCluster resource.
* Returns the cluster set label value or 'default' if not present.
*/
export declare const getClusterSetName: (cluster: K8sResourceCommon) => string;
/**
* Filters clusters based on the provided criteria.
* When includeAll is false, only returns clusters that meet the default availability criteria.
* When includeAll is true, returns all clusters that have a name.
*/
export declare const filterClusters: (clusters: K8sResourceCommon[], includeAll: boolean) => K8sResourceCommon[];
//# sourceMappingURL=clusterUtils.d.ts.map