'add-seafile'

This commit is contained in:
2025-05-13 17:51:36 +08:00
parent 14f0a356d6
commit 76a8e0e10d
72 changed files with 6089 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{{- define "onlyoffice.configmap" }}
{{- if .Values.onlyoffice.enabled -}}
---
apiVersion: v1
data:
postgresql.conf: huge_pages = off
kind: ConfigMap
metadata:
name: onlyoffice-postgresql
{{- end }}
{{ end -}}

View File

@@ -0,0 +1,46 @@
{{- define "onlyoffice.deployment" -}}
{{- if .Values.onlyoffice.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: onlyoffice
name: onlyoffice
spec:
selector:
matchLabels:
app: onlyoffice
replicas: 1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: onlyoffice
spec:
containers:
- name: onlyoffice
image: {{ .Values.onlyoffice.image }}
imagePullPolicy: IfNotPresent
env:
- name: JWT_SECRET
value: {{ .Values.onlyoffice.token }}
- name: JWT_ENABLED
value: 'true'
- name: USE_UNAUTHORIZED_STORAGE
value: 'true'
volumeMounts:
- mountPath: /etc/postgresql/14/main/conf.d/postgresql.conf
name: postgresql-conf
subPath: postgresql.conf
volumes:
- configMap:
defaultMode: 420
name: onlyoffice-postgresql
name: postgresql-conf
{{- end }}
{{ end -}}

View File

@@ -0,0 +1,17 @@
{{- define "onlyoffice.service" -}}
{{- if .Values.onlyoffice.enabled }}
apiVersion: v1
kind: Service
metadata:
name: onlyoffice
spec:
ports:
- name: onlyoffice
port: 80
protocol: TCP
targetPort: 80
selector:
app: onlyoffice
type: ClusterIP
{{- end }}
{{ end -}}