[bitnami/mastodon] Better s3 tls and wss support cert manager take2 (#15549)

* Add forceHttpsS3Protocol to values.yaml with a default value of false

This setting will allow S3_PROTOCL in mastdon's default configmap to be
set to https independent of minio.tls.enabled's setting.

The reason?  You may already have a managed/provisoned TLS cert with
and ingress terminating TLS (cert-manager with nginx-ingress for example)
where you want minio exposed as only a ClusterIP service and not TLS at the
container.  For this to happen and for mastodon to create links to S3 stored
data (profile images, media) S3_PROTOCOL needs to be https and minio as a Pod
needs to be http only.

Signed-off-by: Joel Parker <joelsparker@gmail.com>

* Document forceHttpsS3Protocol in README.md

Signed-off-by: Joel Parker <joelsparker@gmail.com>

* Use forceHttpsS3Protocol to set S3_PROTOCOL mastodon setting

Signed-off-by: Joel Parker <joelsparker@gmail.com>

* Add useSecureWebSocket to values.yaml

useSecureWebSocket controls the STREAMING_API_BASE_URL setting used by Mastodon
STREAMING_API_BASE_URL is set by mastodon.streaming.url in _helpers.tpl but
previously only used unsecured websockets for streaming.

If TLS is terminated by using cert-manager or another similar package to secure
mastodon-apache or mastdon-web deployments mastdon-web will serve out unsecured
web socket connections in the generated pages of the application meaning streaming
won't work.  The useSecureWebSocket set to true fixes this so the secure websocket
protocol (wss://) will be used when generating STREAMING_API_BASE_URL.

STREAMING_API_BASE_URL is stored in configmap/mastodon-default

Signed-off-by: Joel Parker <joelsparker@gmail.com>

* Bump Chart.yaml as a minor version instead of a patch

This was asked as part of my PR to change the version from a patch release
to a minor release update.

Signed-off-by: Joel Parker <joelsparker@gmail.com>

---------

Signed-off-by: Joel Parker <joelsparker@gmail.com>
Signed-off-by: corico44 <42420333+corico44@users.noreply.github.com>
Co-authored-by: corico44 <42420333+corico44@users.noreply.github.com>
This commit is contained in:
joelparker
2023-04-06 12:24:24 +02:00
committed by GitHub
co-authored by corico44
parent a669ad22f6
commit d4e985d67a
4 changed files with 24 additions and 3 deletions
+8 -1
View File
@@ -148,7 +148,7 @@ defaultConfig: |
S3_HOSTNAME: {{ include "mastodon.s3.host" . | quote }}
S3_REGION: {{ include "mastodon.s3.region" . | quote }}
S3_ALIAS_HOST: {{ include "mastodon.s3.aliasHost" . | quote }}
S3_PROTOCOL: {{ include "mastodon.s3.protocol" . | quote }}
S3_PROTOCOL: {{ include "mastodon.s3.protocol.setting" . | quote }}
{{- end }}
## @param defaultSecretConfig [string] Default secret configuration for Mastodon in the form of environment variables
@@ -190,6 +190,13 @@ enableSearches: true
##
enableS3: true
## @param forceHttpsS3Protocol Force Mastodon's S3_PROTOCOL to be https (Useful when TLS is terminated using cert-manager/Ingress)
##
forceHttpsS3Protocol: false
## @param useSecureWebSocket Set Mastodon's STREAMING_API_BASE_URL to use secure websocket (wss:// instead of ws://)
useSecureWebSocket: false
## @param local_https Set this instance to advertise itself to the fediverse using HTTPS rather than HTTP URLs. This should almost always be true.
##
local_https: true