
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@stolostron/multicluster-sdk
Advanced tools
Provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management.
A React SDK for working with multicluster OpenShift/Kubernetes resources from the OpenShift Console.
This SDK provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management (RHACM). It aims to provide similar functionality to the dynamic plugin(https://www.npmjs.com/package/@openshift-console/dynamic-plugin-sdk) SDK but for multicluster scenarios.
npm install @stolostron/multicluster-sdk
The multicluster SDK provides components and hooks that enable your dynamic plugins to work with resources across multiple clusters.
Setup depends on your usage scenarios.
useIsFleetAvailable hook to check if support is available. Because it is not permitted to call hooks conditionally, if you are using these multicluster SDK hooks, then you must call them with arguments that render the hook in a disabled state when fleet support is unavailable. Otherwise you will get empty results or errors. See the API Reference for details.REQUIRED_PROVIDER_FLAG constant.// Example code will be added after API stabilization
| Function | Type |
|---|---|
fleetK8sCreate | <R extends K8sResourceCommon>(options: OptionsCreate<R>) => Promise<R> |
| Function | Type |
|---|---|
fleetK8sDelete | <R extends K8sResourceCommon>(options: OptionsDelete<R>) => Promise<R> |
| Function | Type |
|---|---|
fleetK8sGet | <R extends K8sResourceCommon>(options: OptionsGet) => Promise<R> |
| Function | Type |
|---|---|
fleetK8sPatch | <R extends K8sResourceCommon>(options: OptionsPatch<R>) => Promise<R> |
| Function | Type |
|---|---|
fleetK8sUpdate | <R extends K8sResourceCommon>(options: OptionsUpdate<R>) => Promise<R> |
| Function | Type |
|---|---|
FleetResourceLink | React.FC<FleetResourceLinkProps> |
| Function | Type |
|---|---|
getFleetK8sAPIPath | (cluster?: string or undefined) => Promise<string> |
Hook that provides information about user access to a given resource.
| Function | Type |
|---|---|
useFleetAccessReview | ({ group, resource, subresource, verb, name, namespace, cluster, }: FleetAccessReviewResourceAttributes) => [boolean, boolean] |
Parameters:
resourceAttributes: resource attributes for access reviewresourceAttributes.group: the name of the group to check access forresourceAttributes.resource: the name of the resource to check access forresourceAttributes.subresource: the name of the subresource to check access forresourceAttributes.verb: the "action" to perform; one of 'create' | 'get' | 'list' | 'update' | 'patch' | 'delete' | 'deletecollection' | 'watch' | 'impersonate'resourceAttributes.name: the nameresourceAttributes.namespace: the namespaceresourceAttributes.cluster: the cluster name to find the resource inReturns:
Array with isAllowed and loading values.
| Function | Type |
|---|---|
useFleetClusterNames | UseFleetClusterNames |
| Function | Type |
|---|---|
useFleetK8sAPIPath | UseFleetK8sAPIPath |
| Function | Type |
|---|---|
useFleetK8sWatchResource | UseFleetK8sWatchResource |
| Function | Type |
|---|---|
useFleetPrometheusPoll | UsePrometheusPoll |
| Function | Type |
|---|---|
useHubClusterName | UseHubClusterName |
| Function | Type |
|---|---|
useMulticlusterSearchWatch | UseMulticlusterSearchWatch |
| Type | Type |
|---|---|
Fleet | T and { cluster?: string } |
| Type | Type |
|---|---|
FleetK8sResourceCommon | Fleet<K8sResourceCommon> |
| Type | Type |
|---|---|
FleetResourceLinkProps | Fleet<ResourceLinkProps> |
| Type | Type |
|---|---|
UseFleetClusterNames | () => [string[], boolean, any] |
| Type | Type |
|---|---|
UseFleetK8sAPIPath | ( cluster?: string ) => [k8sAPIPath: string or undefined, loaded: boolean, error: Error or undefined] |
| Type | Type |
|---|---|
UseFleetK8sWatchResource | <R extends FleetK8sResourceCommon or FleetK8sResourceCommon[]>( initResource: FleetWatchK8sResource or null ) => WatchK8sResult<R> or [undefined, boolean, any] |
| Type | Type |
|---|---|
UseHubClusterName | () => [hubClusterName: string or undefined, loaded: boolean, error: any] |
All contributions to the repository must be submitted under the terms of the Apache Public License 2.0. For contribution guidelines, see CONTRIBUTING.md.
FAQs
Provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management.
The npm package @stolostron/multicluster-sdk receives a total of 496 weekly downloads. As such, @stolostron/multicluster-sdk popularity was classified as not popular.
We found that @stolostron/multicluster-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.