From 96fe3f14571371c83bf830616c6135b3433eef80 Mon Sep 17 00:00:00 2001 From: Alexander Zhilko Date: Thu, 18 Jul 2024 16:27:34 +0300 Subject: [PATCH 1/3] adding iframely support and fixing the quotes --- charts/outline/Chart.yaml | 2 +- charts/outline/README.md | 3 ++ charts/outline/templates/001-deployment.yaml | 41 ++++++++++++-------- charts/outline/values.yaml | 7 ++++ 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/charts/outline/Chart.yaml b/charts/outline/Chart.yaml index 1b81261..32dbfb6 100644 --- a/charts/outline/Chart.yaml +++ b/charts/outline/Chart.yaml @@ -4,7 +4,7 @@ maintainers: url: https://kubito.dev apiVersion: v2 appVersion: 0.78.0-0 -version: 1.0.5 +version: 1.0.6 description: Kubito Outline Wiki Helm Chart home: https://github.com/kubitodev/helm/tree/main/charts/outline icon: https://kubito.dev/images/kubito.svg diff --git a/charts/outline/README.md b/charts/outline/README.md index 97c6b27..eaf573e 100644 --- a/charts/outline/README.md +++ b/charts/outline/README.md @@ -85,6 +85,9 @@ The command removes all the Kubernetes components associated with the chart and | `outline.optional.fileStorageImportMaxSize` | Maximum size limit for importing documents. | `5120000` | | `outline.optional.logLevel` | Sets the level of logging detail (e.g., info, error, debug). | `info` | | `outline.optional.googleAnalyticsId` | Google Analytics ID for website traffic analysis. | `""` | +| `outline.optional.iframely.enabled` | Whether to enable iframely | `false` | +| `outline.optional.iframely.url` | URL of the iframely server | `"http://iframely:8061"` | +| `outline.optional.iframely.apiKey` | api key of the iframely server | `""` | | `outline.optional.sentry.dsn` | Data Source Name for Sentry, used to report errors. | `""` | | `outline.optional.sentry.tunnel` | URL for Sentry tunnel, useful for bypassing ad blockers. | `""` | | `outline.optional.smtp.enabled` | Whether to enable SMTP. | `false` | diff --git a/charts/outline/templates/001-deployment.yaml b/charts/outline/templates/001-deployment.yaml index 298cf5f..6a6d0be 100644 --- a/charts/outline/templates/001-deployment.yaml +++ b/charts/outline/templates/001-deployment.yaml @@ -75,30 +75,30 @@ spec: valueFrom: secretKeyRef: name: "{{ .Values.postgresql.auth.existingSecret }}" - key: password - {{- if .Values.postgresql.auth.host }} + key: "password" + {{- if .Values.postgresql.auth.host }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}_test" - {{- else }} + {{- else }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}_test" - {{- end }} + {{- end }} {{- else }} - {{- if .Values.postgresql.auth.host }} + {{- if .Values.postgresql.auth.host }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}_test" - {{- else }} + {{- else }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}_test" - {{- end }} + {{- end }} {{- end }} {{- else }} {{- if .Values.postgresql.auth.existingSecret }} @@ -107,29 +107,29 @@ spec: secretKeyRef: name: "{{ .Values.postgresql.auth.existingSecret }}" key: password - {{- if .Values.postgresql.auth.host }} + {{- if .Values.postgresql.auth.host }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}_test" - {{- else }} + {{- else }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:$(POSTGRES_PASSWORD)@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}_test" - {{- end }} + {{- end }} {{- else }} - {{- if .Values.postgresql.auth.host }} + {{- if .Values.postgresql.auth.host }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Values.postgresql.auth.host }}:5432/{{ .Values.postgresql.auth.database }}_test" - {{- else }} + {{- else }} - name: DATABASE_URL value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}" - name: DATABASE_URL_TEST value: "postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Release.Name }}-postgresql:5432/{{ .Values.postgresql.auth.database }}_test" - {{- end }} + {{- end }} {{- end }} {{- end }} @@ -174,14 +174,14 @@ spec: - name: AWS_S3_ACL value: "{{ .Values.minio.s3Config.acl }}" - name: FILE_STORAGE_UPLOAD_MAX_SIZE - value: "{{ .Values.minio.s3Config.uploadMaxSize | quote }}" + value: "{{ .Values.minio.s3Config.uploadMaxSize }}" {{- else if eq .Values.outline.fileStorage.type "local" }} - name: FILE_STORAGE value: "{{ .Values.outline.fileStorage.type }}" - name: FILE_STORAGE_LOCAL_ROOT_DIR value: "{{ .Values.outline.fileStorage.localRootDir }}" - name: FILE_STORAGE_UPLOAD_MAX_SIZE - value: "{{ .Values.outline.fileStorage.uploadMaxSize | quote }}" + value: "{{ .Values.outline.fileStorage.uploadMaxSize }}" {{- end }} - name: COLLABORATION_URL @@ -193,7 +193,7 @@ spec: - name: WEB_CONCURRENCY value: "{{ .Values.outline.optional.webConcurrency }}" - name: FILE_STORAGE_IMPORT_MAX_SIZE - value: "{{ .Values.outline.optional.fileStorageImportMaxSize | quote }}" + value: "{{ .Values.outline.optional.fileStorageImportMaxSize}}" - name: LOG_LEVEL value: "{{ .Values.outline.optional.logLevel }}" - name: GOOGLE_ANALYTICS_ID @@ -350,6 +350,15 @@ spec: - name: OIDC_SCOPES value: "{{ .Values.auth.oidc.scopes }}" {{- end }} + {{- if .Values.outline.optional.iframely.enabled }} + - name: IFRAMELY_URL + value: "{{ .Values.outline.optional.iframely.url }}" + {{- if .Values.outline.optional.iframely.apiKey }} + - name: IFRAMELY_API_KEY + value: "{{ .Values.outline.optional.iframely.apiKey }}" + {{- end }} + {{- end }} + {{- if eq .Values.outline.fileStorage.type "local" }} volumeMounts: diff --git a/charts/outline/values.yaml b/charts/outline/values.yaml index bd6856a..d97c980 100644 --- a/charts/outline/values.yaml +++ b/charts/outline/values.yaml @@ -50,6 +50,9 @@ replicaCount: 1 ## @param outline.optional.fileStorageImportMaxSize Maximum size limit for importing documents. ## @param outline.optional.logLevel Sets the level of logging detail (e.g., info, error, debug). ## @param outline.optional.googleAnalyticsId Google Analytics ID for website traffic analysis. +## @param outline.optional.iframely.enabled Whether to enable iframely. +## @param outline.optional.iframely.url URL of the iframely server. +## @param outline.optional.iframely.apiKey api key of the iframely server. ## @param outline.optional.sentry.dsn Data Source Name for Sentry, used to report errors. ## @param outline.optional.sentry.tunnel URL for Sentry tunnel, useful for bypassing ad blockers. ## @param outline.optional.smtp.enabled Whether to enable SMTP. @@ -101,6 +104,10 @@ outline: fileStorageImportMaxSize: "5120000" logLevel: info googleAnalyticsId: "" + iframely: + enabled: false + url: "http://iframely:8061" + apiKey: "" sentry: dsn: "" tunnel: "" From 1a9f45451a2fcb0bb28cad25945cbe3039d00f26 Mon Sep 17 00:00:00 2001 From: Alexander Zhilko Date: Thu, 18 Jul 2024 16:34:14 +0300 Subject: [PATCH 2/3] fixng typo in the StorageClassName --- charts/outline/templates/004-pvc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/outline/templates/004-pvc.yaml b/charts/outline/templates/004-pvc.yaml index 9c0a347..3337691 100644 --- a/charts/outline/templates/004-pvc.yaml +++ b/charts/outline/templates/004-pvc.yaml @@ -7,7 +7,7 @@ metadata: labels: app: {{ .Release.Name }} spec: - storageClassName: {{ .Values.outline.fileStorage.storageClassName }} + storageClassName: {{ .Values.outline.fileStorage.StorageClassName }} accessModes: - ReadWriteOnce resources: From b71f9a9c16e4ebca4b4d9b0d02302530632a19ff Mon Sep 17 00:00:00 2001 From: Alexander Zhilko Date: Thu, 18 Jul 2024 16:35:11 +0300 Subject: [PATCH 3/3] reverting the commint i used wrong name in values --- charts/outline/templates/004-pvc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/outline/templates/004-pvc.yaml b/charts/outline/templates/004-pvc.yaml index 3337691..9c0a347 100644 --- a/charts/outline/templates/004-pvc.yaml +++ b/charts/outline/templates/004-pvc.yaml @@ -7,7 +7,7 @@ metadata: labels: app: {{ .Release.Name }} spec: - storageClassName: {{ .Values.outline.fileStorage.StorageClassName }} + storageClassName: {{ .Values.outline.fileStorage.storageClassName }} accessModes: - ReadWriteOnce resources: