mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
close CLOUD-233 #### PR Dependency Tree * **PR #12950** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for configuring multiple server hosts across backend and frontend settings. * Enhanced deployment and Helm chart configuration to allow specifying multiple ingress hosts. * Updated admin and configuration interfaces to display and manage multiple server hosts. * **Improvements** * Improved URL generation, OAuth, and worker service logic to dynamically handle requests from multiple hosts. * Enhanced captcha verification to support multiple allowed hostnames. * Updated frontend logic for platform-specific server base URLs and allowed origins, including Apple app domains. * Expanded test coverage for multi-host scenarios. * **Bug Fixes** * Corrected backend logic to consistently use dynamic base URLs and origins based on request host context. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
{{- if .Values.global.ingress.enabled -}}
|
|
{{- $fullName := include "affine.fullname" . -}}
|
|
{{- if and .Values.global.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
|
{{- if not (hasKey .Values.global.ingress.annotations "kubernetes.io/ingress.class") }}
|
|
{{- $_ := set .Values.global.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
apiVersion: networking.k8s.io/v1
|
|
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
{{- else -}}
|
|
apiVersion: extensions/v1beta1
|
|
{{- end }}
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ $fullName }}
|
|
labels:
|
|
{{- include "affine.labels" . | nindent 4 }}
|
|
{{- with .Values.global.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if and .Values.global.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
|
ingressClassName: {{ .Values.global.ingress.className }}
|
|
{{- end }}
|
|
{{- if .Values.global.ingress.tls }}
|
|
tls:
|
|
{{- range .Values.global.ingress.tls }}
|
|
- hosts:
|
|
{{- range .hosts }}
|
|
- {{ . | quote }}
|
|
{{- end }}
|
|
secretName: {{ .secretName }}
|
|
{{- end }}
|
|
{{- end }}
|
|
rules:
|
|
{{- range .Values.global.ingress.hosts }}
|
|
- host: {{ . | quote }}
|
|
http:
|
|
paths:
|
|
- path: /socket.io
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: affine-sync
|
|
port:
|
|
number: {{ $.Values.sync.service.port }}
|
|
- path: /graphql
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: affine-graphql
|
|
port:
|
|
number: {{ $.Values.graphql.service.port }}
|
|
- path: /api
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: affine-graphql
|
|
port:
|
|
number: {{ $.Values.graphql.service.port }}
|
|
- path: /workspace
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: affine-renderer
|
|
port:
|
|
number: {{ $.Values.renderer.service.port }}
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: affine-web
|
|
port:
|
|
number: {{ $.Values.web.service.port }}
|
|
{{- end }}
|
|
{{- end }}
|