Merge branch 'main' of github.com:matrix-org/dendrite into i2p-demo

This commit is contained in:
Till Faelligen 2024-09-22 10:48:02 +02:00
commit 00d2155ae7
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E
9 changed files with 67 additions and 5 deletions

View file

@ -32,7 +32,7 @@ jobs:
version: v3.10.0 version: v3.10.0
- name: Run chart-releaser - name: Run chart-releaser
uses: helm/chart-releaser-action@ed43eb303604cbc0eeec8390544f7748dc6c790d # specific commit, since `mark_as_latest` is not yet in a release uses: helm/chart-releaser-action@v1.6.0
env: env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with: with:

View file

@ -1,4 +1,4 @@
FROM docker.io/golang:1.22 AS base FROM docker.io/golang:1.22-alpine AS base
# #
# Needs to be separate from the main Dockerfile for OpenShift, # Needs to be separate from the main Dockerfile for OpenShift,

View file

@ -5,3 +5,5 @@ chart-repos:
chart-dirs: chart-dirs:
- helm - helm
validate-maintainers: false validate-maintainers: false
# this should ensure the tarballs are in the appropriate location for GH pages, rather than repo root
package-path: docs/

View file

@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: dendrite name: dendrite
version: "0.14.2" version: "0.14.6"
appVersion: "0.13.8" appVersion: "0.13.8"
description: Dendrite Matrix Homeserver description: Dendrite Matrix Homeserver
type: application type: application

View file

@ -1,7 +1,7 @@
# dendrite # dendrite
![Version: 0.14.2](https://img.shields.io/badge/Version-0.14.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.8](https://img.shields.io/badge/AppVersion-0.13.8-informational?style=flat-square) ![Version: 0.14.4](https://img.shields.io/badge/Version-0.14.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.8](https://img.shields.io/badge/AppVersion-0.13.8-informational?style=flat-square)
Dendrite Matrix Homeserver Dendrite Matrix Homeserver
Status: **NOT PRODUCTION READY** Status: **NOT PRODUCTION READY**
@ -45,6 +45,7 @@ Create a folder `appservices` and place your configurations in there. The confi
| image.repository | string | `"ghcr.io/matrix-org/dendrite-monolith"` | Docker repository/image to use | | image.repository | string | `"ghcr.io/matrix-org/dendrite-monolith"` | Docker repository/image to use |
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes pullPolicy | | image.pullPolicy | string | `"IfNotPresent"` | Kubernetes pullPolicy |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | Configure image pull secrets to use private container registry https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret |
| signing_key.create | bool | `true` | Create a new signing key, if not exists | | signing_key.create | bool | `true` | Create a new signing key, if not exists |
| signing_key.existingSecret | string | `""` | Use an existing secret | | signing_key.existingSecret | string | `""` | Use an existing secret |
| resources | object | sets some sane default values | Default resource requests/limits. | | resources | object | sets some sane default values | Default resource requests/limits. |
@ -189,3 +190,5 @@ grafana:
``` ```
PS: The label `release=kube-prometheus-stack` is setup with the helmchart of the Prometheus Operator. For Grafana Dashboards it may be necessary to enable scanning in the correct namespaces (or ALL), enabled by `sidecar.dashboards.searchNamespace` in [Helmchart of grafana](https://artifacthub.io/packages/helm/grafana/grafana) (which is part of PrometheusOperator, so `grafana.sidecar.dashboards.searchNamespace`) PS: The label `release=kube-prometheus-stack` is setup with the helmchart of the Prometheus Operator. For Grafana Dashboards it may be necessary to enable scanning in the correct namespaces (or ALL), enabled by `sidecar.dashboards.searchNamespace` in [Helmchart of grafana](https://artifacthub.io/packages/helm/grafana/grafana) (which is part of PrometheusOperator, so `grafana.sidecar.dashboards.searchNamespace`)
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View file

@ -56,6 +56,9 @@ spec:
args: args:
- '--config' - '--config'
- '/etc/dendrite/dendrite.yaml' - '/etc/dendrite/dendrite.yaml'
{{- with .Values.extraArgs }}
{{- toYaml . | nindent 10 }}
{{- end }}
ports: ports:
- name: http - name: http
containerPort: 8008 containerPort: 8008
@ -110,3 +113,19 @@ spec:
httpGet: httpGet:
path: /_dendrite/monitor/up path: /_dendrite/monitor/up
port: http port: http
imagePullSecrets:
{{- with .Values.imagePullSecrets }}
{{ . | toYaml | nindent 6 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -54,6 +54,10 @@ metadata:
spec: spec:
template: template:
spec: spec:
imagePullSecrets:
{{- with .Values.imagePullSecrets }}
{{ . | toYaml | nindent 6 }}
{{- end }}
restartPolicy: "Never" restartPolicy: "Never"
serviceAccount: {{ $name }} serviceAccount: {{ $name }}
containers: containers:
@ -94,6 +98,18 @@ spec:
volumes: volumes:
- name: signing-key - name: signing-key
emptyDir: {} emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
parallelism: 1 parallelism: 1
completions: 1 completions: 1
backoffLimit: 1 backoffLimit: 1

View file

@ -6,6 +6,10 @@ image:
# -- Overrides the image tag whose default is the chart appVersion. # -- Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
# -- Configure image pull secrets to use private container registry
# https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret
imagePullSecrets: []
# - name: your-pull-secret-name
# signing key to use # signing key to use
signing_key: signing_key:
@ -73,6 +77,9 @@ persistence:
# GKE, AWS & OpenStack) # GKE, AWS & OpenStack)
storageClass: storageClass:
# -- Add additional arguments to the dendrite command
extraArgs: []
# -- Add additional volumes to the Dendrite Pod # -- Add additional volumes to the Dendrite Pod
extraVolumes: [] extraVolumes: []
# ex. # ex.
@ -96,6 +103,15 @@ strategy:
# -- Maximum number of pods that can be scheduled above the desired number of pods # -- Maximum number of pods that can be scheduled above the desired number of pods
maxSurge: 25% maxSurge: 25%
# -- Node selector configuration
nodeSelector: {}
# -- Tolerations configuration
tolerations: {}
# -- Affinity configuration
affinity: {}
dendrite_config: dendrite_config:
version: 2 version: 2
global: global:

View file

@ -210,6 +210,12 @@ func MakeExternalAPI(metricsName string, f func(*http.Request) util.JSONResponse
// This is used to serve HTML alongside JSON error messages // This is used to serve HTML alongside JSON error messages
func MakeHTTPAPI(metricsName string, userAPI userapi.QueryAcccessTokenAPI, enableMetrics bool, f func(http.ResponseWriter, *http.Request), checks ...AuthAPIOption) http.Handler { func MakeHTTPAPI(metricsName string, userAPI userapi.QueryAcccessTokenAPI, enableMetrics bool, f func(http.ResponseWriter, *http.Request), checks ...AuthAPIOption) http.Handler {
withSpan := func(w http.ResponseWriter, req *http.Request) { withSpan := func(w http.ResponseWriter, req *http.Request) {
if req.Method == http.MethodOptions {
util.SetCORSHeaders(w)
w.WriteHeader(http.StatusOK) // Maybe http.StatusNoContent?
return
}
trace, ctx := internal.StartTask(req.Context(), metricsName) trace, ctx := internal.StartTask(req.Context(), metricsName)
defer trace.EndTask() defer trace.EndTask()
req = req.WithContext(ctx) req = req.WithContext(ctx)