mirror of
https://gitlab.dit.htwk-leipzig.de/fsr-im/k8s/services/overleaf-cep.git
synced 2025-08-30 08:33:50 +02:00
Initial commit
This commit is contained in:
49
overleaf-helm-chart/templates/deployment-mongo.yaml
Normal file
49
overleaf-helm-chart/templates/deployment-mongo.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongo
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1001
|
||||
fsGroup: 0
|
||||
containers:
|
||||
- name: mongo
|
||||
image: {{ .Values.mongo.image }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.mongo.port }}
|
||||
env:
|
||||
- name: MONGODB_REPLICA_SET_MODE
|
||||
value: primary
|
||||
- name: MONGODB_REPLICA_SET_NAME
|
||||
value: {{ .Values.mongo.replSet }}
|
||||
- name: MONGODB_ROOT_USER
|
||||
value: {{ .Values.mongo.rootUser | quote }}
|
||||
- name: MONGODB_ROOT_PASSWORD
|
||||
value: {{ .Values.mongo.rootPassword | quote }}
|
||||
- name: MONGODB_DATABASE
|
||||
value: {{ .Values.mongo.initDb | quote }}
|
||||
- name: MONGODB_REPLICA_SET_KEY
|
||||
value: {{ .Values.mongo.replSetKey | quote }}
|
||||
volumeMounts:
|
||||
- name: mongo-data
|
||||
mountPath: {{ .Values.mongo.volumeMounts.db }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.resources.mongo.requests.cpu }}
|
||||
memory: {{ .Values.resources.mongo.requests.memory }}
|
||||
limits:
|
||||
cpu: {{ .Values.resources.mongo.limits.cpu }}
|
||||
memory: {{ .Values.resources.mongo.limits.memory }}
|
||||
volumes:
|
||||
- name: mongo-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.mongoData }}
|
33
overleaf-helm-chart/templates/deployment-redis.yaml
Normal file
33
overleaf-helm-chart/templates/deployment-redis.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: {{ .Values.redis.image }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.redis.port }}
|
||||
volumeMounts:
|
||||
- name: redis-data
|
||||
mountPath: {{ .Values.redis.volumeMount }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.resources.redis.requests.cpu }}
|
||||
memory: {{ .Values.resources.redis.requests.memory }}
|
||||
limits:
|
||||
cpu: {{ .Values.resources.redis.limits.cpu }}
|
||||
memory: {{ .Values.resources.redis.limits.memory }}
|
||||
volumes:
|
||||
- name: redis-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.redisData }}
|
62
overleaf-helm-chart/templates/deployment-sharelatex.yaml
Normal file
62
overleaf-helm-chart/templates/deployment-sharelatex.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: overleaf
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: overleaf
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: overleaf
|
||||
spec:
|
||||
containers:
|
||||
- name: overleaf
|
||||
image: {{ .Values.overleaf.image }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.overleaf.port }}
|
||||
env:
|
||||
- name: OVERLEAF_APP_NAME
|
||||
value: {{ .Values.overleaf.appName | quote }}
|
||||
- name: OVERLEAF_SITE_LANGUAGE
|
||||
value: {{ .Values.overleaf.siteLanguage | quote }}
|
||||
- name: OVERLEAF_MONGO_URL
|
||||
value: 'mongodb://{{ .Values.mongo.rootUser }}:{{ .Values.mongo.rootPassword }}@mongo:27017/{{ .Values.mongo.initDb }}?replicaSet={{ .Values.mongo.replSet }}'
|
||||
- name: OVERLEAF_REDIS_HOST
|
||||
value: redis
|
||||
- name: REDIS_HOST
|
||||
value: redis
|
||||
- name: ENABLED_LINKED_FILE_TYPES
|
||||
value: project_file,project_output_file
|
||||
- name: ENABLE_CONVERSIONS
|
||||
value: {{ .Values.overleaf.enableConversions | quote }}
|
||||
- name: EMAIL_CONFIRMATION_DISABLED
|
||||
value: {{ .Values.overleaf.emailConfirmationDisabled | quote }}
|
||||
- name: TEXMFVAR
|
||||
value: {{ .Values.overleaf.texmfvar | quote }}
|
||||
- name: OVERLEAF_SITE_URL
|
||||
value: {{ .Values.overleaf.siteUrl | quote }}
|
||||
- name: OVERLEAF_NAV_TITLE
|
||||
value: {{ .Values.overleaf.navTitle | quote }}
|
||||
- name: OVERLEAF_ADMIN_EMAIL
|
||||
value: {{ .Values.overleaf.adminEmail | quote }}
|
||||
- name: OVERLEAF_LEFT_FOOTER
|
||||
value: {{ .Values.overleaf.leftFooter | quote }}
|
||||
- name: OVERLEAF_RIGHT_FOOTER
|
||||
value: {{ .Values.overleaf.rightFooter | quote }}
|
||||
volumeMounts:
|
||||
- name: overleaf-data
|
||||
mountPath: {{ .Values.overleaf.volumeMount }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.resources.overleaf.requests.cpu }}
|
||||
memory: {{ .Values.resources.overleaf.requests.memory }}
|
||||
limits:
|
||||
cpu: {{ .Values.resources.overleaf.limits.cpu }}
|
||||
memory: {{ .Values.resources.overleaf.limits.memory }}
|
||||
volumes:
|
||||
- name: overleaf-data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.overleafData }}
|
27
overleaf-helm-chart/templates/ingress.yaml
Normal file
27
overleaf-helm-chart/templates/ingress.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: overleaf-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "traefik"
|
||||
cert-manager.io/cluster-issuer: "{{ .Values.ingress.certManagerIssuer }}"
|
||||
# Traefik spezifisch: Enable HTTPS redirect (optional)
|
||||
traefik.ingress.kubernetes.io/redirect-entry-point: websecure
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ingress.host | quote }}
|
||||
secretName: {{ .Values.ingress.tlsSecretName }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: overleaf
|
||||
port:
|
||||
number: 80
|
||||
{{- end }}
|
39
overleaf-helm-chart/templates/pvc.yaml
Normal file
39
overleaf-helm-chart/templates/pvc.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
{{- if .Values.persistence.enabled }}
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Values.persistence.overleafData }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: {{ .Values.persistence.storageClassName }}
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Values.persistence.redisData }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: {{ .Values.persistence.storageClassName }}
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Values.persistence.mongoData }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: {{ .Values.persistence.storageClassName }}
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
{{- end }}
|
10
overleaf-helm-chart/templates/service-mongo.yaml
Normal file
10
overleaf-helm-chart/templates/service-mongo.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.mongo.port }}
|
||||
targetPort: {{ .Values.mongo.port }}
|
||||
selector:
|
||||
app: mongo
|
10
overleaf-helm-chart/templates/service-redis.yaml
Normal file
10
overleaf-helm-chart/templates/service-redis.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ .Values.redis.port }}
|
||||
targetPort: {{ .Values.redis.port }}
|
||||
selector:
|
||||
app: redis
|
11
overleaf-helm-chart/templates/service-sharelatex.yaml
Normal file
11
overleaf-helm-chart/templates/service-sharelatex.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: overleaf
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: {{ .Values.overleaf.port }}
|
||||
selector:
|
||||
app: overleaf
|
Reference in New Issue
Block a user