7.5. Dynamic plugin reference
You can add extensions that allow you to customize your plugin. Those extensions are then loaded to the console at run-time.
7.5.1. Dynamic plugin extension types
7.5.1.1. console.action/filter
ActionFilter can be used to filter an action.
7.5.1.2. console.action/group
ActionGroup contributes an action group that can also be a submenu.
7.5.1.3. console.action/provider
ActionProvider contributes a hook that returns list of actions for specific context.
7.5.1.4. console.action/resource-provider
ResourceActionProvider contributes a hook that returns list of actions for specific resource model.
7.5.1.5. console.alert-action
This extension can be used to trigger a specific action when a specific Prometheus alert is observed by the Console based on its rule.name value.
7.5.1.6. console.catalog/item-filter
This extension can be used for plugins to contribute a handler that can filter specific catalog items. For example, the plugin can contribute a filter that filters helm charts from specific provider.
7.5.1.8. console.catalog/item-provider
This extension allows plugins to contribute a provider for a catalog item type. For example, a Helm Plugin can add a provider that fetches all the Helm Charts. This extension can also be used by other plugins to add more items to a specific catalog item type.
7.5.1.9. console.catalog/item-type
This extension allows plugins to contribute a new type of catalog item. For example, a Helm plugin can define a new catalog item type as HelmCharts that it wants to contribute to the Developer Catalog.
7.5.1.11. console.cluster-overview/inventory-item
Adds a new inventory item into cluster overview page.
7.5.1.12. console.cluster-overview/multiline-utilization-item
Adds a new cluster overview multi-line utilization item.
7.5.1.13. console.cluster-overview/utilization-item
Adds a new cluster overview utilization item.
7.5.1.14. console.context-provider
Adds a new React context provider to the web console application root.
7.5.1.15. console.create-project-modal
This extension can be used to pass a component that will be rendered in place of the standard create project modal.
7.5.1.16. console.dashboards/card
Adds a new dashboard card.
7.5.1.17. console.dashboards/custom/overview/detail/item
Adds an item to the Details card of Overview Dashboard.
7.5.1.18. console.dashboards/overview/activity/resource
Adds an activity to the Activity Card of Overview Dashboard where the triggering of activity is based on watching a Kubernetes resource.
7.5.1.19. console.dashboards/overview/health/operator
Adds a health subsystem to the status card of the Overview dashboard, where the source of status is a Kubernetes REST API.
7.5.1.20. console.dashboards/overview/health/prometheus
Adds a health subsystem to the status card of Overview dashboard where the source of status is Prometheus.
7.5.1.21. console.dashboards/overview/health/resource
Adds a health subsystem to the status card of Overview dashboard where the source of status is a Kubernetes Resource.
7.5.1.22. console.dashboards/overview/health/url
Adds a health subsystem to the status card of Overview dashboard where the source of status is a Kubernetes REST API.
7.5.1.23. console.dashboards/overview/inventory/item
Adds a resource tile to the overview inventory card.
7.5.1.24. console.dashboards/overview/inventory/item/group
Adds an inventory status group.
7.5.1.25. console.dashboards/overview/inventory/item/replacement
Replaces an overview inventory card.
7.5.1.26. console.dashboards/overview/prometheus/activity/resource
Adds an activity to the Activity Card of Prometheus Overview Dashboard where the triggering of activity is based on watching a Kubernetes resource.
7.5.1.27. console.dashboards/project/overview/item
Adds a resource tile to the project overview inventory card.
7.5.1.28. console.dashboards/tab
Adds a new dashboard tab, placed after the Overview tab.
7.5.1.29. console.file-upload
This extension can be used to provide a handler for the file drop action on specific file extensions.
Gives full control over the web console feature flags.
7.5.1.31. console.flag/hookProvider
Gives full control over the web console feature flags with hook handlers.
7.5.1.32. console.flag/model
Adds a new web console feature flag driven by the presence of a CustomResourceDefinition (CRD) object on the cluster.
7.5.1.33. console.global-config
This extension identifies a resource used to manage the configuration of the cluster. A link to the resource will be added to the Administration → Cluster Settings → Configuration page.
7.5.1.35. console.navigation/href
This extension can be used to contribute a navigation item that points to a specific link in the UI.
7.5.1.36. console.navigation/resource-cluster
This extension can be used to contribute a navigation item that points to a cluster resource details page. The K8s model of that resource can be used to define the navigation item.
7.5.1.37. console.navigation/resource-ns
This extension can be used to contribute a navigation item that points to a namespaced resource details page. The K8s model of that resource can be used to define the navigation item.
7.5.1.38. console.navigation/section
This extension can be used to define a new section of navigation items in the navigation tab.
7.5.1.39. console.navigation/separator
This extension can be used to add a separator between navigation items in the navigation.
7.5.1.43. console.page/route/standalone
Adds a new standalone page, rendered outside the common page layout, to the web console router. See Content from v5.reactrouter.com is not included.React Router.
7.5.1.44. console.perspective
This extension contributes a new perspective to the console, which enables customization of the navigation menu.
7.5.1.45. console.project-overview/inventory-item
Adds a new inventory item into the Project Overview page.
7.5.1.46. console.project-overview/utilization-item
Adds a new project overview utilization item.
7.5.1.47. console.pvc/alert
This extension can be used to contribute custom alerts on the PVC details page.
7.5.1.48. console.pvc/create-prop
This extension can be used to specify additional properties that will be used when creating PVC resources on the PVC list page.
7.5.1.49. console.pvc/delete
This extension allows hooking into deleting PVC resources. It can provide an alert with additional information and custom PVC delete logic.
7.5.1.50. console.pvc/status
7.5.1.51. console.redux-reducer
Adds new reducer to Console Redux store which operates on plugins.<scope> substate.
7.5.1.52. console.resource/create
This extension allows plugins to provide a custom component (i.e., wizard or form) for specific resources, which will be rendered, when users try to create a new resource instance.
7.5.1.53. console.resource/details-item
Adds a new details item to the default resource summary on the details page.
7.5.1.54. console.storage-class/provisioner
Adds a new storage class provisioner as an option during storage class creation.
7.5.1.55. console.storage-provider
This extension can be used to contribute a new storage provider to select, when attaching storage and a provider specific component.
Adds a tab to a horizontal nav matching the contextId.
7.5.1.57. console.tab/horizontalNav
This extension can be used to add a tab on the resource details page.
7.5.1.58. console.telemetry/listener
This component can be used to register a listener function receiving telemetry events. These events include user identification, page navigation, and other application specific events. The listener may use this data for reporting and analytics purposes.
7.5.1.59. console.topology/adapter/build
BuildAdapter contributes an adapter to adapt element to data that can be used by the Build component.
7.5.1.60. console.topology/adapter/network
NetworkAdapater contributes an adapter to adapt element to data that can be used by the Networking component.
7.5.1.61. console.topology/adapter/pod
PodAdapter contributes an adapter to adapt element to data that can be used by the Pod component.
7.5.1.62. console.topology/component/factory
Getter for a ViewComponentFactory.
7.5.1.63. console.topology/create/connector
Getter for the create connector function.
7.5.1.64. console.topology/data/factory
Topology Data Model Factory Extension
7.5.1.65. console.topology/decorator/provider
Topology Decorator Provider Extension
7.5.1.66. console.topology/details/resource-alert
DetailsResourceAlert contributes an alert for specific topology context or graph element.
7.5.1.67. console.topology/details/resource-link
DetailsResourceLink contributes a link for specific topology context or graph element.
7.5.1.68. console.topology/details/tab
DetailsTab contributes a tab for the topology details panel.
7.5.1.69. console.topology/details/tab-section
DetailsTabSection contributes a section for a specific tab in the topology details panel.
7.5.1.70. console.topology/display/filters
Topology Display Filters Extension
7.5.1.71. console.topology/relationship/provider
Topology relationship provider connector extension
7.5.1.72. console.user-preference/group
This extension can be used to add a group on the console user-preferences page. It will appear as a vertical tab option on the console user-preferences page.
7.5.1.73. console.user-preference/item
This extension can be used to add an item to the user preferences group on the console user preferences page.
7.5.1.74. console.yaml-template
YAML templates for editing resources via the yaml editor.
7.5.1.75. dev-console.add/action
This extension allows plugins to contribute an add action item to the add page of developer perspective. For example, a Serverless plugin can add a new action item for adding serverless functions to the add page of developer console.
7.5.1.76. dev-console.add/action-group
This extension allows plugins to contibute a group in the add page of developer console. Groups can be referenced by actions, which will be grouped together in the add action page based on their extension definition. For example, a Serverless plugin can contribute a Serverless group and together with multiple add actions.
7.5.1.77. dev-console.import/environment
This extension can be used to specify extra build environment variable fields under the builder image selector in the developer console git import form. When set, the fields will override environment variables of the same name in the build section.
7.5.1.78. console.dashboards/overview/detail/item
Deprecated. use CustomOverviewDetailItem type instead
7.5.2. Dynamic plugin API
7.5.2.1. useActivePerspective
Hook that provides the currently active perspective and a callback for setting the active perspective. It returns a tuple containing the current active perspective and setter callback.
7.5.2.2. GreenCheckCircleIcon
Component for displaying a green check mark circle icon.
7.5.2.3. RedExclamationCircleIcon
Component for displaying a red exclamation mark circle icon.
7.5.2.4. YellowExclamationTriangleIcon
Component for displaying a yellow triangle exclamation icon.
7.5.2.5. BlueInfoCircleIcon
Component for displaying a blue info circle icon.
Component for displaying an error status popover.
Component for displaying an information status popover.
Component for displaying a progressing status popover.
Component for displaying a success status popover.
Provides information about user access to a given resource. It returns an object with resource access information.
7.5.2.11. useAccessReview
Hook that provides information about user access to a given resource. It returns an array with isAllowed and loading values.
7.5.2.12. useResolvedExtensions
React hook for consuming Console extensions with resolved CodeRef properties. This hook accepts the same argument(s) as useExtensions hook and returns an adapted list of extension instances, resolving all code references within each extension’s properties.
Initially, the hook returns an empty array. After the resolution is complete, the React component is re-rendered with the hook returning an adapted list of extensions. When the list of matching extensions changes, the resolution is restarted. The hook continues to return the previous result until the resolution completes.
The hook’s result elements are guaranteed to be referentially stable across re-renders. It returns a tuple containing a list of adapted extension instances with resolved code references, a boolean flag indicating whether the resolution is complete, and a list of errors detected during the resolution.
A component that creates a Navigation bar for a page. Routing is handled as part of the component. console.tab/horizontalNav can be used to add additional content to any horizontal navigation.
7.5.2.14. VirtualizedTable
A component for making virtualized tables.
Component for displaying table data within a table row.
7.5.2.16. useActiveColumns
A hook that provides a list of user-selected active TableColumns.
A tuple containing the current user selected active columns (a subset of options.columns), and a boolean flag indicating whether user settings have been loaded.
Component for adding a create button for a specific resource kind that automatically generates a link to the create YAML for this resource.
7.5.2.19. ListPageCreateLink
Component for creating a stylized link.
7.5.2.20. ListPageCreateButton
Component for creating button.
7.5.2.21. ListPageCreateDropdown
Component for creating a dropdown wrapped with permissions check.
Component that generates filter for list page.
7.5.2.23. useListPageFilter
A hook that manages filter state for the ListPageFilter component. It returns a tuple containing the data filtered by all static filters, the data filtered by all static and row filters, and a callback that updates rowFilters.
Component that creates a link to a specific resource type with an icon badge.
Component that creates an icon badge for a specific resource type.
Hook that retrieves the k8s model for provided K8sGroupVersionKind from redux. It returns an array with the first item as k8s model and second item as inFlight status.
Hook that retrieves all current k8s models from redux. It returns an array with the first item as the list of k8s model and second item as inFlight status.
7.5.2.28. useK8sWatchResource
Hook that retrieves the k8s resource along with status for loaded and error. It returns an array with first item as resource(s), second item as loaded status and third item as error state if any.
7.5.2.29. useK8sWatchResources
Hook that retrieves the k8s resources along with their respective status for loaded and error. It returns a map where keys are as provided in initResouces and value has three properties data, loaded and error.
A custom wrapper around fetch that adds console specific headers and allows for retries and timeouts.It also validates the response status code and throws appropriate error or logs out the user if required. It returns a promise that resolves to the response.
7.5.2.31. consoleFetchJSON
A custom wrapper around fetch that adds console specific headers and allows for retries and timeouts. It also validates the response status code and throws appropriate error or logs out the user if required. It returns the response as a JSON object. Uses consoleFetch internally. It returns a promise that resolves to the response as JSON object.
7.5.2.32. consoleFetchText
A custom wrapper around fetch that adds console specific headers and allows for retries and timeouts. It also validates the response status code and throws appropriate error or logs out the user if required. It returns the response as a text. Uses consoleFetch internally. It returns a promise that resolves to the response as text.
It fetches a resource from the cluster, based on the provided options. If the name is provided it returns one resource else it returns all the resources matching the model. It returns a promise that resolves to the response as JSON object with a resource if the name is providedelse it returns all the resources matching the model. In case of failure, the promise gets rejected with HTTP error response.
7.5.2.35. k8sCreateResource
It creates a resource in the cluster, based on the provided options. It returns a promise that resolves to the response of the resource created. In case of failure promise gets rejected with HTTP error response.
7.5.2.36. k8sUpdateResource
It updates the entire resource in the cluster, based on providedoptions. When a client needs to replace an existing resource entirely, they can use k8sUpdate. Alternatively can use k8sPatch to perform the partial update. It returns a promise that resolves to the response of the resource updated. In case of failure promise gets rejected with HTTP error response.
7.5.2.37. k8sPatchResource
It patches any resource in the cluster, based on provided options. When a client needs to perform the partial update, they can use k8sPatch. Alternatively can use k8sUpdate to replace an existing resource entirely. See Content from datatracker.ietf.org is not included.Data Tracker for more. It returns a promise that resolves to the response of the resource patched. In case of failure promise gets rejected with HTTP error response.
7.5.2.38. k8sDeleteResource
It deletes resources from the cluster, based on the provided model, resource. The garbage collection works based on Foreground|Background can be configured with propagationPolicy property in provided model or passed in json. It returns a promise that resolves to the response of kind Status. In case of failure promise gets rejected with HTTP error response.
7.5.2.39. k8sListResource
Lists the resources as an array in the cluster, based on provided options. It returns a promise that resolves to the response.
7.5.2.40. k8sListResourceItems
Same interface as k8sListResource but returns the sub items. It returns the apiVersion for the model, i.e., group/version.
7.5.2.42. getGroupVersionKindForResource
Provides a group, version, and kind for a resource. It returns the group, version, kind for the provided resource. If the resource does not have an API group, group "core" is returned. If the resource has an invalid apiVersion, then it throws an Error.
Creates a wrapper component for a dashboard.
Creates a grid of card elements for a dashboard; used within Overview.
Creates an inventory card item.
7.5.2.49. InventoryItemTitle
Creates a title for an inventory card item; used within InventoryItem.
7.5.2.50. InventoryItemBody
Creates the body of an inventory card; used within InventoryCard and can be used with InventoryTitle.
7.5.2.51. InventoryItemStatus
Creates a count and icon for an inventory card with optional link address; used within InventoryItemBody
7.5.2.52. InventoryItemLoading
Creates a skeleton container for when an inventory card is loading; used with InventoryItem and related components
Hook that returns the given feature flag from FLAGS redux state. It returns the boolean value of the requested feature flag or undefined.
A basic lazy loaded Code editor with hover help and completion.
7.5.2.55. ResourceYAMLEditor
A lazy loaded YAML editor for Kubernetes resources with hover help and completion. The component use the YAMLEditor and add on top of it more functionality likeresource update handling, alerts, save, cancel and reload buttons, accessibility and more. Unless onSave callback is provided, the resource update is automatically handled.It should be wrapped in a React.Suspense component.
7.5.2.56. ResourceEventStream
A component to show events related to a particular resource.
7.5.2.57. usePrometheusPoll
Sets up a poll to Prometheus for a single query. It returns a tuple containing the query response, a boolean flag indicating whether the response has completed, and any errors encountered during the request or post-processing of the request.
A component to render timestamp. The timestamps are synchronized between invidual instances of the Timestamp component. The provided timestamp is formatted according to user locale.
7.5.2.60. ActionServiceProvider
Component that allows to receive contributions from other plugins for the console.action/provider extension type.
A component that renders a horizontal toolbar with a namespace dropdown menu in the leftmost position. Additional components can be passed in as children and is rendered to the right of the namespace dropdown. This component is designed to be used at the top of the page. It should be used on pages where the user needs to be able to change the active namespace, such as on pages with k8s resources.
7.5.2.62. ErrorBoundaryFallbackPage
Creates full page ErrorBoundaryFallbackPage component to display the "Oh no! Something went wrong." message along with the stack trace and other helpful debugging information. This is to be used inconjunction with an component.
A component that renders a graph of the results from a Prometheus PromQL query along with controls for interacting with the graph.
7.5.2.64. useAnnotationsModal
A hook that provides a callback to launch a modal for editing Kubernetes resource annotations.
A hook that provides a callback to launch a modal for deleting a resource.
A hook that provides a callback to launch a modal for editing Kubernetes resource labels.
7.5.2.67. useActiveNamespace
Hook that provides the currently active namespace and a callback for setting the active namespace.
7.5.2.68. useUserSettings
Hook that provides a user setting value and a callback for setting the user setting value.
7.5.2.69. useQuickStartContext
Hook that provides the current quick start context values. This allows plugins to interoperate with console quick start functionality.
7.5.2.70. PerspectiveContext
Deprecated: Use the provided usePerspectiveContext instead. Creates the perspective context.
7.5.2.71. useAccessReviewAllowed
Deprecated: Use useAccessReview from @console/dynamic-plugin-sdk instead. Hook that provides allowed status about user access to a given resource. It returns the isAllowed boolean value.
Deprecated: This hook is not related to console functionality. Hook that ensures a safe asynchronnous setting of React state in case a given component could be unmounted. It returns an array with a pair of state value and its set function.
Deprecated: A basic lazy loaded YAML editor with hover help and completion.