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: add envoy gateway to fullstack-cluster-setup helm chart #486

Merged
merged 3 commits into from
Nov 6, 2023
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
7 changes: 5 additions & 2 deletions charts/fullstack-cluster-setup/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ dependencies:
- name: grafana-agent
repository: https://grafana.github.io/helm-charts
version: 0.27.1
digest: sha256:1d98a6cef658a43c687cf9cfa773f8cb7f5b2468b7e38e9cbb4f99cbcfec6651
generated: "2023-10-27T14:52:43.529303+01:00"
- name: gateway-helm
repository: oci://docker.io/envoyproxy
version: v0.0.0-latest
digest: sha256:e1a03b92eab1c8c7f21fb7d7640e9049086fc97c6b1549598457dc944801e7c7
generated: "2023-11-03T14:01:11.306643Z"
6 changes: 6 additions & 0 deletions charts/fullstack-cluster-setup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ dependencies:
version: 0.27.1
repository: https://grafana.github.io/helm-charts
condition: cloud.grafanaAgent.enabled

- name: gateway-helm
jeromy-cannon marked this conversation as resolved.
Show resolved Hide resolved
alias: envoy-gateway
version: v0.0.0-latest
repository: oci://docker.io/envoyproxy
condition: cloud.envoyGateway.enabled
2 changes: 2 additions & 0 deletions charts/fullstack-cluster-setup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ cloud:
enabled: false
grafanaAgent:
enabled: false
envoyGateway:
enabled: false
4 changes: 2 additions & 2 deletions charts/fullstack-deployment/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ dependencies:
- name: tenant
repository: https://operator.min.io/
version: 5.0.7
digest: sha256:5dbc1a4af8f2b057dbd7730b6308e1a2954f3f95f86e8484bb232e64ed12e923
generated: "2023-10-04T15:47:44.747012+11:00"
digest: sha256:07f6ea06b7748b59dd24b34f2e742222ca2718592efc66d6fc55f78b628d4366
generated: "2023-11-03T13:52:20.781862Z"
18 changes: 7 additions & 11 deletions dev/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ init-shared:
echo "cloud:" > ${CLUSTER_SETUP_VALUES_FILE}

.PHONY: deploy-shared
deploy-shared: init-shared update-helm-dependencies deploy-gateway-api enable-prometheus-stack-if-required enable-minio-operator-if-required
deploy-shared: init-shared update-helm-dependencies enable-gateway-api enable-prometheus-stack-if-required enable-minio-operator-if-required
source "${SCRIPTS_DIR}/main.sh" && deploy_shared # run only after gateway-api CRDs are available

.PHONY: destroy-shared
Expand Down Expand Up @@ -153,15 +153,11 @@ restart: stop-nodes start-nodes
reset: destroy-network start

######################################### Gateway API #################################
.PHONY: deploy-gateway-api
deploy-gateway-api:
#source "${SCRIPTS_DIR}/${GATEWAY_API_SCRIPT}" && deploy_haproxy_ingress
source "${SCRIPTS_DIR}/${GATEWAY_API_SCRIPT}" && deploy_envoy_gateway_api

.PHONY: destroy-gateway-api
destroy-gateway-api:
#source "${SCRIPTS_DIR}/${GATEWAY_API_SCRIPT}" && destroy_haproxy_ingress
source "${SCRIPTS_DIR}/${GATEWAY_API_SCRIPT}" && destroy_envoy_gateway_api
.PHONY: enable-gateway-api
enable-gateway-api:
@echo ">> Enabling envoy gateway..."; \
echo " envoyGateway:" >> ${CLUSTER_SETUP_VALUES_FILE}; \
echo " enabled: true" >> ${CLUSTER_SETUP_VALUES_FILE};

######################################### Telemetry #################################
.PHONY: enable-prometheus-stack-if-required
Expand Down Expand Up @@ -189,7 +185,7 @@ destroy-grafana-tempo:
source "${SCRIPTS_DIR}/${TELEMETRY_SCRIPT}" && unexpose_grafana && destroy_grafana_tempo

.PHONY: deploy-prometheus
deploy-prometheus: init-shared deploy-gateway-api enable-prometheus-stack
deploy-prometheus: init-shared enable-gateway-api enable-prometheus-stack
source "${SCRIPTS_DIR}/main.sh" && deploy_shared # run only after gateway-api CRDs are available
-$(MAKE) wait-for-prometheus-operator
source "${SCRIPTS_DIR}/${TELEMETRY_SCRIPT}" && deploy-prometheus && expose_prometheus
Expand Down
11 changes: 8 additions & 3 deletions fullstack-network-manager/src/commands/cluster.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class ClusterCommand extends BaseCommand {
let chartName = "fullstack-cluster-setup"
let namespace = argv.namespace
let chartPath = `${core.constants.FST_HOME_DIR}/full-stack-testing/charts/${chartName}`
let valuesArg = this.prepareValuesArg(argv.prometheusStack, argv.minio)
let valuesArg = this.prepareValuesArg(argv.prometheusStack, argv.minio, argv.envoyGateway)

this.logger.showUser(chalk.cyan('> setting up cluster:'), chalk.yellow(`${clusterName}`))
await this.chartInstall(namespace, chartName, chartPath, valuesArg)
Expand Down Expand Up @@ -286,6 +286,7 @@ export class ClusterCommand extends BaseCommand {
yargs.option('namespace', flags.namespaceFlag)
yargs.option('prometheus-stack', flags.deployPrometheusStack)
yargs.option('minio', flags.deployMinio)
yargs.option('envoy-gateway', flags.deployEnvoyGateway)
},
handler: argv => {
clusterCmd.logger.debug("==== Running 'cluster setup' ===")
Expand All @@ -304,7 +305,11 @@ export class ClusterCommand extends BaseCommand {
}
}

prepareValuesArg(prometheusStackEnabled, minioEnabled) {
return ` --set cloud.prometheusStack.enabled=${prometheusStackEnabled} --set cloud.minio.enabled=${minioEnabled}`
prepareValuesArg(prometheusStackEnabled, minioEnabled, envoyGatewayEnabled) {
let valuesArg = ''
valuesArg += ` --set cloud.prometheusStack.enabled=${prometheusStackEnabled}`
valuesArg += ` --set cloud.minio.enabled=${minioEnabled}`
valuesArg += ` --set cloud.envoyGateway.enabled=${envoyGatewayEnabled}`
return valuesArg
}
}
7 changes: 7 additions & 0 deletions fullstack-network-manager/src/commands/flags.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ export const deployMinio = {
alias: 'o',
type: 'boolean'
}

export const deployEnvoyGateway = {
describe: 'Deploy envoy gateway',
default: true,
alias: 'e',
type: 'boolean'
}