Skip to content
Snippets Groups Projects
Verified Commit 51985b7a authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

removal(mastodon): Drop elasticsearch

This patch removes elasticsearch from the mastodon container image, as
it's not used in production anyway. Therefore the removal will simplify
the upgrade process finally allowing an idempotent upgrade to 4.2.1.
parent 70fe1469
No related branches found
No related tags found
No related merge requests found
Pipeline #18769 failed
Showing with 23 additions and 173 deletions
dependencies: dependencies:
- name: elasticsearch
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
version: 19.11.1
- name: postgresql - name: postgresql
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
version: 11.9.13 version: 11.9.13
- name: redis - name: redis
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
version: 18.1.5 version: 18.1.5
digest: sha256:3b6e2a25a1fbf85156b91053b5f400e8ece2d5b98f250b82452b0394bc68d8fe digest: sha256:0292277104a83c0cdb894cd845e2605b8c33331261d40a93024cee8f533329f1
generated: "2023-10-13T06:10:35.764396563Z" generated: "2023-11-27T18:22:40.968523587Z"
...@@ -3,7 +3,7 @@ name: mastodon ...@@ -3,7 +3,7 @@ name: mastodon
description: | description: |
Mastodon is a free, open-source social network server based on ActivityPub. Mastodon is a free, open-source social network server based on ActivityPub.
This unofficical Helm chart is maintained to the best of knowledge, with the limitation that migration steps for dependencies are not documented or tested. This is mainly due to the fact that postgresql, redis and elasticsearch in the SI-Production are ran by operators instead of helm dependencies. This unofficical Helm chart is maintained to the best of knowledge, with the limitation that migration steps for dependencies are not documented or tested. This is mainly due to the fact that postgresql and redis in the SI-Production are ran by operators instead of helm dependencies.
home: https://joinmastodon.org home: https://joinmastodon.org
icon: https://avatars.githubusercontent.com/u/24979032?s=200&v=4 icon: https://avatars.githubusercontent.com/u/24979032?s=200&v=4
keywords: keywords:
...@@ -17,16 +17,12 @@ annotations: ...@@ -17,16 +17,12 @@ annotations:
- name: support - name: support
url: https://matrix.to/#/#mastodon-on-kubernetes:shivering-isles.com url: https://matrix.to/#/#mastodon-on-kubernetes:shivering-isles.com
type: application type: application
version: 7.2.4 version: 8.0.0
kubeVersion: ">= 1.23" kubeVersion: ">= 1.23"
# renovate: image=ghcr.io/mastodon/mastodon # renovate: image=ghcr.io/mastodon/mastodon
appVersion: "v4.1.10" appVersion: "v4.1.10"
dependencies: dependencies:
- name: elasticsearch
version: 19.11.1
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
condition: elasticsearch.enabled
- name: postgresql - name: postgresql
version: 11.9.13 version: 11.9.13
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
......
# mastodon # mastodon
![Version: 7.2.3](https://img.shields.io/badge/Version-7.2.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.9](https://img.shields.io/badge/AppVersion-v4.1.9-informational?style=flat-square) ![Version: 8.0.0](https://img.shields.io/badge/Version-8.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.10](https://img.shields.io/badge/AppVersion-v4.1.10-informational?style=flat-square)
Mastodon is a free, open-source social network server based on ActivityPub. Mastodon is a free, open-source social network server based on ActivityPub.
This unofficical Helm chart is maintained to the best of knowledge, with the limitation that migration steps for dependencies are not documented or tested. This is mainly due to the fact that postgresql, redis and elasticsearch in the SI-Production are ran by operators instead of helm dependencies. This unofficical Helm chart is maintained to the best of knowledge, with the limitation that migration steps for dependencies are not documented or tested. This is mainly due to the fact that postgresql and redis in the SI-Production are ran by operators instead of helm dependencies.
**Homepage:** <https://joinmastodon.org> **Homepage:** <https://joinmastodon.org>
...@@ -19,16 +19,14 @@ Kubernetes: `>= 1.23` ...@@ -19,16 +19,14 @@ Kubernetes: `>= 1.23`
| Repository | Name | Version | | Repository | Name | Version |
|------------|------|---------| |------------|------|---------|
| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | elasticsearch | 19.11.1 |
| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | postgresql | 11.9.13 | | https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | postgresql | 11.9.13 |
| https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | redis | 18.0.4 | | https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami | redis | 18.1.5 |
## Values ## Values
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| affinity | object | `{}` | Affinity for all pods unless overwritten | | affinity | object | `{}` | Affinity for all pods unless overwritten |
| elasticsearch | object | `{}` | https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters |
| externalAuth.cas.enabled | bool | `false` | | | externalAuth.cas.enabled | bool | `false` | |
| externalAuth.ldap.enabled | bool | `false` | | | externalAuth.ldap.enabled | bool | `false` | |
| externalAuth.oauth_global.omniauth_only | bool | `false` | Automatically redirect to OIDC, CAS or SAML, and don't use local account authentication when clicking on Sign-In | | externalAuth.oauth_global.omniauth_only | bool | `false` | Automatically redirect to OIDC, CAS or SAML, and don't use local account authentication when clicking on Sign-In |
...@@ -80,7 +78,7 @@ Kubernetes: `>= 1.23` ...@@ -80,7 +78,7 @@ Kubernetes: `>= 1.23`
| mastodon.sidekiq.workers[0].affinity | object | `{}` | Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity | | mastodon.sidekiq.workers[0].affinity | object | `{}` | Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity |
| mastodon.sidekiq.workers[0].concurrency | int | `25` | Number of threads / parallel sidekiq jobs that are executed per Pod | | mastodon.sidekiq.workers[0].concurrency | int | `25` | Number of threads / parallel sidekiq jobs that are executed per Pod |
| mastodon.sidekiq.workers[0].name | string | `"all-queues"` | | | mastodon.sidekiq.workers[0].name | string | `"all-queues"` | |
| mastodon.sidekiq.workers[0].queues | list | `["default,8","push,6","ingress,4","mailers,2","pull","scheduler"]` | Sidekiq queues for Mastodon that are handled by this worker. See https://docs.joinmastodon.org/admin/scaling/#concurrency See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument | | mastodon.sidekiq.workers[0].queues | list | `["default,8","push,6","ingress,4","mailers,2","pull,1","scheduler,1"]` | Sidekiq queues for Mastodon that are handled by this worker. See https://docs.joinmastodon.org/admin/scaling/#concurrency See https://github.com/mperham/sidekiq/wiki/Advanced-Options#queues for how to weight queues as argument |
| mastodon.sidekiq.workers[0].replicas | int | `1` | Number of Pod replicas deployed by the Deployment | | mastodon.sidekiq.workers[0].replicas | int | `1` | Number of Pod replicas deployed by the Deployment |
| mastodon.sidekiq.workers[0].resources | object | `{}` | Resources for this specific deployment to allow optimised scaling, overwrites .Values.mastodon.sidekiq.resources | | mastodon.sidekiq.workers[0].resources | object | `{}` | Resources for this specific deployment to allow optimised scaling, overwrites .Values.mastodon.sidekiq.resources |
| mastodon.singleUserMode | bool | `false` | If set to true, the frontpage of your Mastodon server will always redirect to the first profile in the database and registrations will be disabled. | | mastodon.singleUserMode | bool | `false` | If set to true, the frontpage of your Mastodon server will always redirect to the first profile in the database and registrations will be disabled. |
......
File deleted
...@@ -70,14 +70,6 @@ Create the name of the service account to use ...@@ -70,14 +70,6 @@ Create the name of the service account to use
{{- end }} {{- end }}
{{- end }} {{- end }}
{{/*
Create a default fully qualified name for dependent services.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "mastodon.elasticsearch.fullname" -}}
{{- printf "%s-%s" .Release.Name "elasticsearch" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- define "mastodon.redis.fullname" -}} {{- define "mastodon.redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
......
...@@ -17,11 +17,6 @@ data: ...@@ -17,11 +17,6 @@ data:
DB_USER: {{ .Values.postgresql.auth.username }} DB_USER: {{ .Values.postgresql.auth.username }}
PREPARED_STATEMENTS: {{ .Values.mastodon.preparedStatements | quote }} PREPARED_STATEMENTS: {{ .Values.mastodon.preparedStatements | quote }}
DEFAULT_LOCALE: {{ .Values.mastodon.locale }} DEFAULT_LOCALE: {{ .Values.mastodon.locale }}
{{- if .Values.elasticsearch.enabled }}
ES_ENABLED: "true"
ES_HOST: {{ template "mastodon.elasticsearch.fullname" . }}-master-hl
ES_PORT: "9200"
{{- end }}
LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }} LOCAL_DOMAIN: {{ .Values.mastodon.local_domain }}
{{- with .Values.mastodon.web_domain }} {{- with .Values.mastodon.web_domain }}
WEB_DOMAIN: {{ . }} WEB_DOMAIN: {{ . }}
......
{{- if .Values.elasticsearch.enabled -}}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "mastodon.fullname" . }}-chewy-upgrade
labels:
{{- include "mastodon.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
"helm.sh/hook-weight": "-1"
spec:
template:
metadata:
name: {{ include "mastodon.fullname" . }}-chewy-upgrade
{{- with .Values.jobAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
restartPolicy: Never
{{- with (default .Values.affinity .Values.mastodon.web.affinity) }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if (not .Values.mastodon.s3.enabled) }}
volumes:
{{- include "mastodon.nonS3MediaVolumes" . | nindent 8 }}
{{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: {{ include "mastodon.fullname" . }}-chewy-setup
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- bundle
- exec
- rake
- chewy:upgrade
envFrom:
- configMapRef:
name: {{ include "mastodon.fullname" . }}-env
- secretRef:
name: {{ template "mastodon.secretName" . }}
env:
- name: "DB_PASS"
valueFrom:
secretKeyRef:
name: {{ template "mastodon.postgresql.secretName" . }}
key: password
{{- if .Values.redis.auth.enabled }}
- name: "REDIS_PASSWORD"
valueFrom:
secretKeyRef:
name: {{ template "mastodon.redis.secretName" . }}
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
{{- end }}
- name: "PORT"
value: {{ .Values.mastodon.web.port | quote }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if (not .Values.mastodon.s3.enabled) }}
volumeMounts:
{{- include "mastodon.nonS3MediaMounts" . | nindent 12 }}
{{- end }}
{{- end }}
...@@ -4,14 +4,22 @@ templates: ...@@ -4,14 +4,22 @@ templates:
- deployment-streaming.yaml - deployment-streaming.yaml
- deployment-web.yaml - deployment-web.yaml
- job-assets-precompile.yaml - job-assets-precompile.yaml
- job-chewy-upgrade.yaml
- job-db-migrate.yaml - job-db-migrate.yaml
- job-db-pre-migrate.yaml - job-db-pre-migrate.yaml
- secrets.yaml
- configmap-env.yaml
tests: tests:
- it: has allowPrivilegeEscalation set to false - it: has allowPrivilegeEscalation set to false
values: values:
- mocks/dev.yaml - mocks/dev.yaml
- mocks/sidekiq.yaml - mocks/sidekiq.yaml
templates:
- deployment-sidekiq.yaml
- deployment-streaming.yaml
- deployment-web.yaml
- job-assets-precompile.yaml
- job-db-migrate.yaml
- job-db-pre-migrate.yaml
asserts: asserts:
- equal: - equal:
path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation
......
suite: elasticsearch
templates:
- charts/elasticsearch/templates/master/statefulset.yaml
- configmap-env.yaml
- deployment-sidekiq.yaml
- deployment-streaming.yaml
- deployment-web.yaml
- secrets.yaml
values:
- mocks/dev.yaml
chart:
version: 1.2.3
appVersion: 4.5.6
capabilities:
apiVersions:
- networking.k8s.io/v1/Ingress
tests:
- it: should have correct hostname
asserts:
- equal:
path: data.ES_HOST
value: RELEASE-NAME-elasticsearch-master-hl
template: configmap-env.yaml
- equal:
path: spec.serviceName
value: RELEASE-NAME-elasticsearch-master-hl
template: charts/elasticsearch/templates/master/statefulset.yaml
- it: should use port 9200
asserts:
- equal:
path: data.ES_PORT
value: "9200"
template: configmap-env.yaml
- contains:
path: spec.template.spec.containers[0].ports
content:
name: rest-api
containerPort: 9200
template: charts/elasticsearch/templates/master/statefulset.yaml
\ No newline at end of file
...@@ -7,7 +7,6 @@ templates: ...@@ -7,7 +7,6 @@ templates:
- deployment-web.yaml - deployment-web.yaml
- ingress.yaml - ingress.yaml
- job-assets-precompile.yaml - job-assets-precompile.yaml
- job-chewy-upgrade.yaml
- job-create-admin.yaml - job-create-admin.yaml
- job-db-migrate.yaml - job-db-migrate.yaml
- job-db-pre-migrate.yaml - job-db-pre-migrate.yaml
......
...@@ -7,7 +7,6 @@ templates: ...@@ -7,7 +7,6 @@ templates:
- deployment-web.yaml - deployment-web.yaml
- ingress.yaml - ingress.yaml
- job-assets-precompile.yaml - job-assets-precompile.yaml
- job-chewy-upgrade.yaml
- job-create-admin.yaml - job-create-admin.yaml
- job-db-migrate.yaml - job-db-migrate.yaml
- job-db-pre-migrate.yaml - job-db-pre-migrate.yaml
......
...@@ -12,14 +12,3 @@ mastodon: ...@@ -12,14 +12,3 @@ mastodon:
redis: redis:
replica: replica:
replicaCount: 1 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
...@@ -124,26 +124,26 @@ mastodon: ...@@ -124,26 +124,26 @@ mastodon:
- push,6 - push,6
- ingress,4 - ingress,4
- mailers,2 - mailers,2
- pull - pull,1
- scheduler # Make sure the scheduler queue only exists once and with a worker that has 1 replica. - scheduler,1 # Make sure the scheduler queue only exists once and with a worker that has 1 replica.
#- name: push-pull #- name: push-pull
# concurrency: 50 # concurrency: 50
# resources: {} # resources: {}
# replicas: 2 # replicas: 2
# queues: # queues:
# - push # - push,10
# - pull # - pull,10
#- name: mailers #- name: mailers
# concurrency: 25 # concurrency: 25
# replicas: 2 # replicas: 2
# queues: # queues:
# - mailers # - mailers,2
#- name: default #- name: default
# concurrency: 25 # concurrency: 25
# replicas: 2 # replicas: 2
# queues: # queues:
# - default # - default,5
smtp: smtp:
auth_method: plain auth_method: plain
ca_file: /etc/ssl/certs/ca-certificates.crt ca_file: /etc/ssl/certs/ca-certificates.crt
...@@ -254,19 +254,6 @@ ingress: ...@@ -254,19 +254,6 @@ ingress:
hosts: hosts:
- mastodon.local - mastodon.local
# -- https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch#parameters
elasticsearch:
# `false` will disable full-text search
#
# if you enable ES after the initial install, you will need to manually run
# RAILS_ENV=production bundle exec rake chewy:sync
# (https://docs.joinmastodon.org/admin/optional/elasticsearch/)
# @ignored
enabled: true
# @ignored
image:
tag: 7
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters # https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
postgresql: postgresql:
# -- disable if you want to use an existing db; in which case the values below # -- disable if you want to use an existing db; in which case the values below
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment