Skip to content

feat: port helm client from full-stack-testing #1699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5339d5c
Add initial java source code
JeffreyDallas Mar 13, 2025
0266e89
converted
JeffreyDallas Mar 13, 2025
82f2a94
fix some grammer
JeffreyDallas Mar 13, 2025
cec6b79
format
JeffreyDallas Mar 13, 2025
1d7a3f4
save
JeffreyDallas Mar 13, 2025
1c41056
save
JeffreyDallas Mar 14, 2025
aa96b0d
save
JeffreyDallas Mar 14, 2025
3f606d0
save
JeffreyDallas Mar 14, 2025
ba88607
Save
JeffreyDallas Mar 14, 2025
e3b875b
save
JeffreyDallas Mar 14, 2025
37e11f6
save
JeffreyDallas Mar 14, 2025
2c3131e
save
JeffreyDallas Mar 17, 2025
b1d8f1f
save
JeffreyDallas Mar 17, 2025
3b7077b
save
JeffreyDallas Mar 17, 2025
b1913f5
save
JeffreyDallas Mar 17, 2025
8f7b699
save
JeffreyDallas Mar 17, 2025
02ee768
save
JeffreyDallas Mar 18, 2025
c2338e5
save
JeffreyDallas Mar 19, 2025
3d2b11f
save
JeffreyDallas Mar 19, 2025
a696023
save
JeffreyDallas Mar 19, 2025
5ed4623
Merge branch 'main' into 01578-D-helm-client
JeffreyDallas Mar 19, 2025
49b81aa
save
JeffreyDallas Mar 19, 2025
5843f44
save
JeffreyDallas Mar 19, 2025
fea1606
save
JeffreyDallas Mar 20, 2025
5b5e801
save
JeffreyDallas Mar 20, 2025
51a3a9c
save
JeffreyDallas Mar 20, 2025
2c3b2e9
fix unisntall option
JeffreyDallas Mar 20, 2025
d72d193
fix unit test
JeffreyDallas Mar 20, 2025
6983f76
add logger
JeffreyDallas Mar 20, 2025
a26b747
save
JeffreyDallas Mar 20, 2025
8aa90d1
Merge branch 'main' into 01578-D-helm-client
JeffreyDallas Mar 20, 2025
1300fe5
delete java files
JeffreyDallas Mar 20, 2025
0f45a86
save
JeffreyDallas Mar 20, 2025
29293e4
save
JeffreyDallas Mar 20, 2025
1db0d75
save
JeffreyDallas Mar 20, 2025
69efae3
save
JeffreyDallas Mar 21, 2025
1184e47
save
JeffreyDallas Mar 21, 2025
4d119c5
Merge branch 'main' into 01578-D-helm-client
JeffreyDallas Mar 21, 2025
25133bb
save
JeffreyDallas Mar 21, 2025
835277f
Merge commit 'dc8c8e1905f7ab66fd637342b825d969aff0f107' into 01578-D-…
JeffreyDallas Mar 25, 2025
dff120d
moving helm directory
JeffreyDallas Mar 25, 2025
66f1f1b
fix
JeffreyDallas Mar 25, 2025
adfadc4
fix helm path
JeffreyDallas Mar 25, 2025
95a6307
save
JeffreyDallas Mar 25, 2025
59a60de
Merge commit '0edfeb1506e4318bd31db3a5770c39517b4eb5ff' into 01578-D-…
JeffreyDallas Mar 25, 2025
6596e50
add setup helm
JeffreyDallas Mar 25, 2025
d08d640
fix helm Client
JeffreyDallas Mar 25, 2025
b909cd7
add coverage report for unit-helm
JeffreyDallas Mar 25, 2025
83be326
fix name
JeffreyDallas Mar 26, 2025
53c64ab
one export class per file
JeffreyDallas Mar 26, 2025
17f7916
Merge commit 'b9c45454dda40065a94934618c5364d7385b387f' into 01578-D-…
JeffreyDallas Mar 26, 2025
0d7701a
Merge commit 'dcf525c077c8570f1bf4692e9409c6848734594e' into 01578-D-…
JeffreyDallas Mar 27, 2025
c3070bd
remove duplicated code
JeffreyDallas Mar 27, 2025
09fad55
Merge commit 'c954109b92cd9eea8afdeec7cf0f41c299a9c8c8' into 01578-D-…
JeffreyDallas Mar 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/zxc-code-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ jobs:
name: Unit Test Coverage Report
path: 'coverage/unit'

- name: Download HelmClient Unit Test Coverage Report
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
if: ${{ (inputs.enable-codecov-analysis || inputs.enable-codacy-coverage) && !cancelled() && !failure() }}
with:
name: Unit Test Coverage Report
path: 'coverage/unit-helm'

- name: Download E2E Integration Coverage Report
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
if: ${{ (inputs.enable-codecov-analysis || inputs.enable-codacy-coverage) && inputs.enable-e2e-coverage-report && !cancelled() && !failure() }}
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/zxc-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ jobs:
- name: Run Unit Tests
run: npm test

- name: Setup Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
if: ${{ runner.os == 'linux' }}
with:
version: "v3.12.3" # helm version

- name: Setup Kind
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
if: ${{ runner.os == 'linux' }}
with:
install_only: true
node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30
version: v0.26.0
kubectl_version: v1.31.4
verbosity: 3
wait: 120s

- name: Run Helm Client Unit Tests
if: ${{ runner.os == 'linux' }}
run: npm run test-helm

- name: Publish Windows Unit Test Report
uses: EnricoMi/publish-unit-test-result-action/windows/bash@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
if: ${{ runner.os == 'Windows' && steps.npm-deps.conclusion == 'success' && !cancelled() }}
Expand All @@ -99,6 +120,13 @@ jobs:
name: Unit Test Coverage Report
path: 'coverage/unit'

- name: Publish HelmClient Unit Test Coverage Report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ runner.os == 'linux' && !cancelled() }}
with:
name: HelmClient Unit Test Coverage Report
path: 'coverage/unit-helm'

- name: Publish Test Reports
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: ${{ runner.os == 'linux' && steps.npm-deps.conclusion == 'success' && !cancelled() }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/zxc-update-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
sudo apt-get update
sudo apt-get install -y wget

- name: Setup Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
with:
version: "v3.12.3" # helm version

- name: Setup Kind
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ tasks:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- relay destroy -n "${SOLO_NAMESPACE}" -i node1 -q --dev
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- relay destroy --deployment "${SOLO_DEPLOYMENT}" -i node1 -q --dev

solo:cache:remove:
silent: true
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"access": "public"
},
"scripts": {
"test": "cross-env MOCHA_SUITE_NAME=\"Unit Tests\" c8 --report-dir='coverage/unit' mocha 'test/unit/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test": "cross-env MOCHA_SUITE_NAME=\"Unit Tests\" c8 --report-dir='coverage/unit' mocha 'test/unit/**/*.ts' --exclude 'test/unit/core/helm/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-helm": "cross-env MOCHA_SUITE_NAME=\"Helm Unit Tests\" c8 --report-dir='coverage/unit-helm' mocha 'test/unit/core/helm/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-mathex": "cross-env MOCHA_SUITE_NAME=\"MathEx Unit Tests\" c8 --report-dir='coverage/unit-mathex' mocha 'test/unit/**/math-ex*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-data": "cross-env MOCHA_SUITE_NAME=\"Data Layer Unit Tests\" c8 --report-dir='coverage/unit-data' mocha 'test/unit/data/**' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-e2e-all": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" c8 --report-dir='coverage/e2e-all' mocha 'test/e2e/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-all.xml",
Expand Down
8 changes: 4 additions & 4 deletions src/commands/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import {type LockManager} from '../core/lock/lock-manager.js';
import {type LocalConfig} from '../core/config/local/local-config.js';
import {type RemoteConfigManager} from '../core/config/remote/remote-config-manager.js';
import {type Helm} from '../core/helm.js';
import {type K8Factory} from '../integration/kube/k8-factory.js';
import {type ChartManager} from '../core/chart-manager.js';
import {type ConfigManager} from '../core/config-manager.js';
import {type DependencyManager} from '../core/dependency-managers/index.js';
Expand All @@ -23,10 +21,12 @@
import {type ProfileManager} from '../core/profile-manager.js';
import {type CertificateManager} from '../core/certificate-manager.js';
import {PathEx} from '../business/utils/path-ex.js';
import {type K8Factory} from '../integration/kube/k8-factory.js';
import {type HelmClient} from '../integration/helm/HelmClient.js';

export interface Opts {
logger: SoloLogger;
helm: Helm;
helm: HelmClient;
k8Factory: K8Factory;
downloader: PackageDownloader;
platformInstaller: PlatformInstaller;
Expand All @@ -43,7 +43,7 @@
}

export abstract class BaseCommand extends ShellRunner {
protected readonly helm: Helm;
protected readonly helm: HelmClient;
protected readonly k8Factory: K8Factory;
protected readonly chartManager: ChartManager;
public readonly configManager: ConfigManager;
Expand All @@ -52,7 +52,7 @@
public readonly localConfig: LocalConfig;
protected readonly remoteConfigManager: RemoteConfigManager;

constructor(opts: Opts) {

Check warning on line 55 in src/commands/base.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Missing accessibility modifier on method definition constructor
if (!opts || !opts.helm) throw new Error('An instance of core/Helm is required');
if (!opts || !opts.k8Factory) throw new Error('An instance of core/K8Factory is required');
if (!opts || !opts.chartManager) throw new Error('An instance of core/ChartManager is required');
Expand Down Expand Up @@ -85,7 +85,7 @@
* @param chartDirectory - the chart directory
* @param profileValuesFile - mapping of clusterRef to the profile values file full path
*/
static prepareValuesFilesMapMulticluster(

Check warning on line 88 in src/commands/base.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Missing accessibility modifier on method definition prepareValuesFilesMapMulticluster
clusterRefs: ClusterRefs,
chartDirectory?: string,
profileValuesFile?: Record<ClusterRef, string>,
Expand Down Expand Up @@ -154,7 +154,7 @@
* @param chartDirectory - the chart directory
* @param profileValuesFile - the profile values file full path
*/
static prepareValuesFilesMap(

Check warning on line 157 in src/commands/base.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Missing accessibility modifier on method definition prepareValuesFilesMap
clusterRefs: ClusterRefs,
chartDirectory?: string,
profileValuesFile?: string,
Expand Down Expand Up @@ -221,7 +221,7 @@
return valuesFiles;
}

abstract close(): Promise<void>;

Check warning on line 224 in src/commands/base.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Missing accessibility modifier on method definition close

/**
* Setup home directories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {type NamespaceName} from '../../../integration/kube/resources/namespace/
import {type ClusterRef} from '../../../core/config/remote/types.js';

export interface ClusterRefSetupConfigClass {
chartDir: string;
chartDirectory: string;
clusterSetupNamespace: NamespaceName;
deployMinio: boolean;
deployPrometheusStack: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {type ClusterRefSetupConfigClass} from './cluster-ref-setup-config-class.

export interface ClusterRefSetupContext {
config: ClusterRefSetupConfigClass;
chartPath: string;
isChartInstalled: boolean;
valuesArg: string;
context: string;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/cluster/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
private static readonly CONNECT_CONFIGS_NAME = 'connectConfig';
private static readonly DEFAULT_CONFIGS_NAME = 'defaultConfig';

constructor(

Check warning on line 35 in src/commands/cluster/configs.ts

View workflow job for this annotation

GitHub Actions / Code Style / Standard

Missing accessibility modifier on method definition constructor
@inject(InjectTokens.ConfigManager) private readonly configManager: ConfigManager,
@inject(InjectTokens.SoloLogger) private readonly logger: SoloLogger,
@inject(InjectTokens.ChartManager) private readonly chartManager: ChartManager,
Expand Down Expand Up @@ -103,7 +103,7 @@
]);

ctx.config = {
chartDir: configManager.getFlag(flags.chartDirectory),
chartDirectory: configManager.getFlag(flags.chartDirectory),
clusterSetupNamespace: configManager.getFlag<NamespaceName>(flags.clusterSetupNamespace),
deployMinio: configManager.getFlag<boolean>(flags.deployMinio),
deployPrometheusStack: configManager.getFlag<boolean>(flags.deployPrometheusStack),
Expand Down
24 changes: 7 additions & 17 deletions src/commands/cluster/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import {Flags as flags} from '../flags.js';
import {type ArgvStruct, type AnyListrContext, type ConfigBuilder} from '../../types/aliases.js';
import {prepareChartPath, showVersionBanner} from '../../core/helpers.js';
import {showVersionBanner} from '../../core/helpers.js';
import * as constants from '../../core/constants.js';
import chalk from 'chalk';
import {ListrLock} from '../../core/lock/listr-lock.js';
Expand All @@ -21,7 +21,6 @@ import {patchInject} from '../../core/dependency-injection/container-helper.js';
import {type SoloLogger} from '../../core/logging.js';
import {type ChartManager} from '../../core/chart-manager.js';
import {type LockManager} from '../../core/lock/lock-manager.js';
import {type Helm} from '../../core/helm.js';
import {type ClusterChecks} from '../../core/cluster-checks.js';
import {container} from 'tsyringe-neo';
import {InjectTokens} from '../../core/dependency-injection/inject-tokens.js';
Expand All @@ -42,14 +41,12 @@ export class ClusterCommandTasks {
@inject(InjectTokens.SoloLogger) private readonly logger: SoloLogger,
@inject(InjectTokens.ChartManager) private readonly chartManager: ChartManager,
@inject(InjectTokens.LockManager) private readonly leaseManager: LockManager,
@inject(InjectTokens.Helm) private readonly helm: Helm,
) {
this.k8Factory = patchInject(k8Factory, InjectTokens.K8Factory, this.constructor.name);
this.localConfig = patchInject(localConfig, InjectTokens.LocalConfig, this.constructor.name);
this.logger = patchInject(logger, InjectTokens.SoloLogger, this.constructor.name);
this.chartManager = patchInject(chartManager, InjectTokens.ChartManager, this.constructor.name);
this.leaseManager = patchInject(leaseManager, InjectTokens.LockManager, this.constructor.name);
this.helm = patchInject(helm, InjectTokens.Helm, this.constructor.name);
}

public connectClusterRef(): SoloListrTask<ClusterRefConnectContext> {
Expand Down Expand Up @@ -114,16 +111,16 @@ export class ClusterCommandTasks {
/**
* Prepare values arg for cluster setup command
*
* @param [chartDir] - local charts directory (default is empty)
* @param chartDirectory
* @param [prometheusStackEnabled] - a bool to denote whether to install prometheus stack
* @param [minioEnabled] - a bool to denote whether to install minio
*/
private prepareValuesArg(
chartDir = flags.chartDirectory.definition.defaultValue as string,
chartDirectory = flags.chartDirectory.definition.defaultValue as string,
prometheusStackEnabled = flags.deployPrometheusStack.definition.defaultValue as boolean,
minioEnabled = flags.deployMinio.definition.defaultValue as boolean,
): string {
let valuesArg = chartDir ? `-f ${PathEx.join(chartDir, 'solo-cluster-setup', 'values.yaml')}` : '';
let valuesArg = chartDirectory ? `-f ${PathEx.join(chartDirectory, 'solo-cluster-setup', 'values.yaml')}` : '';

valuesArg += ` --set cloud.prometheusStack.enabled=${prometheusStackEnabled}`;
valuesArg += ` --set cloud.minio.enabled=${minioEnabled}`;
Expand Down Expand Up @@ -208,13 +205,6 @@ export class ClusterCommandTasks {
return {
title: 'Prepare chart values',
task: async ctx => {
ctx.chartPath = await prepareChartPath(
this.helm,
ctx.config.chartDir,
constants.SOLO_TESTING_CHART_URL,
constants.SOLO_CLUSTER_SETUP_CHART,
);

// if minio is already present, don't deploy it
if (ctx.config.deployMinio && (await self.clusterChecks.isMinioInstalled(ctx.config.clusterSetupNamespace))) {
ctx.config.deployMinio = false;
Expand All @@ -235,7 +225,7 @@ export class ClusterCommandTasks {
}

ctx.valuesArg = this.prepareValuesArg(
ctx.config.chartDir,
ctx.config.chartDirectory,
ctx.config.deployPrometheusStack,
ctx.config.deployMinio,
);
Expand All @@ -254,11 +244,11 @@ export class ClusterCommandTasks {
const valuesArg = ctx.valuesArg;

try {
this.logger.debug(`Installing chart chartPath = ${ctx.chartPath}, version = ${version}`);
await this.chartManager.install(
clusterSetupNamespace,
constants.SOLO_CLUSTER_SETUP_CHART,
ctx.chartPath,
constants.SOLO_CLUSTER_SETUP_CHART,
ctx.config.chartDirectory ? ctx.config.chartDirectory : constants.SOLO_TESTING_CHART_URL,
version,
valuesArg,
ctx.config.context,
Expand Down
32 changes: 11 additions & 21 deletions src/commands/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import {type AnyYargs, type CommandBuilder} from '../types/aliases.js';
import {ListrLock} from '../core/lock/listr-lock.js';
import {ComponentType} from '../core/config/remote/enumerations.js';
import {MirrorNodeExplorerComponent} from '../core/config/remote/components/mirror-node-explorer-component.js';
import {prepareChartPath, prepareValuesFiles, showVersionBanner} from '../core/helpers.js';
import {prepareValuesFiles, showVersionBanner} from '../core/helpers.js';
import {type SoloListrTask} from '../types/index.js';
import {resolveNamespaceFromDeployment} from '../core/resolvers.js';
import {NamespaceName} from '../integration/kube/resources/namespace/namespace-name.js';
import {type ClusterChecks} from '../core/cluster-checks.js';
import {container} from 'tsyringe-neo';
import {InjectTokens} from '../core/dependency-injection/inject-tokens.js';
import {INGRESS_CONTROLLER_NAME} from '../core/constants.js';
import {HEDERA_EXPLORER_CHART_URL, INGRESS_CONTROLLER_NAME} from '../core/constants.js';
import {INGRESS_CONTROLLER_VERSION} from '../../version.js';

export interface ExplorerDeployConfigClass {
Expand Down Expand Up @@ -222,14 +222,7 @@ export class ExplorerCommand extends BaseCommand {
title: 'Install cert manager',
task: async ctx => {
const config = ctx.config;
const {chartDirectory, soloChartVersion} = config;

const chartPath = await prepareChartPath(
self.helm,
chartDirectory,
constants.SOLO_TESTING_CHART_URL,
constants.SOLO_CERT_MANAGER_CHART,
);
const {soloChartVersion} = config;

const soloCertManagerValuesArg = await self.prepareCertManagerChartValuesArg(config);
// check if CRDs of cert-manager are already installed
Expand All @@ -249,7 +242,8 @@ export class ExplorerCommand extends BaseCommand {
await self.chartManager.install(
NamespaceName.of(constants.CERT_MANAGER_NAME_SPACE),
constants.SOLO_CERT_MANAGER_CHART,
chartPath,
constants.SOLO_CERT_MANAGER_CHART,
ctx.config.chartDirectory ? ctx.config.chartDirectory : constants.SOLO_TESTING_CHART_URL,
soloChartVersion,
' --set cert-manager.installCRDs=true',
ctx.config.clusterContext,
Expand Down Expand Up @@ -277,7 +271,8 @@ export class ExplorerCommand extends BaseCommand {
await self.chartManager.upgrade(
NamespaceName.of(constants.CERT_MANAGER_NAME_SPACE),
constants.SOLO_CERT_MANAGER_CHART,
chartPath,
constants.SOLO_CERT_MANAGER_CHART,
ctx.config.chartDirectory ? ctx.config.chartDirectory : constants.SOLO_TESTING_CHART_URL,
soloChartVersion,
soloCertManagerValuesArg,
ctx.config.clusterContext,
Expand All @@ -298,7 +293,8 @@ export class ExplorerCommand extends BaseCommand {
await self.chartManager.install(
config.namespace,
constants.HEDERA_EXPLORER_RELEASE_NAME,
constants.HEDERA_EXPLORER_CHART_URL,
'',
HEDERA_EXPLORER_CHART_URL,
config.hederaExplorerVersion,
exploreValuesArg,
ctx.config.clusterContext,
Expand All @@ -318,17 +314,11 @@ export class ExplorerCommand extends BaseCommand {
}
explorerIngressControllerValuesArg += ` --set fullnameOverride=${constants.EXPLORER_INGRESS_CONTROLLER}`;

const ingressControllerChartPath = await prepareChartPath(
self.helm,
'', // don't use chartPath which is for local solo-charts only
constants.INGRESS_CONTROLLER_RELEASE_NAME,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
);

await self.chartManager.install(
config.namespace,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
ingressControllerChartPath,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
INGRESS_CONTROLLER_VERSION,
explorerIngressControllerValuesArg,
ctx.config.clusterContext,
Expand Down
21 changes: 4 additions & 17 deletions src/commands/mirror-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export interface MirrorNodeDeployConfigClass {
profileFile: string;
profileName: string;
valuesFile: string;
chartPath: string;
valuesArg: string;
quiet: boolean;
mirrorNodeVersion: string;
Expand Down Expand Up @@ -251,18 +250,11 @@ export class MirrorNodeCommand extends BaseCommand {
const namespace = await resolveNamespaceFromDeployment(this.localConfig, this.configManager, task);

ctx.config = this.configManager.getConfig(MirrorNodeCommand.DEPLOY_CONFIGS_NAME, allFlags, [
'chartPath',
'valuesArg',
'namespace',
]) as MirrorNodeDeployConfigClass;

ctx.config.namespace = namespace;
ctx.config.chartPath = await helpers.prepareChartPath(
self.helm,
'', // don't use chartPath which is for local solo-charts only
constants.MIRROR_NODE_RELEASE_NAME,
constants.MIRROR_NODE_CHART,
);

// predefined values first
ctx.config.valuesArg += helpers.prepareValuesFiles(constants.MIRROR_NODE_VALUES_FILE);
Expand Down Expand Up @@ -406,17 +398,11 @@ export class MirrorNodeCommand extends BaseCommand {
}
mirrorIngressControllerValuesArg += ` --set fullnameOverride=${constants.MIRROR_INGRESS_CONTROLLER}`;

const ingressControllerChartPath = await helpers.prepareChartPath(
self.helm,
'', // don't use chartPath which is for local solo-charts only
constants.INGRESS_CONTROLLER_RELEASE_NAME,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
);

await self.chartManager.install(
config.namespace,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
ingressControllerChartPath,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
constants.INGRESS_CONTROLLER_RELEASE_NAME,
INGRESS_CONTROLLER_VERSION,
mirrorIngressControllerValuesArg,
ctx.config.clusterContext,
Expand All @@ -435,7 +421,8 @@ export class MirrorNodeCommand extends BaseCommand {
await self.chartManager.install(
ctx.config.namespace,
constants.MIRROR_NODE_RELEASE_NAME,
ctx.config.chartPath,
constants.MIRROR_NODE_CHART,
constants.MIRROR_NODE_RELEASE_NAME,
ctx.config.mirrorNodeVersion,
ctx.config.valuesArg,
ctx.config.clusterContext,
Expand Down
Loading
Loading