@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
263 lines • 8.8 kB
JavaScript
// SPDX-License-Identifier: Apache-2.0
/**
* The options to be supplied to the helm install command.
*
* @param atomic - if set, the installation process deletes the installation on failure. The --wait flag will
* be set automatically if --atomic is used.
* @param createNamespace - create the release namespace if not present.
* @param dependencyUpdate - update dependencies if they are missing before installing the chart.
* @param description - add a custom description.
* @param enableDNS - enable DNS lookups when rendering templates.
* @param force - force resource updates through a replacement strategy.
* @param passCredentials - pass credentials to all domains.
* @param password - chart repository password where to locate the requested chart.
* @param repo - chart repository url where to locate the requested chart.
* @param set - set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
* @param skipCrds - if set, no CRDs will be installed. By default, CRDs are installed if not already present.
* @param timeout - time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s).
* @param username - chart repository username where to locate the requested chart.
* @param values - specify values in a YAML file or a URL (can specify multiple).
* @param verify - verify the package before installing it.
* @param version - specify a version constraint for the chart version to use. This constraint can be a
* specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not
* specified, the latest version is used.
* @param waitFor - if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a
* Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as
* successful. It will wait for as long as --timeout.
* @param kubeContext - the Kubernetes context to use.
* @param namespace - the namespace to install the chart in.
* @param extraArgs - additional arguments to pass to the helm command.
*/
export class InstallChartOptions {
/**
* if set, the installation process deletes the installation on failure. The --wait flag will
* be set automatically if --atomic is used.
*/
_atomic;
/**
* create the release namespace if not present.
*/
_createNamespace;
/**
* update dependencies if they are missing before installing the chart.
*/
_dependencyUpdate;
/**
* add a custom description.
*/
_description;
/**
* enable DNS lookups when rendering templates.
*/
_enableDNS;
/**
* force resource updates through a replacement strategy.
*/
_force;
/**
* pass credentials to all domains.
*/
_passCredentials;
/**
* chart repository password where to locate the requested chart.
*/
_password;
/**
* chart repository url where to locate the requested chart.
*/
_repo;
/**
* set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
*/
_set;
/**
* if set, no CRDs will be installed. By default, CRDs are installed if not already present.
*/
_skipCrds;
/**
* time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s).
*/
_timeout;
/**
* chart repository username where to locate the requested chart.
*/
_username;
/**
* specify values in a YAML file or a URL (can specify multiple).
*/
_values;
/**
* verify the package before installing it.
*/
_verify;
/**
* specify a version constraint for the chart version to use. This constraint can be a
* specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not
* specified, the latest version is used.
*/
_version;
/**
* if set, will wait until all Pods, PVCs, Services, and minimum number of Pods of a
* Deployment, StatefulSet, or ReplicaSet are in a ready state before marking the release as
* successful. It will wait for as long as --timeout.
*/
_waitFor;
/**
* The Kubernetes context to use.
*/
_kubeContext;
/**
* The namespace to install the chart in.
*/
_namespace;
/**
* Additional arguments to pass to the helm command.
*/
_extraArgs;
constructor(atomic, createNamespace, dependencyUpdate, description, enableDNS, force, passCredentials, password, repo, set, skipCrds, timeout, username, values, verify, version, waitFor, kubeContext, namespace, extraArguments) {
this._atomic = atomic;
this._createNamespace = createNamespace;
this._dependencyUpdate = dependencyUpdate;
this._description = description;
this._enableDNS = enableDNS;
this._force = force;
this._passCredentials = passCredentials;
this._password = password;
this._repo = repo;
this._set = set;
this._skipCrds = skipCrds;
this._timeout = timeout;
this._username = username;
this._values = values;
this._verify = verify;
this._version = version;
this._waitFor = waitFor;
this._kubeContext = kubeContext;
this._namespace = namespace;
this._extraArgs = extraArguments;
}
get namespace() {
return this._namespace;
}
apply(builder) {
this.applyFlags(builder);
builder.argument('output', 'json');
if (this._password) {
builder.argument('password', this._password);
}
if (this._repo) {
builder.argument('repo', this._repo);
}
if (this._set) {
builder.optionsWithMultipleValues('set', this._set);
}
if (this._timeout) {
builder.argument('timeout', this._timeout);
}
if (this._username) {
builder.argument('username', this._username);
}
if (this._values) {
builder.optionsWithMultipleValues('values', this._values);
}
if (this._kubeContext) {
builder.argument('kube-context', this._kubeContext);
}
if (this._namespace) {
builder.argument('namespace', this._namespace);
}
if (this._extraArgs) {
builder.positional(this._extraArgs);
}
if (this._version) {
builder.argument('version', this._version);
}
}
applyFlags(builder) {
if (this._atomic) {
builder.flag('--atomic');
}
if (this._createNamespace) {
builder.flag('--create-namespace');
}
if (this._dependencyUpdate) {
builder.flag('--dependency-update');
}
if (this._enableDNS) {
builder.flag('--enable-dns');
}
if (this._force) {
builder.flag('--force');
}
if (this._passCredentials) {
builder.flag('--pass-credentials');
}
if (this._skipCrds) {
builder.flag('--skip-crds');
}
if (this._verify) {
builder.flag('--verify');
}
if (this._waitFor) {
builder.flag('--wait');
}
}
get atomic() {
return this._atomic;
}
get createNamespace() {
return this._createNamespace;
}
get dependencyUpdate() {
return this._dependencyUpdate;
}
get description() {
return this._description;
}
get enableDNS() {
return this._enableDNS;
}
get force() {
return this._force;
}
get passCredentials() {
return this._passCredentials;
}
get password() {
return this._password;
}
get repo() {
return this._repo;
}
get set() {
return this._set;
}
get skipCrds() {
return this._skipCrds;
}
get timeout() {
return this._timeout;
}
get username() {
return this._username;
}
get values() {
return this._values;
}
get verify() {
return this._verify;
}
get version() {
return this._version;
}
get waitFor() {
return this._waitFor;
}
get kubeContext() {
return this._kubeContext;
}
get extraArgs() {
return this._extraArgs;
}
}
//# sourceMappingURL=install-chart-options.js.map