fix: incorrect formatting (#2917)

This commit is contained in:
DarkSky
2023-06-29 16:25:43 +08:00
committed by GitHub
parent 5ad2908760
commit 8a2dac9718
4 changed files with 47 additions and 51 deletions

View File

@@ -1,45 +1,38 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: { { include "affine-cloud.fullname" . } } name: "{{ include "affine-cloud.fullname" . }}"
labels: { { - include "affine-cloud.labels" . | nindent 4 } } labels:
{{- include "affine-cloud.labels" . | nindent 4 }}
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: { { - include "affine-cloud.selectorLabels" . | nindent 6 } } matchLabels:
{{- include "affine-cloud.selectorLabels" . | nindent 6 }}
strategy: strategy:
type: RollingUpdate type: RollingUpdate
rollingUpdate: rollingUpdate:
maxUnavailable: 2 maxUnavailable: 2
template: template:
metadata: metadata:
labels: { { - include "affine-cloud.selectorLabels" . | nindent 8 } } labels:
{{- include "affine-cloud.selectorLabels" . | nindent 8 }}
spec: spec:
restartPolicy: Always restartPolicy: Always
containers: containers:
- name: affine-cloud - name: affine-cloud
image: 'ghcr.io/toeverything/cloud-self-hosted:{{ .Values.affineCloud.tag | default .Chart.AppVersion }}' image: "ghcr.io/toeverything/cloud-self-hosted:{{ .Values.affineCloud.tag | default .Chart.AppVersion }}"
env: env:
- name: PG_USER - name: PG_USER
value: { { .Values.postgresql.auth.username } } value: "{{ .Values.postgresql.auth.username }}"
- name: PG_PASS - name: PG_PASS
value: { { .Values.postgresql.auth.password } } value: "{{ .Values.postgresql.auth.password }}"
- name: PG_DATABASE - name: PG_DATABASE
value: { { .Values.postgresql.auth.database } } value: "{{ .Values.postgresql.auth.database }}"
- name: PG_HOST - name: PG_HOST
value: value: "{{ .Values.postgresql.fullnameOverride | default (printf "%s-postgresql" .Release.Name) }}"
{
{
.Values.postgresql.fullnameOverride | default (printf "%s-postgresql" .Release.Name),
},
}
- name: DATABASE_URL - name: DATABASE_URL
value: value: "{{ .Values.affineCloud.databaseUrl | default "postgresql://$(PG_USER):$(PG_PASS)@$(PG_HOST)/$(PG_DATABASE)" }}"
{
{
.Values.affineCloud.databaseUrl | default "postgresql://$(PG_USER):$(PG_PASS)@$(PG_HOST)/$(PG_DATABASE)",
},
}
envFrom: envFrom:
- secretRef: - secretRef:
name: affine-cloud-secret name: affine-cloud-secret
@@ -54,5 +47,5 @@ spec:
periodSeconds: 10 periodSeconds: 10
resources: resources:
limits: limits:
cpu: '{{ .Values.affineCloud.resources.cpu }}' cpu: "{{ .Values.affineCloud.resources.cpu }}"
memory: '{{ .Values.affineCloud.resources.memory }}' memory: "{{ .Values.affineCloud.resources.memory }}"

View File

@@ -4,6 +4,6 @@ metadata:
name: affine-cloud-secret name: affine-cloud-secret
type: Opaque type: Opaque
data: data:
SIGN_KEY: '{{ .Values.affineCloud.signKey }}' SIGN_KEY: "{{ .Values.affineCloud.signKey }}"
MAIL_ACCOUNT: '{{ .Values.affineCloud.mail.account }}' MAIL_ACCOUNT: "{{ .Values.affineCloud.mail.account }}"
MAIL_PASSWORD: '{{ .Values.affineCloud.mail.password }}' MAIL_PASSWORD: "{{ .Values.affineCloud.mail.password }}"

View File

@@ -1,13 +1,15 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: { { include "affine-cloud.fullname" . } } name: "{{ include "affine-cloud.fullname" . }}"
labels: { { - include "affine-cloud.labels" . | nindent 4 } } labels:
{{- include "affine-cloud.labels" . | nindent 4 }}
spec: spec:
type: '{{ .Values.affineCloud.service.type }}' type: "{{ .Values.affineCloud.service.type }}"
ports: ports:
- name: http - name: http
protocol: TCP protocol: TCP
port: { { .Values.affineCloud.service.port } } port: {{ .Values.affineCloud.service.port }}
targetPort: 3000 targetPort: 3000
selector: { { - include "affine-cloud.selectorLabels" . | nindent 4 } } selector:
{{- include "affine-cloud.selectorLabels" . | nindent 4 }}

View File

@@ -9,3 +9,4 @@ out
dist dist
.yarn .yarn
tests/affine-legacy/0.7.0-canary.18/static tests/affine-legacy/0.7.0-canary.18/static
.github/helm