Skip to content

Commit

Permalink
removed self signed cluster issuer
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
  • Loading branch information
jeromy-cannon committed Jan 26, 2024
1 parent 8f37d96 commit 17cc975
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 36 deletions.
10 changes: 0 additions & 10 deletions fullstack-network-manager/src/commands/flags.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,6 @@ export const tlsClusterIssuerName = { // tlsClusterIssuerType
}
}

export const selfSignedClusterIssuer = { // delete
name: 'self-signed',
definition: {
describe: 'Enable the self signed cluster issuer',
default: false,
type: 'boolean'
}
}

export const tlsClusterIssuerNamespace = { // delete
name: 'tls-cluster-issuer-namespace',
definition: { // TODO fix
Expand Down Expand Up @@ -316,6 +307,5 @@ export const allFlags = [
tlsClusterIssuerName,
tlsClusterIssuerNamespace,
enableHederaExplorerTls,
selfSignedClusterIssuer,
deletePvcs
]
15 changes: 5 additions & 10 deletions fullstack-network-manager/src/commands/network.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class NetworkCommand extends BaseCommand {
getTlsValueArguments (tlsClusterIssuerName, tlsClusterIssuerNamespace, enableHederaExplorerTls) {
// TODO rebuild

return valuesArg
// return valuesArg
}

prepareValuesFiles (valuesFile) {
Expand All @@ -29,7 +29,7 @@ export class NetworkCommand extends BaseCommand {
}

prepareValuesArg (chartDir, valuesFile, deployMirrorNode, deployHederaExplorer, tlsClusterIssuerName,
tlsClusterIssuerNamespace, enableHederaExplorerTls, acmeClusterIssuer, selfSignedClusterIssuer) {
tlsClusterIssuerNamespace, enableHederaExplorerTls, acmeClusterIssuer) {
let valuesArg = ''
if (chartDir) {
valuesArg = `-f ${chartDir}/fullstack-deployment/values.yaml`
Expand All @@ -39,7 +39,6 @@ export class NetworkCommand extends BaseCommand {

valuesArg += ` --set hedera-mirror-node.enabled=${deployMirrorNode} --set hedera-explorer.enabled=${deployHederaExplorer}`
valuesArg += ` --set cloud.acmeClusterIssuer.enabled=${acmeClusterIssuer}`
valuesArg += ` --set cloud.selfSignedClusterIssuer.enabled=${selfSignedClusterIssuer}`

// if (enableTls) {
// valuesArg += this.getTlsValueArguments(enableTls, tlsClusterIssuerName, tlsClusterIssuerNamespace, enableHederaExplorerTls)
Expand All @@ -60,7 +59,6 @@ export class NetworkCommand extends BaseCommand {
const tlsClusterIssuerNamespace = this.configManager.getFlag(flags.tlsClusterIssuerNamespace)
const enableHederaExplorerTls = this.configManager.getFlag(flags.enableHederaExplorerTls)
const acmeClusterIssuer = this.configManager.getFlag(flags.acmeClusterIssuer)
const selfSignedClusterIssuer = this.configManager.getFlag(flags.selfSignedClusterIssuer)

// prompt if values are missing and create a config object
const config = {
Expand All @@ -74,7 +72,6 @@ export class NetworkCommand extends BaseCommand {
tlsClusterIssuerNamespace: await prompts.promptTlsClusterIssuerNamespace(task, tlsClusterIssuerNamespace),
enableHederaExplorerTls: await prompts.promptEnableHederaExplorerTls(task, enableHederaExplorerTls),
acmeClusterIssuer: await prompts.promptAcmeClusterIssuer(task, acmeClusterIssuer),
selfSignedClusterIssuer: await prompts.promptSelfSignedClusterIssuer(task, selfSignedClusterIssuer),
version: this.configManager.getVersion()
}

Expand All @@ -85,7 +82,7 @@ export class NetworkCommand extends BaseCommand {
config.valuesArg = this.prepareValuesArg(config.chartDir,
config.valuesFile, config.deployMirrorNode, config.deployHederaExplorer,
config.tlsClusterIssuerName, config.tlsClusterIssuerNamespace, config.enableHederaExplorerTls,
config.acmeClusterIssuer, config.selfSignedClusterIssuer)
config.acmeClusterIssuer)

return config
}
Expand Down Expand Up @@ -299,8 +296,7 @@ export class NetworkCommand extends BaseCommand {
flags.tlsClusterIssuerName,
flags.tlsClusterIssuerNamespace,
flags.enableHederaExplorerTls,
flags.acmeClusterIssuer,
flags.selfSignedClusterIssuer
flags.acmeClusterIssuer
)
},
handler: argv => {
Expand Down Expand Up @@ -351,8 +347,7 @@ export class NetworkCommand extends BaseCommand {
flags.tlsClusterIssuerName,
flags.tlsClusterIssuerNamespace,
flags.enableHederaExplorerTls,
flags.acmeClusterIssuer,
flags.selfSignedClusterIssuer
flags.acmeClusterIssuer
),
handler: argv => {
networkCmd.logger.debug("==== Running 'chart upgrade' ===")
Expand Down
16 changes: 0 additions & 16 deletions fullstack-network-manager/src/commands/prompts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -351,22 +351,6 @@ export async function promptDeployHederaExplorer (task, input) {
}
}

export async function promptSelfSignedClusterIssuer (task, input) {
try {
if (input === undefined) {
input = await task.prompt(ListrEnquirerPromptAdapter).run({
type: 'toggle',
default: flags.selfSignedClusterIssuer.definition.default,
message: 'Would you like to enable the self signed cluster issuer?'
})
}

return input
} catch (e) {
throw new FullstackTestingError(`input failed: ${flags.selfSignedClusterIssuer.name}`, e)
}
}

export async function promptTlsClusterIssuerName (task, input) {
try {
if (!input) {
Expand Down

0 comments on commit 17cc975

Please sign in to comment.