Skip to content

Commit

Permalink
Merge pull request #194 from tryretool/revert-190-jason/java-dbc-befo…
Browse files Browse the repository at this point in the history
…re-3.93

Revert "[fix] Update chart to handle the opt-in mechanism for Java dbconnecto…"
  • Loading branch information
june-xu authored Nov 21, 2024
2 parents 5421cb7 + 0679edc commit c7d8d30
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 40 deletions.
6 changes: 1 addition & 5 deletions .github/kubeconform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ for CHART_DIR in ${CHART_DIRS}; do
echo "Running kubeconform for folder: '$CHART_DIR'"
helm dep up "${CHART_DIR}"
for VALUES_FILE in $(find "${CHART_DIR}/ci" -name '*values.yaml'); do
echo "== Checking values file: ${VALUES_FILE}"
helm template --kube-version "${KUBERNETES_VERSION#v}" --values "${VALUES_FILE}" "${CHART_DIR}" \
| ./kubeconform --strict --summary --kubernetes-version "${KUBERNETES_VERSION#v}"
for OPTION_FILE in $(find "${CHART_DIR}/ci" -name '*option.yaml'); do
echo "== Checking values file: ${VALUES_FILE} and option file: ${OPTION_FILE}"
helm template --kube-version "${KUBERNETES_VERSION#v}" --values "${VALUES_FILE}" --values "${OPTION_FILE}" "${CHART_DIR}" \
| ./kubeconform --strict --summary --kubernetes-version "${KUBERNETES_VERSION#v}"
done
done
done
2 changes: 1 addition & 1 deletion charts/retool/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: retool
description: A Helm chart for Kubernetes
type: application
version: 6.2.13
version: 6.2.14
maintainers:
- name: Retool Engineering
email: [email protected]
Expand Down
2 changes: 0 additions & 2 deletions charts/retool/ci/test-edge-release-option.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions charts/retool/ci/test-stable-release-option.yaml

This file was deleted.

29 changes: 11 additions & 18 deletions charts/retool/templates/deployment_backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,21 @@ spec:
value: {{ template "retool.deploymentTemplateVersion" . }}
- name: NODE_ENV
value: production
{{- $retool_version_with_java_dbconnector_opt_out := ( or (eq "latest" $.Values.image.tag ) ( semverCompare ">= 3.93.0-0" $.Values.image.tag ) ) }}
{{- $serviceType := list "MAIN_BACKEND" "DB_CONNECTOR" "DB_SSH_CONNECTOR" }}
{{- /*
JAVA_DBCONNECTOR in the service type only applies before the version of Retool that changes it to opt-out (3.93.0-edge),
and only if the Java dbconnector is enabled in values.yaml.
*/}}
{{- if and ( not $retool_version_with_java_dbconnector_opt_out ) ( $.Values.dbconnector.java.enabled ) }}
{{- $serviceType = append $serviceType "JAVA_DBCONNECTOR" }}
{{- end }}
{{- /*
It may seem counterintuitive to add the JOBS_RUNNER service type only without a jobs runner.
The reason for this is that the backend needs to act as a jobs runner, if the jobs runner is not enabled.
*/}}
{{- if not .Values.jobRunner.enabled }}
{{- $serviceType = append $serviceType "JOBS_RUNNER" }}
{{- end }}
{{- if include "retool.jobRunner.enabled" . }}
{{ if ( not $.Values.dbconnector.java.enabled ) }}
- name: DISABLE_JAVA_DBCONNECTOR
value: "true"
{{ end }}
- name: SERVICE_TYPE
value: {{ join "," $serviceType }}
{{ if and $retool_version_with_java_dbconnector_opt_out ( not $.Values.dbconnector.java.enabled ) }}
value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR
{{- else }}
{{ if ( not $.Values.dbconnector.java.enabled ) }}
- name: DISABLE_JAVA_DBCONNECTOR
value: "true"
{{ end }}
- name: SERVICE_TYPE
value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR,JOBS_RUNNER
{{- end }}
- name: CLIENT_ID
value: {{ default "" .Values.config.auth.google.clientId }}
- name: COOKIE_INSECURE
Expand Down
15 changes: 3 additions & 12 deletions charts/retool/templates/deployment_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,12 @@ spec:
value: {{ template "retool.deploymentTemplateVersion" . }}
- name: NODE_ENV
value: production
{{- $retool_version_with_java_dbconnector_opt_out := ( or (eq "latest" $.Values.image.tag ) ( semverCompare ">= 3.93.0-0" $.Values.image.tag ) ) }}
{{- $serviceType := list "WORKFLOW_BACKEND" "DB_CONNECTOR" "DB_SSH_CONNECTOR" }}
{{- /*
JAVA_DBCONNECTOR in the service type only applies before the version of Retool that changes it to opt-out (3.93.0-edge),
and only if the Java dbconnector is enabled in values.yaml.
*/}}
{{- if and ( not $retool_version_with_java_dbconnector_opt_out ) ( $.Values.dbconnector.java.enabled ) }}
{{- $serviceType = append $serviceType "JAVA_DBCONNECTOR" }}
{{- end }}
- name: SERVICE_TYPE
value: {{ join "," $serviceType }}
{{ if and $retool_version_with_java_dbconnector_opt_out ( not $.Values.dbconnector.java.enabled ) }}
{{ if ( not $.Values.dbconnector.java.enabled ) }}
- name: DISABLE_JAVA_DBCONNECTOR
value: "true"
{{ end }}
- name: SERVICE_TYPE
value: WORKFLOW_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR
- name: DBCONNECTOR_POSTGRES_POOL_MAX_SIZE
value: "100"
- name: DBCONNECTOR_QUERY_TIMEOUT_MS
Expand Down

0 comments on commit c7d8d30

Please sign in to comment.