From c54d59f2058f2097abee415a0f8a85dfee5001f9 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 9 Jun 2022 16:55:01 -0400 Subject: [PATCH] Fix cluster.k8s.io/v1alpha1/clusters CRD not being marked as Namespaced (#5593) --- src/common/k8s-api/endpoints/cluster.api.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/k8s-api/endpoints/cluster.api.ts b/src/common/k8s-api/endpoints/cluster.api.ts index 53e12800b0..082f0adb09 100644 --- a/src/common/k8s-api/endpoints/cluster.api.ts +++ b/src/common/k8s-api/endpoints/cluster.api.ts @@ -10,7 +10,14 @@ import type { DerivedKubeApiOptions, IgnoredKubeApiOptions } from "../kube-api"; import { KubeApi } from "../kube-api"; export class ClusterApi extends KubeApi { + /** + * @deprecated This field is legacy and never used. + */ static kind = "Cluster"; + + /** + * @deprecated This field is legacy and never used. + */ static namespaced = true; constructor(opts: DerivedKubeApiOptions & IgnoredKubeApiOptions = {}) { @@ -104,6 +111,7 @@ export interface Cluster { export class Cluster extends KubeObject { static kind = "Cluster"; static apiBase = "/apis/cluster.k8s.io/v1alpha1/clusters"; + static namespaced = true; getStatus() { if (this.metadata.deletionTimestamp) return ClusterStatus.REMOVING;