We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f945be commit 92bea39Copy full SHA for 92bea39
src/state/configuration/configurationAtom.ts
@@ -61,7 +61,14 @@ const getConfigs = async (fetchFn: FetchFn | undefined) => {
61
}
62
63
64
- const configParams = jsyaml.load(await configResponse.text()) as Config;
+ // Check if there is config.yaml - case for deploying Busola in a Cluster
65
+ let configParams: Config = {};
66
+ try {
67
+ configParams = jsyaml.load(await configResponse.text()) as Config;
68
+ } catch (e) {
69
+ console.warn('Cannot load config.yaml: ', e);
70
+ }
71
+
72
const mapParams = configMapResponse?.data?.config
73
? (jsyaml.load(configMapResponse.data.config) as Config)
74
: {};
0 commit comments