mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
ci: add prettier format check (#2908)
This commit is contained in:
@@ -1,51 +1,58 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ include "affine-cloud.fullname" . }}"
|
||||
labels:
|
||||
{{- include "affine-cloud.labels" . | nindent 4 }}
|
||||
name: { { include "affine-cloud.fullname" . } }
|
||||
labels: { { - include "affine-cloud.labels" . | nindent 4 } }
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "affine-cloud.selectorLabels" . | nindent 6 }}
|
||||
matchLabels: { { - include "affine-cloud.selectorLabels" . | nindent 6 } }
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "affine-cloud.selectorLabels" . | nindent 8 }}
|
||||
labels: { { - include "affine-cloud.selectorLabels" . | nindent 8 } }
|
||||
spec:
|
||||
restartPolicy: Always
|
||||
containers:
|
||||
- name: affine-cloud
|
||||
image: "ghcr.io/toeverything/cloud-self-hosted:{{ .Values.affineCloud.tag | default .Chart.AppVersion }}"
|
||||
env:
|
||||
- name: PG_USER
|
||||
value: "{{ .Values.postgresql.auth.username }}"
|
||||
- name: PG_PASS
|
||||
value: "{{ .Values.postgresql.auth.password }}"
|
||||
- name: PG_DATABASE
|
||||
value: "{{ .Values.postgresql.auth.database }}"
|
||||
- name: PG_HOST
|
||||
value: "{{ .Values.postgresql.fullnameOverride | default (printf "%s-postgresql" .Release.Name) }}"
|
||||
- name: DATABASE_URL
|
||||
value: "{{ .Values.affineCloud.databaseUrl | default "postgresql://$(PG_USER):$(PG_PASS)@$(PG_HOST)/$(PG_DATABASE)" }}"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: affine-cloud-secret
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/healthz
|
||||
port: 3000
|
||||
failureThreshold: 1
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
limits:
|
||||
cpu: "{{ .Values.affineCloud.resources.cpu }}"
|
||||
memory: "{{ .Values.affineCloud.resources.memory }}"
|
||||
- name: affine-cloud
|
||||
image: 'ghcr.io/toeverything/cloud-self-hosted:{{ .Values.affineCloud.tag | default .Chart.AppVersion }}'
|
||||
env:
|
||||
- name: PG_USER
|
||||
value: { { .Values.postgresql.auth.username } }
|
||||
- name: PG_PASS
|
||||
value: { { .Values.postgresql.auth.password } }
|
||||
- name: PG_DATABASE
|
||||
value: { { .Values.postgresql.auth.database } }
|
||||
- name: PG_HOST
|
||||
value:
|
||||
{
|
||||
{
|
||||
.Values.postgresql.fullnameOverride | default (printf "%s-postgresql" .Release.Name),
|
||||
},
|
||||
}
|
||||
- name: DATABASE_URL
|
||||
value:
|
||||
{
|
||||
{
|
||||
.Values.affineCloud.databaseUrl | default "postgresql://$(PG_USER):$(PG_PASS)@$(PG_HOST)/$(PG_DATABASE)",
|
||||
},
|
||||
}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: affine-cloud-secret
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/healthz
|
||||
port: 3000
|
||||
failureThreshold: 1
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
limits:
|
||||
cpu: '{{ .Values.affineCloud.resources.cpu }}'
|
||||
memory: '{{ .Values.affineCloud.resources.memory }}'
|
||||
|
||||
@@ -4,6 +4,6 @@ metadata:
|
||||
name: affine-cloud-secret
|
||||
type: Opaque
|
||||
data:
|
||||
SIGN_KEY: "{{ .Values.affineCloud.signKey }}"
|
||||
MAIL_ACCOUNT: "{{ .Values.affineCloud.mail.account }}"
|
||||
MAIL_PASSWORD: "{{ .Values.affineCloud.mail.password }}"
|
||||
SIGN_KEY: '{{ .Values.affineCloud.signKey }}'
|
||||
MAIL_ACCOUNT: '{{ .Values.affineCloud.mail.account }}'
|
||||
MAIL_PASSWORD: '{{ .Values.affineCloud.mail.password }}'
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ include "affine-cloud.fullname" . }}"
|
||||
labels:
|
||||
{{- include "affine-cloud.labels" . | nindent 4 }}
|
||||
name: { { include "affine-cloud.fullname" . } }
|
||||
labels: { { - include "affine-cloud.labels" . | nindent 4 } }
|
||||
spec:
|
||||
type: "{{ .Values.affineCloud.service.type }}"
|
||||
type: '{{ .Values.affineCloud.service.type }}'
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.affineCloud.service.port }}
|
||||
port: { { .Values.affineCloud.service.port } }
|
||||
targetPort: 3000
|
||||
selector:
|
||||
{{- include "affine-cloud.selectorLabels" . | nindent 4 }}
|
||||
selector: { { - include "affine-cloud.selectorLabels" . | nindent 4 } }
|
||||
|
||||
Reference in New Issue
Block a user