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

fix: improve tests hasura #49

Merged
merged 3 commits into from
Sep 4, 2024
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
2 changes: 1 addition & 1 deletion charts/mint/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.3.1-alpha.0
version: 3.3.1-alpha.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
Expand Down
10 changes: 7 additions & 3 deletions charts/mint/templates/hasura.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ spec:
secretKeyRef:
name: {{ include "mint.prefix" . }}-hasura-secrets
key: jwt_secret
- name: DB_HOST
value: {{ include "mint.prefix" $ }}-hasura
ports:
- name: http
containerPort: 8080
Expand All @@ -84,9 +86,11 @@ spec:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
exec:
command:
- /bin/sh
- -c
- pg_isready -h localhost -p 5432
- name: hasura-db
#if the values.arm_support is true, then use the arm_image, otherwise use the image
{{- if .Values.arm_support }}
Expand Down
26 changes: 25 additions & 1 deletion charts/mint/templates/post-install-hasura.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,34 @@ spec:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
restartPolicy: Never
initContainers:
- name: wait-for-db
image: busybox
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 110m
memory: 110Mi
command: ['sh', '-c', 'until nc -z ${DB_HOST} 5432; do echo waiting for db; sleep 2; done;']
env:
- name: DB_HOST
value: {{ include "mint.prefix" $ }}-hasura
- name: DB_PORT
value: "5432"
- name: DB_NAME
value: ALL
- name: DB_USER
valueFrom:
secretKeyRef:
name: {{ include "mint.prefix" . }}-hasura-secrets
key: username

containers:
- name: post-install-hasura
command: ["/bin/bash"]
args: ["-c", "env && hasura migrate apply && hasura metadata apply && hasura seeds apply"]
args: ["-c", "env && pushd /hasura && hasura migrate apply && hasura metadata apply && hasura seeds apply"]
{{- with .Values.components.hasura }}
image: "{{ .image.repository }}:{{ .image.tag | default $.Chart.AppVersion }}"
resources:
Expand Down
4 changes: 2 additions & 2 deletions charts/mint/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ components:
enabled: true
image:
repository: mintproject/graphql-engine
tag: 0fc7ce2a5098d2e86f1280f6fa70acfc816a531d
tag: 305c0dbeba1878eafe348f21fc300fbfc017d9dc
pullPolicy: IfNotPresent
resources: {}
environment:
Expand Down Expand Up @@ -293,7 +293,7 @@ components:
wings_storage: ""
wings_dot_path: ""
wings_ont_url: ""
#tapis properties
# tapis properties
username: ""
basePath: ""

Expand Down
Loading