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>
74 lines
2.3 KiB
YAML
74 lines
2.3 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "cloudhost-platform.fullname" . }}
|
|
namespace: {{ include "cloudhost-platform.namespace" . }}
|
|
labels:
|
|
{{- include "cloudhost-platform.labels" . | nindent 4 }}
|
|
annotations:
|
|
{{- if .Values.ingress.tls.enabled }}
|
|
cert-manager.io/cluster-issuer: {{ .Values.ingress.tls.clusterIssuer | quote }}
|
|
{{- end }}
|
|
{{- if and .Values.ingress.singleHost.enabled .Values.ingress.singleHost.apiPath }}
|
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
{{- end }}
|
|
{{- with .Values.ingress.annotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
{{- if .Values.ingress.tls.enabled }}
|
|
tls:
|
|
- hosts:
|
|
{{- if .Values.ingress.singleHost.enabled }}
|
|
- {{ .Values.ingress.singleHost.host | quote }}
|
|
{{- else }}
|
|
- {{ .Values.ingress.frontend.host | quote }}
|
|
- {{ .Values.ingress.api.host | quote }}
|
|
{{- end }}
|
|
secretName: {{ include "cloudhost-platform.tlsSecretName" . }}
|
|
{{- end }}
|
|
rules:
|
|
{{- if .Values.ingress.singleHost.enabled }}
|
|
- host: {{ .Values.ingress.singleHost.host | quote }}
|
|
http:
|
|
paths:
|
|
- path: {{ .Values.ingress.singleHost.apiPath }}
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "cloudhost-platform.backend.fullname" . }}
|
|
port:
|
|
number: 4000
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "cloudhost-platform.frontend.fullname" . }}
|
|
port:
|
|
number: 3000
|
|
{{- else }}
|
|
- host: {{ .Values.ingress.frontend.host | quote }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "cloudhost-platform.frontend.fullname" . }}
|
|
port:
|
|
number: 3000
|
|
- host: {{ .Values.ingress.api.host | quote }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "cloudhost-platform.backend.fullname" . }}
|
|
port:
|
|
number: 4000
|
|
{{- end }}
|
|
{{- end }}
|