mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
chore: make DOC_SERVICE_ENDPOINT dynamic computed (#10029)
This commit is contained in:
@@ -56,8 +56,8 @@ Create the name of the service account to use
|
|||||||
*/}}
|
*/}}
|
||||||
{{- define "doc.serviceAccountName" -}}
|
{{- define "doc.serviceAccountName" -}}
|
||||||
{{- if .Values.serviceAccount.create }}
|
{{- if .Values.serviceAccount.create }}
|
||||||
{{- default (include "doc.fullname" .) .Values.serviceAccount.name }}
|
{{- default (include "doc.fullname" .) .Values.global.docService.name }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- default "default" .Values.serviceAccount.name }}
|
{{- default "default" .Values.global.docService.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
type: {{ .Values.service.type }}
|
type: {{ .Values.service.type }}
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.service.port }}
|
- port: {{ .Values.global.docService.port }}
|
||||||
targetPort: http
|
targetPort: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
|
|||||||
@@ -11,5 +11,5 @@ spec:
|
|||||||
- name: wget
|
- name: wget
|
||||||
image: busybox
|
image: busybox
|
||||||
command: ['wget']
|
command: ['wget']
|
||||||
args: ['{{ include "doc.fullname" . }}:{{ .Values.service.port }}']
|
args: ['{{ include "doc.fullname" . }}:{{ .Values.global.docService.port }}']
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
|
|||||||
1
.github/helm/affine/charts/doc/values.yaml
vendored
1
.github/helm/affine/charts/doc/values.yaml
vendored
@@ -18,7 +18,6 @@ app:
|
|||||||
serviceAccount:
|
serviceAccount:
|
||||||
create: true
|
create: true
|
||||||
annotations: {}
|
annotations: {}
|
||||||
name: 'affine-doc'
|
|
||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ spec:
|
|||||||
- name: DOC_MERGE_INTERVAL
|
- name: DOC_MERGE_INTERVAL
|
||||||
value: "{{ .Values.app.doc.mergeInterval }}"
|
value: "{{ .Values.app.doc.mergeInterval }}"
|
||||||
- name: DOC_SERVICE_ENDPOINT
|
- name: DOC_SERVICE_ENDPOINT
|
||||||
value: "{{ .Values.global.docService.endpoint }}"
|
value: "http://{{ .Values.global.docService.name }}:{{ .Values.global.docService.port }}"
|
||||||
{{ if .Values.app.experimental.enableJwstCodec }}
|
{{ if .Values.app.experimental.enableJwstCodec }}
|
||||||
- name: DOC_MERGE_USE_JWST_CODEC
|
- name: DOC_MERGE_USE_JWST_CODEC
|
||||||
value: "true"
|
value: "true"
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ spec:
|
|||||||
key: secretAccessKey
|
key: secretAccessKey
|
||||||
{{ end }}
|
{{ end }}
|
||||||
- name: DOC_SERVICE_ENDPOINT
|
- name: DOC_SERVICE_ENDPOINT
|
||||||
value: "{{ .Values.global.docService.endpoint }}"
|
value: "http://{{ .Values.global.docService.name }}:{{ .Values.global.docService.port }}"
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.service.port }}
|
containerPort: {{ .Values.service.port }}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ spec:
|
|||||||
- name: AFFINE_SERVER_HOST
|
- name: AFFINE_SERVER_HOST
|
||||||
value: "{{ .Values.app.host }}"
|
value: "{{ .Values.app.host }}"
|
||||||
- name: DOC_SERVICE_ENDPOINT
|
- name: DOC_SERVICE_ENDPOINT
|
||||||
value: "{{ .Values.global.docService.endpoint }}"
|
value: "http://{{ .Values.global.docService.name }}:{{ .Values.global.docService.port }}"
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: {{ .Values.service.port }}
|
containerPort: {{ .Values.service.port }}
|
||||||
|
|||||||
4
.github/helm/affine/values.yaml
vendored
4
.github/helm/affine/values.yaml
vendored
@@ -40,7 +40,8 @@ global:
|
|||||||
gke:
|
gke:
|
||||||
enabled: true
|
enabled: true
|
||||||
docService:
|
docService:
|
||||||
endpoint: 'http://affine-doc:3020'
|
name: 'affine-doc'
|
||||||
|
port: 3020
|
||||||
|
|
||||||
graphql:
|
graphql:
|
||||||
service:
|
service:
|
||||||
@@ -66,7 +67,6 @@ renderer:
|
|||||||
doc:
|
doc:
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 3020
|
|
||||||
annotations:
|
annotations:
|
||||||
cloud.google.com/backend-config: '{"default": "affine-api-backendconfig"}'
|
cloud.google.com/backend-config: '{"default": "affine-api-backendconfig"}'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user