bf9e827f85
Deploy backend, frontend, PostgreSQL, and Redis on Kubernetes with optional Ingress/TLS, SQL migration hooks, and public registry exposure at repo.3fase.ir. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
1.1 KiB
YAML
26 lines
1.1 KiB
YAML
{{- $existing := lookup "v1" "Secret" (include "cloudhost-platform.namespace" .) (include "cloudhost-platform.secretName" .) }}
|
|
{{- $pgPass := .Values.postgres.password }}
|
|
{{- if not $pgPass }}
|
|
{{- if $existing }}{{- $pgPass = index $existing.data "postgres-password" | b64dec }}{{- else }}{{- $pgPass = randAlphaNum 24 }}{{- end }}
|
|
{{- end }}
|
|
{{- $jwt := .Values.secrets.jwtSecret }}
|
|
{{- if not $jwt }}
|
|
{{- if $existing }}{{- $jwt = index $existing.data "jwt-secret" | b64dec }}{{- else }}{{- $jwt = randAlphaNum 32 }}{{- end }}
|
|
{{- end }}
|
|
{{- $jwtRefresh := .Values.secrets.jwtRefreshSecret }}
|
|
{{- if not $jwtRefresh }}
|
|
{{- if $existing }}{{- $jwtRefresh = index $existing.data "jwt-refresh-secret" | b64dec }}{{- else }}{{- $jwtRefresh = randAlphaNum 32 }}{{- end }}
|
|
{{- end }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ include "cloudhost-platform.secretName" . }}
|
|
namespace: {{ include "cloudhost-platform.namespace" . }}
|
|
labels:
|
|
{{- include "cloudhost-platform.labels" . | nindent 4 }}
|
|
type: Opaque
|
|
stringData:
|
|
postgres-password: {{ $pgPass | quote }}
|
|
jwt-secret: {{ $jwt | quote }}
|
|
jwt-refresh-secret: {{ $jwtRefresh | quote }}
|