Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
add namespace parameter to getK8sNodes (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyione committed Jul 22, 2020
1 parent 0d413ec commit 2069ac5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/v2/clients/kubernetesClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ export class KubernetesClient extends OpenPAIBaseClient {
/**
* Get kubernetes node list. Need administrator permission.
*/
public async getK8sNodes(): Promise<any> {
public async getK8sNodes(namespace?: string): Promise<any> {
const url: string = Util.fixUrl(
`${this.cluster.rest_server_uri}/api/v2/kubernetes/nodes`,
this.cluster.https
);
return await this.httpClient.get(url);
return await this.httpClient.get(url, undefined, undefined, namespace ? { namespace } : undefined);
}

/**
Expand Down

0 comments on commit 2069ac5

Please sign in to comment.