Skip to main content

Class: KubernetesResourceInfo

Defined in: kubernetesResourceInfo.d.ts:22

Contains all the API resources defined in the target cluster and enables listing them and querying their existence.

Methods​

addResource()​

addResource(resource): void;

Defined in: kubernetesResourceInfo.d.ts:26

Adds the given API resource to the available resources list.

Parameters​

ParameterType
resourceKubernetesResource

Returns​

void


contains()​

contains(apiVersion, kind): boolean;

Defined in: kubernetesResourceInfo.d.ts:29

Returns true if the given API resource exists in the target cluster.

Parameters​

ParameterType
apiVersionstring
kindstring

Returns​

boolean


containsKind()​

containsKind(kind): boolean;

Defined in: kubernetesResourceInfo.d.ts:32

Returns true if the given kind exists in the target cluster. This ignores the apiVersion field.

Parameters​

ParameterType
kindstring

Returns​

boolean


isNamespaced()​

isNamespaced(apiVersion, kind): boolean;

Defined in: kubernetesResourceInfo.d.ts:38

Returns true if the given API resource is namespaced. E.g. returns true for v1/Pod, false for rbac.authorization.k8s.io/v1/ClusterRole.

Parameters​

ParameterType
apiVersionstring
kindstring

Returns​

boolean