Skip to content

Commit

Permalink
feat: sync the most recent values file changes for fullstack-deployme…
Browse files Browse the repository at this point in the history
…nt and fullstack-cluster-setup charts to fsnetman command line options (#698)

Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon authored Jan 29, 2024
1 parent 961a599 commit 0599dd1
Show file tree
Hide file tree
Showing 12 changed files with 289 additions and 212 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/zxc-compile-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ jobs:
run: |
helm repo add haproxytech https://haproxytech.github.io/helm-charts
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm pull prometheus-community/prometheus
helm pull haproxytech/haproxy
- name: Unit Tests
id: gradle-test
Expand Down
4 changes: 0 additions & 4 deletions charts/fullstack-deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ cloud:
buckets:
streamBucket: "fst-streams"
backupBucket: "fst-backups"
s3:
enabled: "true"
gcs:
enabled: "true"
minio:
enabled: true
acmeClusterIssuer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,27 @@
package com.hedera.fullstack.gradle.plugin

import com.hedera.fullstack.base.api.util.ExceptionUtils.suppressExceptions
import org.assertj.core.api.Assertions.*
import org.junit.jupiter.api.Assertions.assertThrows

import com.hedera.fullstack.helm.client.HelmClient
import com.hedera.fullstack.helm.client.HelmExecutionException
import com.hedera.fullstack.helm.client.model.Chart
import com.hedera.fullstack.helm.client.model.Repository
import java.io.File
import org.assertj.core.api.Assertions.assertThat
import org.gradle.api.Project
import org.gradle.kotlin.dsl.create
import org.gradle.testfixtures.ProjectBuilder
import org.junit.jupiter.api.Assertions.assertThrows
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
import java.io.File

class HelmInstallChartTaskTest {
companion object {
private val REPOSITORY = Repository("stable", "https://charts.helm.sh/stable")
private val CHART = Chart("mysql", "stable")
private val REPOSITORY = Repository("prometheus-community", "https://prometheus-community.github.io/helm-charts")
private val CHART = Chart("prometheus", "prometheus-community")

private const val RELEASE_NAME = "mysql-release"
private const val RELEASE_NAME = "prometheus-release"

private lateinit var project: Project

Expand Down
9 changes: 1 addition & 8 deletions fullstack-network-manager/src/commands/cluster.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ export class ClusterCommand extends BaseCommand {

// extract config values
const clusterName = self.configManager.getFlag(flags.clusterName)
const namespace = argv.namespace || constants.DEFAULT_NAMESPACE
const namespace = self.configManager.getFlag(flags.namespace) || constants.DEFAULT_NAMESPACE
const chartDir = self.configManager.getFlag(flags.chartDirectory)
const deployPrometheusStack = self.configManager.getFlag(flags.deployPrometheusStack)
const deployMinio = self.configManager.getFlag(flags.deployMinio)
const deployEnvoyGateway = self.configManager.getFlag(flags.deployEnvoyGateway)
const deployCertManager = self.configManager.getFlag(flags.deployCertManager)
const deployCertManagerCrds = self.configManager.getFlag(flags.deployCertManagerCrds)

Expand All @@ -71,7 +70,6 @@ export class ClusterCommand extends BaseCommand {
chartDir: await prompts.promptChartDir(task, chartDir),
deployPrometheusStack: await prompts.promptDeployPrometheusStack(task, deployPrometheusStack),
deployMinio: await prompts.promptDeployMinio(task, deployMinio),
deployEnvoyGateway: await prompts.promptDeployEnvoyGateway(task, deployEnvoyGateway),
deployCertManager: await prompts.promptDeployCertManager(task, deployCertManager),
deployCertManagerCrds: await prompts.promptDeployCertManagerCrds(task, deployCertManagerCrds)
}
Expand All @@ -89,7 +87,6 @@ export class ClusterCommand extends BaseCommand {
ctx.config.chartDir,
ctx.config.deployPrometheusStack,
ctx.config.deployMinio,
ctx.config.deployEnvoyGateway,
ctx.config.deployCertManager,
ctx.config.deployCertManagerCrds
)
Expand Down Expand Up @@ -234,7 +231,6 @@ export class ClusterCommand extends BaseCommand {
flags.chartDirectory,
flags.deployPrometheusStack,
flags.deployMinio,
flags.deployEnvoyGateway,
flags.deployCertManager,
flags.deployCertManagerCrds
),
Expand Down Expand Up @@ -282,15 +278,13 @@ export class ClusterCommand extends BaseCommand {
* @param chartDir local charts directory (default is empty)
* @param prometheusStackEnabled a bool to denote whether to install prometheus stack
* @param minioEnabled a bool to denote whether to install minio
* @param envoyGatewayEnabled a bool to denote whether to install envoy-gateway
* @param certManagerEnabled a bool to denote whether to install cert manager
* @param certManagerCrdsEnabled a bool to denote whether to install cert manager CRDs
* @returns {string}
*/
prepareValuesArg (chartDir = flags.chartDirectory.definition.default,
prometheusStackEnabled = flags.deployPrometheusStack.definition.default,
minioEnabled = flags.deployMinio.definition.default,
envoyGatewayEnabled = flags.deployEnvoyGateway.definition.default,
certManagerEnabled = flags.deployCertManager.definition.default,
certManagerCrdsEnabled = flags.deployCertManagerCrds.definition.default
) {
Expand All @@ -301,7 +295,6 @@ export class ClusterCommand extends BaseCommand {

valuesArg += ` --set cloud.prometheusStack.enabled=${prometheusStackEnabled}`
valuesArg += ` --set cloud.minio.enabled=${minioEnabled}`
valuesArg += ` --set cloud.envoyGateway.enabled=${envoyGatewayEnabled}`
valuesArg += ` --set cloud.certManager.enabled=${certManagerEnabled}`
valuesArg += ` --set cert-manager.installCRDs=${certManagerCrdsEnabled}`

Expand Down
74 changes: 27 additions & 47 deletions fullstack-network-manager/src/commands/flags.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,25 @@ export const deployPrometheusStack = {
name: 'prometheus-stack',
definition: {
describe: 'Deploy prometheus stack',
default: true,
default: false,
type: 'boolean'
}
}

export const deployMinio = {
name: 'minio',
export const enablePrometheusSvcMonitor = {
name: 'enable-prometheus-svc-monitor',
definition: {
describe: 'Deploy minio operator',
describe: 'Enable prometheus service monitor for the network nodes',
default: true,
type: 'boolean'
}
}

export const deployEnvoyGateway = {
name: 'envoy-gateway',
export const deployMinio = {
name: 'minio',
definition: {
describe: 'Deploy envoy gateway',
default: true,
describe: 'Deploy minio operator',
default: false,
type: 'boolean'
}
}
Expand Down Expand Up @@ -245,57 +245,39 @@ export const operatorKey = {
}
}

export const enableTls = {
name: 'enable-tls',
definition: {
describe: 'Enables TLS for gateway ingress services [grpcs, grpcWeb, hederaExplorer]',
default: false,
type: 'boolean'
}
}

export const tlsClusterIssuerName = {
name: 'tls-cluster-issuer-name',
export const tlsClusterIssuerType = {
name: 'tls-cluster-issuer-type',
definition: {
describe: 'The name of the TLS cluster issuer to use for gateway services, defaults to "self-signed-ca", another option for the acme-cluster-issuer is "letsencrypt-staging" and "letsencrypt-prod"',
describe: 'The TLS cluster issuer type to use for hedera explorer, defaults to "self-signed", the available options are: "acme-staging", "acme-prod", or "self-signed"',
default: 'self-signed',
type: 'string'
}
}

export const selfSignedClusterIssuer = {
name: 'self-signed',
export const enableHederaExplorerTls = { // KEEP
name: 'enable-hedera-explorer-tls',
definition: {
describe: 'Enable the self signed cluster issuer',
describe: 'Enable the Hedera Explorer TLS, defaults to false',
default: false,
type: 'boolean'
}
}

export const tlsClusterIssuerNamespace = {
name: 'tls-cluster-issuer-namespace',
export const hederaExplorerTlsLoadBalancerIp = {
name: 'hedera-explorer-tls-load-balancer-ip',
definition: {
describe: 'The namespace of the TLS cluster issuer to use for gateway services, defaults to "cert-manager"',
default: 'cert-manager',
describe: 'The static IP address to use for the Hedera Explorer TLS load balancer, defaults to ""',
default: '',
type: 'string'
}
}

export const acmeClusterIssuer = {
name: 'acme-cluster-issuer',
export const hederaExplorerTlsHostName = {
name: 'hedera-explorer-tls-host-name',
definition: {
describe: 'The acme let\'s encrypt cert-manager cluster issuer, defaults to false',
default: false,
type: 'boolean'
}
}

export const enableHederaExplorerTls = {
name: 'enable-hedera-explorer-tls',
definition: {
describe: 'Enable the Hedera Explorer TLS, defaults to false',
default: false,
type: 'boolean'
describe: 'The host name to use for the Hedera Explorer TLS, defaults to "explorer.fst.local"',
default: 'explorer.fst.local',
type: 'string'
}
}

Expand All @@ -318,11 +300,10 @@ export const allFlags = [
deployJsonRpcRelay,
valuesFile,
deployPrometheusStack,
enablePrometheusSvcMonitor,
deployMinio,
deployEnvoyGateway,
deployCertManager,
deployCertManagerCrds,
acmeClusterIssuer,
releaseTag,
relayReleaseTag,
cacheDir,
Expand All @@ -332,10 +313,9 @@ export const allFlags = [
chainId,
operatorId,
operatorKey,
enableTls,
tlsClusterIssuerName,
tlsClusterIssuerNamespace,
tlsClusterIssuerType,
enableHederaExplorerTls,
selfSignedClusterIssuer,
hederaExplorerTlsLoadBalancerIp,
hederaExplorerTlsHostName,
deletePvcs
]
Loading

0 comments on commit 0599dd1

Please sign in to comment.