From d533da235187f839856fce485ea844a867686b94 Mon Sep 17 00:00:00 2001 From: Mike Turley Date: Mon, 14 Feb 2022 16:45:51 -0500 Subject: [PATCH] feat(kube-client): allow arbitrary strings for the `kind` property on resources being queried (#96) --- src/modules/kube-client/resources/core.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/kube-client/resources/core.ts b/src/modules/kube-client/resources/core.ts index dd47c5e..ddb49ef 100644 --- a/src/modules/kube-client/resources/core.ts +++ b/src/modules/kube-client/resources/core.ts @@ -2,13 +2,13 @@ import { NamespacedResource, ClusterResource, IGroupVersionKindPlural } from './ export class CoreNamespacedResource extends NamespacedResource { private _gvk: IGroupVersionKindPlural; - constructor(kind: CoreNamespacedResourceKind, namespace: string) { + constructor(kindPlural: string, namespace: string) { super(namespace); this._gvk = { group: '', version: 'v1', - kindPlural: kind, + kindPlural, }; } gvk(): IGroupVersionKindPlural { @@ -27,11 +27,11 @@ export class CoreNamespacedResource extends NamespacedResource { export class ExtendedCoreNamespacedResource extends CoreNamespacedResource { private _operation: ExtendedCoreNamespacedResourceKind; constructor( - kind: CoreNamespacedResourceKind, + kindPlural: string, namespace: string, operation: ExtendedCoreNamespacedResourceKind ) { - super(kind, namespace); + super(kindPlural, namespace); this._operation = operation; } @@ -47,13 +47,13 @@ export class ExtendedCoreNamespacedResource extends CoreNamespacedResource { export class CoreClusterResource extends ClusterResource { private _gvk: IGroupVersionKindPlural; - constructor(kind: CoreClusterResourceKind) { + constructor(kindPlural: string) { super(); this._gvk = { group: '', version: 'v1', - kindPlural: kind, + kindPlural, }; } gvk(): IGroupVersionKindPlural {