From 91d76c35a4dc9c5b745d99da0a2203968f2631bb Mon Sep 17 00:00:00 2001 From: Janne Mareike Koschinski <janne@kuschku.de> Date: Sun, 3 Jul 2022 12:57:54 +0200 Subject: [PATCH] feat: Update seafile chart --- seafile/Chart.yaml | 4 ++-- seafile/templates/deployment.yaml | 13 +++++-------- seafile/templates/ingress.yaml | 7 ++++--- seafile/templates/secret.yaml | 21 ++++++++++++++++++--- seafile/values.yaml | 1 + 5 files changed, 30 insertions(+), 16 deletions(-) diff --git a/seafile/Chart.yaml b/seafile/Chart.yaml index f70707a..b4df6a5 100644 --- a/seafile/Chart.yaml +++ b/seafile/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: seafile description: Helm Chart for seafile type: application -version: 0.1.0 -appVersion: "66c35794" +version: 0.1.5 +appVersion: "4d64355e" diff --git a/seafile/templates/deployment.yaml b/seafile/templates/deployment.yaml index 3673d8a..c716847 100644 --- a/seafile/templates/deployment.yaml +++ b/seafile/templates/deployment.yaml @@ -44,7 +44,7 @@ spec: - "/bin/sh" - "-c" args: - - "rsync -avH /source/seahub/media/avatars/ /media" + - "cp -r /source/seahub/media/avatars/* /media" volumeMounts: - mountPath: "/media" name: seahub @@ -52,7 +52,7 @@ spec: - name: seafile securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:seafile-{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "{{ .Values.image.repository }}:server-{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: seafhttp @@ -86,16 +86,13 @@ spec: containerPort: 8000 protocol: TCP startupProbe: - httpGet: - path: / + tcpSocket: port: seahub livenessProbe: - httpGet: - path: / + tcpSocket: port: seahub readinessProbe: - httpGet: - path: / + tcpSocket: port: seahub resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/seafile/templates/ingress.yaml b/seafile/templates/ingress.yaml index 872a8d4..9ca6495 100644 --- a/seafile/templates/ingress.yaml +++ b/seafile/templates/ingress.yaml @@ -5,20 +5,21 @@ metadata: labels: {{- include "seafile-helm.labels" . | nindent 4 }} annotations: - {{- .Values.ingress.annotations | toYaml | nindent 4 }} + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: /$1 spec: rules: - host: "{{ .Values.ingress.host }}" http: paths: - - path: "{{ .Values.ingress.seahub_path }}" + - path: "{{ .Values.ingress.seahub_path }}(.*)" backend: service: name: {{ include "seafile-helm.fullname" . }} port: name: seahub pathType: Prefix - - path: "{{ .Values.ingress.seafhttp_path }}" + - path: "{{ .Values.ingress.seafhttp_path }}/(.*)" backend: service: name: {{ include "seafile-helm.fullname" . }} diff --git a/seafile/templates/secret.yaml b/seafile/templates/secret.yaml index a57387f..286c339 100644 --- a/seafile/templates/secret.yaml +++ b/seafile/templates/secret.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "seafile-helm.labels" . | nindent 4 }} stringData: - ccnet.ini: |- + ccnet.conf: |- [Database] ENGINE = {{ .Values.ccnet.database.backend }} HOST = {{ .Values.ccnet.database.hostname }} @@ -16,7 +16,7 @@ stringData: CREATE_TABLES = {{ .Values.ccnet.create_tables }} [General] - SERVICE_URL = {{ .Values.ingress.external_schema }}://{{ .Values.ingress.host }}{{ .Values.ingress.path }} + SERVICE_URL = {{ .Values.ingress.external_schema }}://{{ .Values.ingress.host }}{{ .Values.ingress.seahub_path }} [Client] PORT = 13419 @@ -27,7 +27,7 @@ stringData: daemon = True workers = 5 - bind = "127.0.0.1:8000" + bind = "0.0.0.0:8000" pids_dir = '/tmp' pidfile = os.path.join(pids_dir, 'seahub.pid') @@ -47,10 +47,25 @@ stringData: db_name = {{ .Values.seafile.database.name }} create_tables = {{ .Values.seafile.create_tables }} seahub_settings.py: |- + SERVICE_URL = '{{ .Values.ingress.external_schema }}://{{ .Values.ingress.host }}{{ .Values.ingress.seahub_path }}' FILE_SERVER_ROOT = '{{ .Values.ingress.external_schema }}://{{ .Values.ingress.host }}{{ .Values.ingress.seafhttp_path }}' SECRET_KEY = "{{ .Values.cookie_secret }}" + LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + }, + }, + 'root': { + 'handlers': ['console'], + 'level': '{{ .Values.seahub.logLevel }}', + }, + } + DATABASES = { 'default': { 'ENGINE': '{{ .Values.seahub.database.backend }}', diff --git a/seafile/values.yaml b/seafile/values.yaml index 4721cc5..9720bdd 100644 --- a/seafile/values.yaml +++ b/seafile/values.yaml @@ -40,6 +40,7 @@ seafile: emptyDir: {} seahub: + logLevel: "INFO" database: backend: "django.db.backends.postgresql" hostname: "example.tld" -- GitLab