Skip to content

Commit

Permalink
feat(kube-client): allow arbitrary strings for the kind property on…
Browse files Browse the repository at this point in the history
… resources being queried (#96)
  • Loading branch information
mturley authored Feb 14, 2022
1 parent 5efb371 commit d533da2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/modules/kube-client/resources/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
Expand All @@ -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 {
Expand Down

0 comments on commit d533da2

Please sign in to comment.