diff --git a/examples/custom-extension/README.md b/examples/custom-extension/README.md index eb94abbf8a..ac8785b158 100644 --- a/examples/custom-extension/README.md +++ b/examples/custom-extension/README.md @@ -32,6 +32,12 @@ Ensure that the `general.customElement` property matches the name of the custom ### 4. Deploy Your Extension +Before running the deployment command, ensure that your **Kubeconfig** is correctly exported and points to the desired cluster. You can check the current context by running: + +```bash +kubectl config current-context +``` + Run `./deploy-custom-extension.sh` to create a ConfigMap and deploy it to your cluster Alternatively, you can use the following command: diff --git a/src/state/navigation/extensionsAtom.ts b/src/state/navigation/extensionsAtom.ts index 95dd5f4dc1..426102e79e 100644 --- a/src/state/navigation/extensionsAtom.ts +++ b/src/state/navigation/extensionsAtom.ts @@ -152,7 +152,6 @@ const getExtensionWizards = async ( kubeconfigNamespace = 'kube-public', currentNamespace: string, permissionSet: PermissionSetState, - extCustomComponentsEnabled: boolean, ) => { if (!fetchFn) { return null; @@ -184,10 +183,7 @@ const getExtensionWizards = async ( convertYamlToObject, ) as ExtResource, }; - if (extCustomComponentsEnabled) { - extResourceWithMetadata.data.customHtml = - extResourceWithMetadata.data.customHtml || ''; - } + if (!extResourceWithMetadata.data) return accumulator; const indexOfTheSameExtension = accumulator.findIndex(ext => @@ -337,9 +333,9 @@ const getExtensions = async ( if (extCustomComponentsEnabled) { extResourceWithMetadata.data.customHtml = - currentConfigMap.data.customHtml; + currentConfigMap.data.customHtml || ''; extResourceWithMetadata.data.customScript = - currentConfigMap.data.customScript; + currentConfigMap.data.customScript || ''; } if (!extResourceWithMetadata.data) return accumulator; @@ -498,7 +494,6 @@ export const useGetExtensions = () => { cluster.currentContext.namespace || 'kube-public', namespace, permissionSet, - isExtensibilityCustomComponentsEnabled ?? false, ); if (!wizardConfigs || !isExtensibilityWizardEnabled) {