@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
32 lines (25 loc) • 833 B
text/typescript
// SPDX-License-Identifier: Apache-2.0
import {type HelmExecutionBuilder} from '../../execution/helm-execution-builder.js';
import {type HelmRequest} from '../helm-request.js';
/**
* A request to list all Helm releases.
*/
export class ReleaseListRequest implements HelmRequest {
public constructor(
private readonly allNamespaces: boolean,
private readonly namespace?: string,
private readonly kubeContext?: string,
) {}
public apply(builder: HelmExecutionBuilder): void {
builder.argument('output', 'json');
if (this.allNamespaces) {
builder.flag('--all-namespaces');
} else if (this.namespace) {
builder.argument('namespace', this.namespace);
}
if (this.kubeContext) {
builder.argument('kube-context', this.kubeContext);
}
builder.subcommands('list');
}
}