diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-14 10:31:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 10:31:28 +0100 |
commit | 72335694744da87cbfaff20992cb36817f6f8a60 (patch) | |
tree | 55c1b799be04cf83f425414dce762bf9403e2b85 /chart | |
parent | 81b1d32d5b618daa4003b8de8292ae4dd3e656f6 (diff) | |
parent | c31e756644120cab650452e9d1c00a1e2f26ade4 (diff) |
Merge pull request #1923 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'chart')
-rw-r--r-- | chart/.helmignore | 15 | ||||
-rw-r--r-- | chart/Chart.yaml | 2 | ||||
-rw-r--r-- | chart/README.md | 2 | ||||
-rw-r--r-- | chart/dev-values.yaml | 25 | ||||
-rw-r--r-- | chart/templates/configmap-env.yaml | 6 | ||||
-rw-r--r-- | chart/templates/cronjob-media-remove.yaml | 14 | ||||
-rw-r--r-- | chart/templates/deployment-sidekiq.yaml | 14 | ||||
-rw-r--r-- | chart/templates/job-assets-precompile.yaml | 14 | ||||
-rw-r--r-- | chart/templates/job-chewy-upgrade.yaml | 14 | ||||
-rw-r--r-- | chart/templates/job-db-migrate.yaml | 14 | ||||
-rw-r--r-- | chart/values.yaml | 6 |
11 files changed, 87 insertions, 39 deletions
diff --git a/chart/.helmignore b/chart/.helmignore index 886747ed0..0cbed473a 100644 --- a/chart/.helmignore +++ b/chart/.helmignore @@ -1,3 +1,17 @@ +# A helm chart's templates and default values can be packaged into a .tgz file. +# When doing that, not everything should be bundled into the .tgz file. This +# file describes what to not bundle. +# +# Manually added by us +# -------------------- +# +dev-values.yaml +mastodon-*.tgz + + +# Boilerplate .helmignore from `helm create mastodon` +# --------------------------------------------------- +# # Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. @@ -21,4 +35,3 @@ .idea/ *.tmproj .vscode/ -mastodon-*.tgz diff --git a/chart/Chart.yaml b/chart/Chart.yaml index c8ed0c9f9..7080095f2 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.2.0 +version: 2.3.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/chart/README.md b/chart/README.md index 272d59a81..78d75368c 100644 --- a/chart/README.md +++ b/chart/README.md @@ -7,7 +7,7 @@ Kubernetes cluster. The basic usage is: 1. `helm dep update` 1. `helm install --namespace mastodon --create-namespace my-mastodon ./ -f path/to/additional/values.yaml` -This chart has been tested on Helm 3.0.1 and above. +This chart is tested with k8s 1.21+ and helm 3.6.0+. # Configuration diff --git a/chart/dev-values.yaml b/chart/dev-values.yaml new file mode 100644 index 000000000..b3a963ea1 --- /dev/null +++ b/chart/dev-values.yaml @@ -0,0 +1,25 @@ +# Chart values used for testing the Helm chart. +# +mastodon: + secrets: + secret_key_base: dummy-secret_key_base + otp_secret: dummy-otp_secret + vapid: + private_key: dummy-vapid-private_key + public_key: dummy-vapid-public_key + +# ref: https://github.com/bitnami/charts/tree/main/bitnami/redis#parameters +redis: + replica: + replicaCount: 1 + +# ref: https://github.com/bitnami/charts/tree/main/bitnami/elasticsearch#parameters +elasticsearch: + master: + replicaCount: 1 + data: + replicaCount: 1 + coordinating: + replicaCount: 1 + ingest: + replicaCount: 1 diff --git a/chart/templates/configmap-env.yaml b/chart/templates/configmap-env.yaml index 00e60f315..5d0b96db8 100644 --- a/chart/templates/configmap-env.yaml +++ b/chart/templates/configmap-env.yaml @@ -7,12 +7,13 @@ metadata: data: {{- if .Values.postgresql.enabled }} DB_HOST: {{ template "mastodon.postgresql.fullname" . }} + DB_PORT: "5432" {{- else }} DB_HOST: {{ .Values.postgresql.postgresqlHostname }} + DB_PORT: {{ .Values.postgresql.postgresqlPort | default "5432" | quote }} {{- end }} DB_NAME: {{ .Values.postgresql.auth.database }} DB_POOL: {{ .Values.mastodon.sidekiq.concurrency | quote }} - DB_PORT: "5432" DB_USER: {{ .Values.postgresql.auth.username }} DEFAULT_LOCALE: {{ .Values.mastodon.locale }} {{- if .Values.elasticsearch.enabled }} @@ -310,3 +311,6 @@ data: LDAP_UID_CONVERSION_REPLACE: {{ .Values.externalAuth.ldap.uid_conversion.replace }} {{- end }} {{- end }} + {{- with .Values.mastodon.metrics.statsd.address }} + STATSD_ADDR: {{ . }} + {{- end }} diff --git a/chart/templates/cronjob-media-remove.yaml b/chart/templates/cronjob-media-remove.yaml index b175f0ee7..41f1feb82 100644 --- a/chart/templates/cronjob-media-remove.yaml +++ b/chart/templates/cronjob-media-remove.yaml @@ -25,13 +25,13 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/part-of - operator: In - values: - - rails - topologyKey: kubernetes.io/hostname + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/part-of + operator: In + values: + - rails + topologyKey: kubernetes.io/hostname {{- end }} volumes: - name: assets diff --git a/chart/templates/deployment-sidekiq.yaml b/chart/templates/deployment-sidekiq.yaml index 878b01150..94af99b11 100644 --- a/chart/templates/deployment-sidekiq.yaml +++ b/chart/templates/deployment-sidekiq.yaml @@ -42,13 +42,13 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/part-of - operator: In - values: - - rails - topologyKey: kubernetes.io/hostname + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/part-of + operator: In + values: + - rails + topologyKey: kubernetes.io/hostname {{- end }} volumes: - name: assets diff --git a/chart/templates/job-assets-precompile.yaml b/chart/templates/job-assets-precompile.yaml index 30d54b76f..bc5ff7bfb 100644 --- a/chart/templates/job-assets-precompile.yaml +++ b/chart/templates/job-assets-precompile.yaml @@ -25,13 +25,13 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/part-of - operator: In - values: - - rails - topologyKey: kubernetes.io/hostname + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/part-of + operator: In + values: + - rails + topologyKey: kubernetes.io/hostname {{- end }} volumes: - name: assets diff --git a/chart/templates/job-chewy-upgrade.yaml b/chart/templates/job-chewy-upgrade.yaml index 5b22a8610..f86a4e34f 100644 --- a/chart/templates/job-chewy-upgrade.yaml +++ b/chart/templates/job-chewy-upgrade.yaml @@ -26,13 +26,13 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/part-of - operator: In - values: - - rails - topologyKey: kubernetes.io/hostname + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/part-of + operator: In + values: + - rails + topologyKey: kubernetes.io/hostname {{- end }} volumes: - name: assets diff --git a/chart/templates/job-db-migrate.yaml b/chart/templates/job-db-migrate.yaml index db09c6ea2..41324fbd0 100644 --- a/chart/templates/job-db-migrate.yaml +++ b/chart/templates/job-db-migrate.yaml @@ -25,13 +25,13 @@ spec: affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/part-of - operator: In - values: - - rails - topologyKey: kubernetes.io/hostname + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/part-of + operator: In + values: + - rails + topologyKey: kubernetes.io/hostname {{- end }} volumes: - name: assets diff --git a/chart/values.yaml b/chart/values.yaml index 5cee86e0e..07171fc1a 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -101,6 +101,11 @@ mastodon: web: port: 3000 + metrics: + statsd: + # Enable statsd publishing via STATSD_ADDR environment variable + address: "" + ingress: enabled: true annotations: @@ -144,6 +149,7 @@ postgresql: # must match those of that external postgres instance enabled: true # postgresqlHostname: preexisting-postgresql + # postgresqlPort: 5432 auth: database: mastodon_production username: mastodon |