Fix getDefault for kubernetesFetcherExtensionPoint

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2025-09-04 13:49:04 +02:00
parent 03fcaf3666
commit dd7b6d2f33
2 changed files with 8 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Fix a bug where `getDefault` in the `kubernetesFetcherExtensionPoint` had the wrong `this` value
@@ -183,8 +183,9 @@ export class KubernetesInitializer {
async init() {
const fetcher =
(await this.opts.fetcher?.({ getDefault: this.defaultFetcher })) ??
(await this.defaultFetcher());
(await this.opts.fetcher?.({
getDefault: () => this.defaultFetcher(),
})) ?? (await this.defaultFetcher());
const authStrategyMap =
this.opts.authStrategyMap ?? (await this.defaultAuthStrategy());