diff --git a/.github/kubeconform.sh b/.github/kubeconform.sh index 422f9c9..bd16579 100755 --- a/.github/kubeconform.sh +++ b/.github/kubeconform.sh @@ -21,8 +21,12 @@ 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 diff --git a/charts/retool/Chart.yaml b/charts/retool/Chart.yaml index b242b30..6fbac83 100644 --- a/charts/retool/Chart.yaml +++ b/charts/retool/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: retool description: A Helm chart for Kubernetes type: application -version: 6.2.10 +version: 6.2.11 maintainers: - name: Retool Engineering email: engineering+helm@retool.com diff --git a/charts/retool/ci/test-edge-release-option.yaml b/charts/retool/ci/test-edge-release-option.yaml new file mode 100644 index 0000000..b07a7bb --- /dev/null +++ b/charts/retool/ci/test-edge-release-option.yaml @@ -0,0 +1,2 @@ +image: + tag: "3.5000.0-edge" diff --git a/charts/retool/ci/test-stable-release-option.yaml b/charts/retool/ci/test-stable-release-option.yaml new file mode 100644 index 0000000..013c5ef --- /dev/null +++ b/charts/retool/ci/test-stable-release-option.yaml @@ -0,0 +1,2 @@ +image: + tag: "3.0.0-stable" diff --git a/charts/retool/templates/deployment_backend.yaml b/charts/retool/templates/deployment_backend.yaml index 1d88209..bb060b5 100644 --- a/charts/retool/templates/deployment_backend.yaml +++ b/charts/retool/templates/deployment_backend.yaml @@ -77,21 +77,28 @@ spec: value: {{ template "retool.deploymentTemplateVersion" . }} - name: NODE_ENV value: production - {{- if include "retool.jobRunner.enabled" . }} - {{ if ( not $.Values.dbconnector.java.enabled ) }} - - name: DISABLE_JAVA_DBCONNECTOR - value: "true" - {{ end }} + {{- $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 }} - name: SERVICE_TYPE - value: MAIN_BACKEND,DB_CONNECTOR,DB_SSH_CONNECTOR - {{- else }} - {{ if ( not $.Values.dbconnector.java.enabled ) }} + value: {{ join "," $serviceType }} + {{ if and $retool_version_with_java_dbconnector_opt_out ( 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 diff --git a/charts/retool/templates/deployment_workflows.yaml b/charts/retool/templates/deployment_workflows.yaml index 7002b9b..2211aca 100644 --- a/charts/retool/templates/deployment_workflows.yaml +++ b/charts/retool/templates/deployment_workflows.yaml @@ -66,12 +66,21 @@ spec: value: {{ template "retool.deploymentTemplateVersion" . }} - name: NODE_ENV value: production - {{ if ( not $.Values.dbconnector.java.enabled ) }} + {{- $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 ) }} - 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