Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Mar 27, 2024
1 parent 53fa556 commit 4f023b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Shared environment block used across each component.
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
key: postgresql-password
key: password
- name: REDASH_DATABASE_HOSTNAME
value: {{ include "redash.postgresql.fullname" . }}
- name: REDASH_DATABASE_PORT
Expand Down
21 changes: 6 additions & 15 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,12 @@ data:
ATTEMPTS=$((ATTEMPTS+1))
# Install and upgrade
if [[ "${1}" == "install" ]]; then
echo "Installing Redash:"
timeout $CREATE_TIMEOUT /app/manage.py database create_tables
echo "Tables created"
echo "Running Redash database migrations after install"
timeout $UPGRADE_TIMEOUT /app/manage.py db upgrade
echo "Upgrade complete"
fi
# Upgrade
if [[ "${1}" == "upgrade" ]]; then
echo "Running Redash database migrations:"
timeout $UPGRADE_TIMEOUT /app/manage.py db upgrade
echo "Upgrade complete"
fi
echo "Installing Redash:"
timeout $CREATE_TIMEOUT /app/manage.py database create_tables
echo "Tables created"
echo "Running Redash database migrations after install"
timeout $UPGRADE_TIMEOUT /app/manage.py db upgrade
echo "Upgrade complete"
STATUS=$(timeout $STATUS_TIMEOUT /app/manage.py status 2>&1)
RETCODE=$?
Expand Down
2 changes: 1 addition & 1 deletion templates/hook-migrations-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- toYaml .Values.migrations.securityContext | nindent 10 }}
image: {{ .Values.image.registry }}/{{ .Values.image.repo }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/bash", "/config/install-upgrade.sh", "upgrade"]
command: ["/bin/bash", "/config/install-upgrade.sh"]
volumeMounts:
- name: config
mountPath: /config
Expand Down

0 comments on commit 4f023b0

Please sign in to comment.