Skip to content

Commit

Permalink
fixed the issue with tjdb table creation
Browse files Browse the repository at this point in the history
  • Loading branch information
adishM98 committed Apr 28, 2023
1 parent 5ce6461 commit 364d93d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 23 deletions.
34 changes: 19 additions & 15 deletions charts/tooljet/templates/deployment-pgrst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,44 @@ spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: tooljet-postgrest
app.kubernetes.io/instance: tooljet-postgrest
component: tooljet-postgrest # updated label here
template:
metadata:
labels:
component: tooljet-postgrest # added label here
app.kubernetes.io/name: tooljet-postgrest
app.kubernetes.io/instance: tooljet-postgrest
spec:
containers:
- name: {{ .Chart.Name }}
ports:
- containerPort: 3000
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PGRST_DB_URI
value: {{ .Values.env.db_uri }}

- name: PGRST_HOST
value: "tooljet-postgrest-service.default.svc.cluster.local"

- name: PGRST_DB_ANON_ROLE
value: postgres

- name: PGRST_JWT_SECRET
value: {{ .Values.env.jwt_secret }}

- name: PGRST_LOG_LEVEL
value: "info"

ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: 3000
# livenessProbe:
# httpGet:
# path: /
# port: http
# readinessProbe:
# httpGet:
# path: /
# port: 3000
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand All @@ -57,4 +61,4 @@ spec:
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 7 additions & 1 deletion charts/tooljet/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ spec:
value: {{ .Values.postgresql.auth.username }}

- name: PGRST_HOST
value: {{ .Values.env.PGRST_HOST }}
value: "tooljet-postgrest-service"

- name: PGRST_JWT_SECRET
value: {{ .Values.env.jwt_secret }}

- name: PGRST_DB_URI
value: {{ .Values.env.db_uri }}

envFrom:
- secretRef:
Expand Down
18 changes: 11 additions & 7 deletions charts/tooljet/templates/service-pgrst.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: tooljet-postgrest
name: tooljet-postgrest-service
labels:
name: tooljet-postgrest
name: tooljet-postgrest
annotations:
meta.helm.sh/release-name: {{ .Release.Name }}
meta.helm.sh/release-namespace: {{ .Release.Namespace }}
spec:
type: {{ .Values.service.type }}
selector:
component: tooljet-postgrest
type: NodePort
ports:
- port: {{ .Values.service.port }}
- name: http
port: 80
targetPort: 3000
protocol: TCP
name: http
selector:
app: tooljet-postgrest
nodePort: 30778

0 comments on commit 364d93d

Please sign in to comment.