Skip to content
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

feat: ensured user-provided values file takes precedence over solo-generated values #615

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 5 additions & 3 deletions src/commands/mirror_node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@
*/
async prepareValuesArg (config) {
let valuesArg = ''
if (config.valuesFile) {
valuesArg += this.prepareValuesFiles(config.valuesFile)
}

const profileName = this.configManager.getFlag(flags.profileName)
const profileValuesFile = await this.profileManager.prepareValuesForMirrorNodeChart(profileName)
Expand All @@ -122,6 +119,11 @@
}

valuesArg += ` --set hedera-mirror-node.enabled=true --set hedera-explorer.enabled=${config.deployHederaExplorer}`

if (config.valuesFile) {
valuesArg += this.prepareValuesFiles(config.valuesFile)

Check warning on line 124 in src/commands/mirror_node.mjs

View check run for this annotation

Codecov / codecov/patch

src/commands/mirror_node.mjs#L124

Added line #L124 was not covered by tests
}

return valuesArg
}

Expand Down
8 changes: 4 additions & 4 deletions src/commands/network.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@
valuesArg = `-f ${path.join(config.chartDirectory, 'fullstack-deployment', 'values.yaml')}`
}

if (config.valuesFile) {
valuesArg += this.prepareValuesFiles(config.valuesFile)
}

if (config.app !== constants.HEDERA_APP_NAME) {
const index = config.nodeIds.length
for (let i = 0; i < index; i++) {
Expand Down Expand Up @@ -124,6 +120,10 @@

valuesArg += ` --set "defaults.volumeClaims.enabled=${config.persistentVolumeClaims}"`

if (config.valuesFile) {
valuesArg += this.prepareValuesFiles(config.valuesFile)

Check warning on line 124 in src/commands/network.mjs

View check run for this annotation

Codecov / codecov/patch

src/commands/network.mjs#L124

Added line #L124 was not covered by tests
}

this.logger.debug('Prepared helm chart values', { valuesArg })
return valuesArg
}
Expand Down
10 changes: 6 additions & 4 deletions src/commands/relay.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

/**
* @param {string} valuesFile
* @param {string} nodeIDs
* @param {string[]} nodeIDs
* @param {string} chainID
* @param {string} relayRelease
* @param {number} replicaCount
Expand All @@ -78,9 +78,6 @@
*/
async prepareValuesArg (valuesFile, nodeIDs, chainID, relayRelease, replicaCount, operatorID, operatorKey, namespace) {
let valuesArg = ''
if (valuesFile) {
valuesArg += this.prepareValuesFiles(valuesFile)
}

const profileName = this.configManager.getFlag(flags.profileName)
const profileValuesFile = await this.profileManager.prepareValuesForRpcRelayChart(profileName)
Expand Down Expand Up @@ -120,6 +117,11 @@

const networkJsonString = await this.prepareNetworkJsonString(nodeIDs, namespace)
valuesArg += ` --set config.HEDERA_NETWORK='${networkJsonString}'`

if (valuesFile) {
valuesArg += this.prepareValuesFiles(valuesFile)

Check warning on line 122 in src/commands/relay.mjs

View check run for this annotation

Codecov / codecov/patch

src/commands/relay.mjs#L122

Added line #L122 was not covered by tests
}

return valuesArg
}

Expand Down
Loading