@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
76 lines • 2.18 kB
JavaScript
// SPDX-License-Identifier: Apache-2.0
/**
* Options for upgrading a Helm chart.
*/
export class UpgradeChartOptions {
_namespace;
_kubeContext;
_reuseValues;
_extraArgs;
_version;
constructor(namespace, kubeContext, reuseValues = false, extraArguments, version) {
this._namespace = namespace;
this._kubeContext = kubeContext;
this._reuseValues = reuseValues;
this._extraArgs = extraArguments;
this._version = version;
}
/**
* Gets the namespace where the release should be upgraded.
* @returns The namespace or undefined if not set.
*/
get namespace() {
return this._namespace;
}
/**
* Gets the Kubernetes context to use.
* @returns The Kubernetes context or undefined if not set.
*/
get kubeContext() {
return this._kubeContext;
}
/**
* Gets whether to reuse the last release's values.
* @returns True if values should be reused, false otherwise.
*/
get reuseValues() {
return this._reuseValues;
}
/**
* Gets additional arguments to pass to the helm command.
* @returns The additional arguments or undefined if not set.
*/
get extraArgs() {
return this._extraArgs;
}
/**
* Gets the version of the chart to upgrade to.
* @returns The version or undefined if not set.
*/
get version() {
return this._version;
}
/**
* Applies the options to the given builder.
* @param builder The builder to apply the options to.
*/
apply(builder) {
builder.argument('output', 'json');
if (this._namespace) {
builder.argument('namespace', this._namespace);
}
if (this._kubeContext) {
builder.argument('kube-context', this._kubeContext);
}
if (this._reuseValues) {
builder.flag('--reuse-values');
}
if (this._extraArgs) {
builder.positional(this._extraArgs);
}
if (this._version) {
builder.argument('version', this._version);
}
}
}
//# sourceMappingURL=upgrade-chart-options.js.map