Function: isResourceServed()
function isResourceServed(
cluster: string,
apiVersions: string | string[],
apiName: string): Promise<boolean>;
Defined in: lib/k8s/resourceAvailability.ts:32
Whether a cluster serves a resource under one of the given group versions.
This asks each version's discovery document directly instead of using the aggregated discovery, because that only reports the preferred version of a group and a resource may only be served by a newer or older one.
Parameters
| Parameter | Type | Description |
|---|---|---|
cluster | string | The cluster to check. |
apiVersions | string | string[] | The group versions the resource may be served by, newest first. |
apiName | string | The plural name of the resource to look for. |
Returns
Promise<boolean>
true when one of the versions serves the resource.