435cf92817
Users can assign a custom domain to their app with automatic SSL via cert-manager. Includes DNS verification flow (CNAME check), Persian instructions, admin-configurable pricing via PlatformSetting, and integration into the deploy wizard cost calculation. Co-authored-by: Cursor <cursoragent@cursor.com>
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
{{- $name := include "cloudhost-app.name" . -}}
|
|
{{- $ns := include "cloudhost-app.namespace" . -}}
|
|
{{- $host := printf "%s.%s" (default $name .Values.ingress.subdomain) .Values.ingress.domain -}}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ $name }}
|
|
namespace: {{ $ns }}
|
|
labels:
|
|
{{- include "cloudhost-app.labels" . | nindent 4 }}
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer | quote }}
|
|
spec:
|
|
ingressClassName: nginx
|
|
rules:
|
|
- host: {{ $host }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $name }}
|
|
port:
|
|
number: 80
|
|
{{- if .Values.ingress.customDomain }}
|
|
- host: {{ .Values.ingress.customDomain }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $name }}
|
|
port:
|
|
number: 80
|
|
{{- end }}
|
|
tls:
|
|
- hosts:
|
|
- {{ $host }}
|
|
{{- if .Values.ingress.customDomain }}
|
|
- {{ .Values.ingress.customDomain }}
|
|
{{- end }}
|
|
secretName: {{ $name }}-tls
|
|
{{- end }}
|