Try to fix tasko

This commit is contained in:
dvirlabs 2025-12-11 01:59:21 +02:00
parent 475ca84c4f
commit d807222bd6
3 changed files with 14 additions and 4 deletions

View File

@ -31,7 +31,7 @@ spec:
initContainers:
- name: wait-for-postgres
image: busybox:1.35
command: ['sh', '-c', 'until nc -z {{ include "tasko.fullname" . }}-postgresql 5432; do echo waiting for postgres; sleep 2; done;']
command: ['sh', '-c', 'until nc -z {{ include "tasko.fullname" . }}-db-headless {{ .Values.postgres.port | default 5432 }}; do echo waiting for postgres; sleep 2; done;']
containers:
- name: backend
securityContext:

View File

@ -6,4 +6,8 @@ metadata:
{{- include "tasko.labels" . | nindent 4 }}
type: Opaque
stringData:
{{- if .Values.postgres }}
database-url: "postgresql://{{ .Values.postgres.user }}:{{ .Values.postgres.password }}@{{ include "tasko.fullname" . }}-db-headless:{{ .Values.postgres.port }}/{{ .Values.postgres.database }}"
{{- else if .Values.postgresql }}
database-url: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ include "tasko.fullname" . }}-postgresql:5432/{{ .Values.postgresql.auth.database }}"
{{- end }}

View File

@ -1,8 +1,5 @@
global:
namespace: my-apps
imagePullSecrets: []
imagePullSecrets: []
# Backend configuration
backend:
@ -93,8 +90,13 @@ postgres:
password: tasko_password
database: tasko_db
port: 5432
service:
type: ClusterIP
port: 5432
targetPort: 5432
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 8Gi
storageClass: ""
resources:
@ -104,3 +106,7 @@ postgres:
limits:
cpu: 500m
memory: 512Mi
# Use default ServiceAccount (has harbor-creds imagePullSecret)
serviceAccount:
create: false