一些更新
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd /data
|
||||
|
||||
sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/debian.sources
|
||||
apt update && apt install -y wget
|
||||
|
||||
for i in {1..20}; do
|
||||
EP=$(printf "%02d" $i)
|
||||
for j in {1..1000}; do
|
||||
FILE=$(printf "%07d" $j)
|
||||
wget --referer=https://www.bilivod.com/ -rc https://c1.rrcdnbf2.com/video/xiarilidechuntian/第${EP}集/${FILE}.ts || continue
|
||||
done
|
||||
done
|
||||
@@ -0,0 +1,34 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: download-job
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: download
|
||||
image: cr.wetofu.me/debian:sid-slim
|
||||
command:
|
||||
- /bin/bash
|
||||
- /loader/download.sh
|
||||
volumeMounts:
|
||||
- name: download-volume
|
||||
mountPath: /data
|
||||
- name: download-sh
|
||||
mountPath: /loader/download.sh
|
||||
subPath: download.sh
|
||||
resources:
|
||||
limits:
|
||||
cpu: '1'
|
||||
memory: '1Gi'
|
||||
volumes:
|
||||
- name: download-volume
|
||||
hostPath:
|
||||
path: /data/xiarilidechuntian/
|
||||
- name: download-sh
|
||||
configMap:
|
||||
name: download-sh
|
||||
items:
|
||||
- key: download.sh
|
||||
path: download.sh
|
||||
restartPolicy: OnFailure
|
||||
@@ -0,0 +1,10 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
|
||||
|
||||
kind: Kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
resources:
|
||||
- download.yaml
|
||||
configMapGenerator:
|
||||
- name: download-sh
|
||||
files:
|
||||
- download.sh
|
||||
@@ -0,0 +1,5 @@
|
||||
{{ define "chart.about" }}
|
||||
## About
|
||||
|
||||
This chart creates a monolith deployment, including an optionally enabled PostgreSQL dependency to connect to.
|
||||
{{ end }}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{ define "chart.appservices" }}
|
||||
## Usage with appservices
|
||||
|
||||
Create a folder `appservices` and place your configurations in there. The configurations will be read and placed in a secret `dendrite-appservices-conf`.
|
||||
{{ end }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{ define "chart.dbCreation" }}
|
||||
## Manual database creation
|
||||
|
||||
(You can skip this, if you're deploying the PostgreSQL dependency)
|
||||
|
||||
You'll need to create the following database before starting Dendrite (see [installation](https://matrix-org.github.io/dendrite/installation/database#single-database-creation)):
|
||||
|
||||
```postgres
|
||||
create database dendrite
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
sudo -u postgres createdb -O dendrite -E UTF-8 dendrite
|
||||
```
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{ define "chart.monitoringSection" }}
|
||||
## Monitoring
|
||||
|
||||

|
||||
|
||||
* Works well with [Prometheus Operator](https://prometheus-operator.dev/) ([Helmchart](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack)) and their setup of [Grafana](https://grafana.com/grafana/), by enabling the following values:
|
||||
```yaml
|
||||
dendrite_config:
|
||||
global:
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
prometheus:
|
||||
servicemonitor:
|
||||
enabled: true
|
||||
labels:
|
||||
release: "kube-prometheus-stack"
|
||||
rules:
|
||||
enabled: true # will deploy alert rules
|
||||
labels:
|
||||
release: "kube-prometheus-stack"
|
||||
grafana:
|
||||
dashboards:
|
||||
enabled: true # will deploy default dashboards
|
||||
```
|
||||
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`)
|
||||
{{ end }}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{ define "chart.state" }}
|
||||
Status: **NOT PRODUCTION READY**
|
||||
{{ end }}
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 14.2.3
|
||||
digest: sha256:9a752ef85baa3c754e9569b2cd08cb15bf8e9d182716f0296e853ce15e918c27
|
||||
generated: "2024-04-09T08:24:44.156192866Z"
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.13.7
|
||||
dependencies:
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 14.2.3
|
||||
description: Dendrite Matrix Homeserver
|
||||
home: https://github.com/matrix-org/dendrite
|
||||
icon: https://avatars.githubusercontent.com/u/8418310?s=48&v=4
|
||||
keywords:
|
||||
- matrix
|
||||
- chat
|
||||
- homeserver
|
||||
- dendrite
|
||||
name: dendrite
|
||||
sources:
|
||||
- https://github.com/matrix-org/dendrite
|
||||
type: application
|
||||
version: 0.14.1
|
||||
@@ -0,0 +1,193 @@
|
||||
|
||||
# dendrite
|
||||
|
||||
  
|
||||
Dendrite Matrix Homeserver
|
||||
|
||||
Status: **NOT PRODUCTION READY**
|
||||
|
||||
## About
|
||||
|
||||
This chart creates a monolith deployment, including an optionally enabled PostgreSQL dependency to connect to.
|
||||
|
||||
## Manual database creation
|
||||
|
||||
(You can skip this, if you're deploying the PostgreSQL dependency)
|
||||
|
||||
You'll need to create the following database before starting Dendrite (see [installation](https://matrix-org.github.io/dendrite/installation/database#single-database-creation)):
|
||||
|
||||
```postgres
|
||||
create database dendrite
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
sudo -u postgres createdb -O dendrite -E UTF-8 dendrite
|
||||
```
|
||||
|
||||
## Usage with appservices
|
||||
|
||||
Create a folder `appservices` and place your configurations in there. The configurations will be read and placed in a secret `dendrite-appservices-conf`.
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/matrix-org/dendrite>
|
||||
## Requirements
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| https://charts.bitnami.com/bitnami | postgresql | 14.2.3 |
|
||||
## Values
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| image.repository | string | `"ghcr.io/matrix-org/dendrite-monolith"` | Docker repository/image to use |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes pullPolicy |
|
||||
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
|
||||
| signing_key.create | bool | `true` | Create a new signing key, if not exists |
|
||||
| signing_key.existingSecret | string | `""` | Use an existing secret |
|
||||
| resources | object | sets some sane default values | Default resource requests/limits. |
|
||||
| persistence.storageClass | string | `nil` | The storage class to use for volume claims. Used unless specified at the specific component. Defaults to the cluster default storage class. If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack) |
|
||||
| persistence.jetstream.existingClaim | string | `""` | Use an existing volume claim for jetstream |
|
||||
| persistence.jetstream.capacity | string | `"1Gi"` | PVC Storage Request for the jetstream volume |
|
||||
| persistence.jetstream.storageClass | string | `nil` | The storage class to use for volume claims. Defaults to persistence.storageClass If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack) |
|
||||
| persistence.media.existingClaim | string | `""` | Use an existing volume claim for media files |
|
||||
| persistence.media.capacity | string | `"1Gi"` | PVC Storage Request for the media volume |
|
||||
| persistence.media.storageClass | string | `nil` | The storage class to use for volume claims. Defaults to persistence.storageClass If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack) |
|
||||
| persistence.search.existingClaim | string | `""` | Use an existing volume claim for the fulltext search index |
|
||||
| persistence.search.capacity | string | `"1Gi"` | PVC Storage Request for the search volume |
|
||||
| persistence.search.storageClass | string | `nil` | The storage class to use for volume claims. Defaults to persistence.storageClass If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack) |
|
||||
| extraVolumes | list | `[]` | Add additional volumes to the Dendrite Pod |
|
||||
| extraVolumeMounts | list | `[]` | Configure additional mount points volumes in the Dendrite Pod |
|
||||
| strategy.type | string | `"Recreate"` | Strategy to use for rolling updates (e.g. Recreate, RollingUpdate) If you are using ReadWriteOnce volumes, you should probably use Recreate |
|
||||
| strategy.rollingUpdate.maxUnavailable | string | `"25%"` | Maximum number of pods that can be unavailable during the update process |
|
||||
| strategy.rollingUpdate.maxSurge | string | `"25%"` | Maximum number of pods that can be scheduled above the desired number of pods |
|
||||
| dendrite_config.version | int | `2` | |
|
||||
| dendrite_config.global.server_name | string | `""` | **REQUIRED** Servername for this Dendrite deployment. |
|
||||
| dendrite_config.global.private_key | string | `"/etc/dendrite/secrets/signing.key"` | The private key to use. (**NOTE**: This is overriden in Helm) |
|
||||
| dendrite_config.global.well_known_server_name | string | `""` | The server name to delegate server-server communications to, with optional port e.g. localhost:443 |
|
||||
| dendrite_config.global.well_known_client_name | string | `""` | The server name to delegate client-server communications to, with optional port e.g. localhost:443 |
|
||||
| dendrite_config.global.trusted_third_party_id_servers | list | `["matrix.org","vector.im"]` | Lists of domains that the server will trust as identity servers to verify third party identifiers such as phone numbers and email addresses. |
|
||||
| dendrite_config.global.old_private_keys | string | `nil` | The paths and expiry timestamps (as a UNIX timestamp in millisecond precision) to old signing keys that were formerly in use on this domain name. These keys will not be used for federation request or event signing, but will be provided to any other homeserver that asks when trying to verify old events. |
|
||||
| dendrite_config.global.disable_federation | bool | `false` | Disable federation. Dendrite will not be able to make any outbound HTTP requests to other servers and the federation API will not be exposed. |
|
||||
| dendrite_config.global.key_validity_period | string | `"168h0m0s"` | |
|
||||
| dendrite_config.global.database.connection_string | string | `""` | The connection string for connections to Postgres. This will be set automatically if using the Postgres dependency |
|
||||
| dendrite_config.global.database.max_open_conns | int | `90` | Default database maximum open connections |
|
||||
| dendrite_config.global.database.max_idle_conns | int | `5` | Default database maximum idle connections |
|
||||
| dendrite_config.global.database.conn_max_lifetime | int | `-1` | Default database maximum lifetime |
|
||||
| dendrite_config.global.jetstream.storage_path | string | `"/data/jetstream"` | Persistent directory to store JetStream streams in. |
|
||||
| dendrite_config.global.jetstream.addresses | list | `[]` | NATS JetStream server addresses if not using internal NATS. |
|
||||
| dendrite_config.global.jetstream.topic_prefix | string | `"Dendrite"` | The prefix for JetStream streams |
|
||||
| dendrite_config.global.jetstream.in_memory | bool | `false` | Keep all data in memory. (**NOTE**: This is overriden in Helm to `false`) |
|
||||
| dendrite_config.global.jetstream.disable_tls_validation | bool | `true` | Disables TLS validation. This should **NOT** be used in production. |
|
||||
| dendrite_config.global.cache.max_size_estimated | string | `"1gb"` | The estimated maximum size for the global cache in bytes, or in terabytes, gigabytes, megabytes or kilobytes when the appropriate 'tb', 'gb', 'mb' or 'kb' suffix is specified. Note that this is not a hard limit, nor is it a memory limit for the entire process. A cache that is too small may ultimately provide little or no benefit. |
|
||||
| dendrite_config.global.cache.max_age | string | `"1h"` | The maximum amount of time that a cache entry can live for in memory before it will be evicted and/or refreshed from the database. Lower values result in easier admission of new cache entries but may also increase database load in comparison to higher values, so adjust conservatively. Higher values may make it harder for new items to make it into the cache, e.g. if new rooms suddenly become popular. |
|
||||
| dendrite_config.global.report_stats.enabled | bool | `false` | Configures phone-home statistics reporting. These statistics contain the server name, number of active users and some information on your deployment config. We use this information to understand how Dendrite is being used in the wild. |
|
||||
| dendrite_config.global.report_stats.endpoint | string | `"https://matrix.org/report-usage-stats/push"` | Endpoint to report statistics to. |
|
||||
| dendrite_config.global.presence.enable_inbound | bool | `false` | Controls whether we receive presence events from other servers |
|
||||
| dendrite_config.global.presence.enable_outbound | bool | `false` | Controls whether we send presence events for our local users to other servers. (_May increase CPU/memory usage_) |
|
||||
| dendrite_config.global.server_notices.enabled | bool | `false` | Server notices allows server admins to send messages to all users on the server. |
|
||||
| dendrite_config.global.server_notices.local_part | string | `"_server"` | The local part for the user sending server notices. |
|
||||
| dendrite_config.global.server_notices.display_name | string | `"Server Alerts"` | The display name for the user sending server notices. |
|
||||
| dendrite_config.global.server_notices.avatar_url | string | `""` | The avatar URL (as a mxc:// URL) name for the user sending server notices. |
|
||||
| dendrite_config.global.server_notices.room_name | string | `"Server Alerts"` | |
|
||||
| dendrite_config.global.metrics.enabled | bool | `false` | Whether or not Prometheus metrics are enabled. |
|
||||
| dendrite_config.global.metrics.basic_auth.user | string | `"metrics"` | HTTP basic authentication username |
|
||||
| dendrite_config.global.metrics.basic_auth.password | string | `"metrics"` | HTTP basic authentication password |
|
||||
| dendrite_config.global.dns_cache.enabled | bool | `false` | Whether or not the DNS cache is enabled. |
|
||||
| dendrite_config.global.dns_cache.cache_size | int | `256` | Maximum number of entries to hold in the DNS cache |
|
||||
| dendrite_config.global.dns_cache.cache_lifetime | string | `"10m"` | Duration for how long DNS cache items should be considered valid ([see time.ParseDuration](https://pkg.go.dev/time#ParseDuration) for more) |
|
||||
| dendrite_config.global.profiling.enabled | bool | `false` | Enable pprof. You will need to manually create a port forwarding to the deployment to access PPROF, as it will only listen on localhost and the defined port. e.g. `kubectl port-forward deployments/dendrite 65432:65432` |
|
||||
| dendrite_config.global.profiling.port | int | `65432` | pprof port, if enabled |
|
||||
| dendrite_config.mscs | object | `{"mscs":[]}` | Configuration for experimental MSC's. (Valid values are: msc2836) |
|
||||
| dendrite_config.app_service_api.disable_tls_validation | bool | `false` | Disable the validation of TLS certificates of appservices. This is not recommended in production since it may allow appservice traffic to be sent to an insecure endpoint. |
|
||||
| dendrite_config.app_service_api.config_files | list | `[]` | Appservice config files to load on startup. (**NOTE**: This is overriden by Helm, if a folder `./appservices/` exists) |
|
||||
| dendrite_config.client_api.registration_disabled | bool | `true` | Prevents new users from being able to register on this homeserver, except when using the registration shared secret below. |
|
||||
| dendrite_config.client_api.guests_disabled | bool | `true` | |
|
||||
| dendrite_config.client_api.registration_shared_secret | string | `""` | If set, allows registration by anyone who knows the shared secret, regardless of whether registration is otherwise disabled. |
|
||||
| dendrite_config.client_api.enable_registration_captcha | bool | `false` | enable reCAPTCHA registration |
|
||||
| dendrite_config.client_api.recaptcha_public_key | string | `""` | reCAPTCHA public key |
|
||||
| dendrite_config.client_api.recaptcha_private_key | string | `""` | reCAPTCHA private key |
|
||||
| dendrite_config.client_api.recaptcha_bypass_secret | string | `""` | reCAPTCHA bypass secret |
|
||||
| dendrite_config.client_api.recaptcha_siteverify_api | string | `""` | |
|
||||
| dendrite_config.client_api.turn.turn_user_lifetime | string | `"24h"` | Duration for how long users should be considered valid ([see time.ParseDuration](https://pkg.go.dev/time#ParseDuration) for more) |
|
||||
| dendrite_config.client_api.turn.turn_uris | list | `[]` | |
|
||||
| dendrite_config.client_api.turn.turn_shared_secret | string | `""` | |
|
||||
| dendrite_config.client_api.turn.turn_username | string | `""` | The TURN username |
|
||||
| dendrite_config.client_api.turn.turn_password | string | `""` | The TURN password |
|
||||
| dendrite_config.client_api.rate_limiting.enabled | bool | `true` | Enable rate limiting |
|
||||
| dendrite_config.client_api.rate_limiting.threshold | int | `20` | After how many requests a rate limit should be activated |
|
||||
| dendrite_config.client_api.rate_limiting.cooloff_ms | int | `500` | Cooloff time in milliseconds |
|
||||
| dendrite_config.client_api.rate_limiting.exempt_user_ids | string | `nil` | Users which should be exempt from rate limiting |
|
||||
| dendrite_config.federation_api.send_max_retries | int | `16` | Federation failure threshold. How many consecutive failures that we should tolerate when sending federation requests to a specific server. The backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds, etc. The default value is 16 if not specified, which is circa 18 hours. |
|
||||
| dendrite_config.federation_api.disable_tls_validation | bool | `false` | Disable TLS validation. This should **NOT** be used in production. |
|
||||
| dendrite_config.federation_api.prefer_direct_fetch | bool | `false` | |
|
||||
| dendrite_config.federation_api.disable_http_keepalives | bool | `false` | Prevents Dendrite from keeping HTTP connections open for reuse for future requests. Connections will be closed quicker but we may spend more time on TLS handshakes instead. |
|
||||
| dendrite_config.federation_api.key_perspectives | list | See value.yaml | Perspective keyservers, to use as a backup when direct key fetch requests don't succeed. |
|
||||
| dendrite_config.media_api.base_path | string | `"/data/media_store"` | The path to store media files (e.g. avatars) in |
|
||||
| dendrite_config.media_api.max_file_size_bytes | int | `10485760` | The max file size for uploaded media files |
|
||||
| dendrite_config.media_api.dynamic_thumbnails | bool | `false` | |
|
||||
| dendrite_config.media_api.max_thumbnail_generators | int | `10` | The maximum number of simultaneous thumbnail generators to run. |
|
||||
| dendrite_config.media_api.thumbnail_sizes | list | See value.yaml | A list of thumbnail sizes to be generated for media content. |
|
||||
| dendrite_config.sync_api.real_ip_header | string | `"X-Real-IP"` | This option controls which HTTP header to inspect to find the real remote IP address of the client. This is likely required if Dendrite is running behind a reverse proxy server. |
|
||||
| dendrite_config.sync_api.search | object | `{"enabled":true,"index_path":"/data/search","language":"en"}` | Configuration for the full-text search engine. |
|
||||
| dendrite_config.sync_api.search.enabled | bool | `true` | Whether fulltext search is enabled. |
|
||||
| dendrite_config.sync_api.search.index_path | string | `"/data/search"` | The path to store the search index in. |
|
||||
| dendrite_config.sync_api.search.language | string | `"en"` | The language most likely to be used on the server - used when indexing, to ensure the returned results match expectations. A full list of possible languages can be found [here](https://github.com/matrix-org/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) |
|
||||
| dendrite_config.user_api.bcrypt_cost | int | `10` | bcrypt cost to use when hashing passwords. (ranges from 4-31; 4 being least secure, 31 being most secure; _NOTE: Using a too high value can cause clients to timeout and uses more CPU._) |
|
||||
| dendrite_config.user_api.openid_token_lifetime_ms | int | `3600000` | OpenID Token lifetime in milliseconds. |
|
||||
| dendrite_config.user_api.push_gateway_disable_tls_validation | bool | `false` | |
|
||||
| dendrite_config.user_api.auto_join_rooms | list | `[]` | Rooms to join users to after registration |
|
||||
| dendrite_config.logging | list | `[{"level":"info","type":"std"}]` | Default logging configuration |
|
||||
| postgresql.enabled | bool | See value.yaml | Enable and configure postgres as the database for dendrite. |
|
||||
| postgresql.image.repository | string | `"bitnami/postgresql"` | |
|
||||
| postgresql.image.tag | string | `"16.2.0"` | |
|
||||
| postgresql.auth.username | string | `"dendrite"` | |
|
||||
| postgresql.auth.password | string | `"changeme"` | |
|
||||
| postgresql.auth.database | string | `"dendrite"` | |
|
||||
| postgresql.persistence.enabled | bool | `false` | |
|
||||
| ingress.enabled | bool | `false` | Create an ingress for the deployment |
|
||||
| ingress.className | string | `""` | The ingressClass to use. Will be converted to annotation if not yet supported. |
|
||||
| ingress.annotations | object | `{}` | Extra, custom annotations |
|
||||
| ingress.hostName | string | `""` | The ingress hostname for your matrix server. Should align with the server_name and well_known_* hosts. If not set, generated from the dendrite_config values. |
|
||||
| ingress.tls | list | `[]` | TLS configuration. Should contain information for the server_name and well-known hosts. Alternatively, set tls.generate=true to generate defaults based on the dendrite_config. |
|
||||
| service.type | string | `"ClusterIP"` | |
|
||||
| service.port | int | `8008` | |
|
||||
| prometheus.servicemonitor.enabled | bool | `false` | Enable ServiceMonitor for Prometheus-Operator for scrape metric-endpoint |
|
||||
| prometheus.servicemonitor.labels | object | `{}` | Extra Labels on ServiceMonitor for selector of Prometheus Instance |
|
||||
| prometheus.rules.enabled | bool | `false` | Enable PrometheusRules for Prometheus-Operator for setup alerting |
|
||||
| prometheus.rules.labels | object | `{}` | Extra Labels on PrometheusRules for selector of Prometheus Instance |
|
||||
| prometheus.rules.additionalRules | list | `[]` | additional alertrules (no default alertrules are provided) |
|
||||
| grafana.dashboards.enabled | bool | `false` | |
|
||||
| grafana.dashboards.labels | object | `{"grafana_dashboard":"1"}` | Extra Labels on ConfigMap for selector of grafana sidecar |
|
||||
| grafana.dashboards.annotations | object | `{}` | Extra Annotations on ConfigMap additional config in grafana sidecar |
|
||||
|
||||
## Monitoring
|
||||
|
||||

|
||||
|
||||
* Works well with [Prometheus Operator](https://prometheus-operator.dev/) ([Helmchart](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack)) and their setup of [Grafana](https://grafana.com/grafana/), by enabling the following values:
|
||||
```yaml
|
||||
dendrite_config:
|
||||
global:
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
prometheus:
|
||||
servicemonitor:
|
||||
enabled: true
|
||||
labels:
|
||||
release: "kube-prometheus-stack"
|
||||
rules:
|
||||
enabled: true # will deploy alert rules
|
||||
labels:
|
||||
release: "kube-prometheus-stack"
|
||||
grafana:
|
||||
dashboards:
|
||||
enabled: true # will deploy default dashboards
|
||||
```
|
||||
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.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
|
||||
@@ -0,0 +1,14 @@
|
||||
{{ template "chart.header" . }}
|
||||
{{ template "chart.deprecationWarning" . }}
|
||||
{{ template "chart.badgesSection" . }}
|
||||
{{ template "chart.description" . }}
|
||||
{{ template "chart.state" . }}
|
||||
{{ template "chart.about" . }}
|
||||
{{ template "chart.dbCreation" . }}
|
||||
{{ template "chart.appservices" . }}
|
||||
{{ template "chart.maintainersSection" . }}
|
||||
{{ template "chart.sourcesSection" . }}
|
||||
{{ template "chart.requirementsSection" . }}
|
||||
{{ template "chart.valuesSection" . }}
|
||||
{{ template "chart.monitoringSection" . }}
|
||||
{{ template "helm-docs.versionFooter" . }}
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
postgresql:
|
||||
enabled: true
|
||||
primary:
|
||||
persistence:
|
||||
size: 1Gi
|
||||
|
||||
dendrite_config:
|
||||
global:
|
||||
server_name: "localhost"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
|
||||
# dashboard is an ConfigMap with labels - it does not harm on testing
|
||||
grafana:
|
||||
dashboards:
|
||||
enabled: true
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
postgresql:
|
||||
enabled: true
|
||||
primary:
|
||||
persistence:
|
||||
size: 1Gi
|
||||
|
||||
dendrite_config:
|
||||
global:
|
||||
server_name: "localhost"
|
||||
|
||||
client_api:
|
||||
registration_shared_secret: "d233f2fcb0470845a8e150a20ef594ddbe0b4cf7fe482fb9d5120c198557acbf" # echo "dendrite" | sha256sum
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
@@ -0,0 +1,479 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "Dendrite dashboard from https://github.com/matrix-org/dendrite/",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"gnetId": 13916,
|
||||
"graphTooltip": 0,
|
||||
"id": 60,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 4,
|
||||
"panels": [],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Overview",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"description": "Total number of registered users",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 7,
|
||||
"x": 0,
|
||||
"y": 1
|
||||
},
|
||||
"id": 20,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.3.6",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"exemplar": false,
|
||||
"expr": "sum(dendrite_clientapi_reg_users_total{namespace=~\"$namespace\",service=~\"$service\"}) by (namespace,service)",
|
||||
"instant": false,
|
||||
"interval": "",
|
||||
"legendFormat": "{{namespace}}: {{service}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Registered Users",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"description": "The number of sync requests that are active right now and are waiting to be woken by a notifier",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 17,
|
||||
"x": 7,
|
||||
"y": 1
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.3.6",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(rate(dendrite_syncapi_active_sync_requests{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval]))by (namspace,service)",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "active: {{namspace}} - {{service}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "sum(rate(dendrite_syncapi_waiting_sync_requests{namespace=~\"$namespace\",service=~\"$service\"}[$__rate_interval]))by (namespace,service)",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "waiting: {{namspace}} - {{service}}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"title": "Sync API",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 8,
|
||||
"panels": [],
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Federation",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"description": "Collection of queues for sending transactions to other matrix servers",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 10
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.3.6",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "dendrite_federationapi_destination_queues_running{namespace=~\"$namespace\",service=~\"$service\"}",
|
||||
"interval": "",
|
||||
"legendFormat": "Queue Running: {{namespace}}-{{service}}",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "dendrite_federationapi_destination_queues_total{namespace=~\"$namespace\",service=~\"$service\"}",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "Queue Total: {{namespace}}-{{service}}",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "dendrite_federationapi_destination_queues_backing_off{namespace=~\"$namespace\",service=~\"$service\"}",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "Backing Off: {{namespace}}-{{service}}",
|
||||
"range": true,
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"title": "Federation Sender Destination",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "10s",
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"matrix",
|
||||
"dendrite"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "Prometheus",
|
||||
"value": "Prometheus"
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "datasource",
|
||||
"multi": false,
|
||||
"name": "DS_PROMETHEUS",
|
||||
"options": [],
|
||||
"query": "prometheus",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "datasource"
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"definition": "label_values(dendrite_syncapi_active_sync_requests, namespace)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "namespace",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(dendrite_syncapi_active_sync_requests, namespace)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"type": "query"
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${DS_PROMETHEUS}"
|
||||
},
|
||||
"definition": "label_values(dendrite_syncapi_active_sync_requests{namespace=~\"$namespace\"}, service)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "service",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(dendrite_syncapi_active_sync_requests{namespace=~\"$namespace\"}, service)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-3h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Dendrite",
|
||||
"uid": "RoRt1jEGz",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 125 KiB |
@@ -0,0 +1,68 @@
|
||||
{{- define "validate.config" }}
|
||||
{{- if and (not .Values.signing_key.create) (eq .Values.signing_key.existingSecret "") -}}
|
||||
{{- fail "You must create a signing key for configuration.signing_key OR specify an existing secret name in .Values.signing_key.existingSecret to mount it. (see https://github.com/matrix-org/dendrite/blob/master/docs/INSTALL.md#server-key-generation)" -}}
|
||||
{{- end -}}
|
||||
{{- if and (not .Values.postgresql.enabled) (eq .Values.dendrite_config.global.database.connection_string "") -}}
|
||||
{{- fail "Database connection string must be set." -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "image.name" -}}
|
||||
{{- with .Values.image -}}
|
||||
image: {{ .repository }}:{{ .tag | default (printf "v%s" $.Chart.AppVersion) }}
|
||||
imagePullPolicy: {{ .pullPolicy }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "dendrite.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "dendrite.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "dendrite.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "dendrite.labels" -}}
|
||||
helm.sh/chart: {{ include "dendrite.chart" . }}
|
||||
{{ include "dendrite.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "dendrite.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "dendrite.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- define "override.config" }}
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
{{- $_ := set .Values.dendrite_config.global.database "connection_string" (print "postgresql://" .Values.postgresql.auth.username ":" .Values.postgresql.auth.password "@" .Release.Name "-postgresql/dendrite?sslmode=disable") -}}
|
||||
{{ end }}
|
||||
global:
|
||||
private_key: /etc/dendrite/secrets/signing.key
|
||||
jetstream:
|
||||
in_memory: false
|
||||
{{ if (gt (len (.Files.Glob "appservices/*")) 0) }}
|
||||
app_service_api:
|
||||
config_files:
|
||||
{{- range $x, $y := .Files.Glob "appservices/*" }}
|
||||
- /etc/dendrite/appservices/{{ base $x }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.grafana.dashboards.enabled }}
|
||||
{{- range $path, $bytes := .Files.Glob "grafana_dashboards/*.json" }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "dendrite.fullname" $ }}-grafana-dashboards-{{ base $path }}
|
||||
labels:
|
||||
{{- include "dendrite.labels" $ | nindent 4 }}
|
||||
{{- toYaml $.Values.grafana.dashboards.labels | nindent 4 }}
|
||||
annotations:
|
||||
{{- toYaml $.Values.grafana.dashboards.annotations | nindent 4 }}
|
||||
data:
|
||||
{{- ($.Files.Glob $path ).AsConfig | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,115 @@
|
||||
{{ template "validate.config" . }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
name: {{ include "dendrite.fullname" . }}
|
||||
labels:
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "dendrite.selectorLabels" . | nindent 6 }}
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: {{ $.Values.strategy.type }}
|
||||
{{- if eq $.Values.strategy.type "RollingUpdate" }}
|
||||
rollingUpdate:
|
||||
maxSurge: {{ $.Values.strategy.rollingUpdate.maxSurge }}
|
||||
maxUnavailable: {{ $.Values.strategy.rollingUpdate.maxUnavailable }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "dendrite.selectorLabels" . | nindent 8 }}
|
||||
annotations:
|
||||
confighash: secret-{{ .Values.dendrite_config | toYaml | sha256sum | trunc 32 }}
|
||||
spec:
|
||||
volumes:
|
||||
- name: {{ include "dendrite.fullname" . }}-conf-vol
|
||||
secret:
|
||||
secretName: {{ include "dendrite.fullname" . }}-conf
|
||||
- name: {{ include "dendrite.fullname" . }}-signing-key
|
||||
secret:
|
||||
secretName: {{ default (print ( include "dendrite.fullname" . ) "-signing-key") $.Values.signing_key.existingSecret | quote }}
|
||||
{{- if (gt (len ($.Files.Glob "appservices/*")) 0) }}
|
||||
- name: {{ include "dendrite.fullname" . }}-appservices
|
||||
secret:
|
||||
secretName: {{ include "dendrite.fullname" . }}-appservices-conf
|
||||
{{- end }}
|
||||
- name: {{ include "dendrite.fullname" . }}-jetstream
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ default (print ( include "dendrite.fullname" . ) "-jetstream-pvc") $.Values.persistence.jetstream.existingClaim | quote }}
|
||||
- name: {{ include "dendrite.fullname" . }}-media
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ default (print ( include "dendrite.fullname" . ) "-media-pvc") $.Values.persistence.media.existingClaim | quote }}
|
||||
- name: {{ include "dendrite.fullname" . }}-search
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ default (print ( include "dendrite.fullname" . ) "-search-pvc") $.Values.persistence.search.existingClaim | quote }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
{{ . | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
{{- include "image.name" . | nindent 8 }}
|
||||
args:
|
||||
- '--config'
|
||||
- '/etc/dendrite/dendrite.yaml'
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8008
|
||||
protocol: TCP
|
||||
{{- if $.Values.dendrite_config.global.profiling.enabled }}
|
||||
env:
|
||||
- name: PPROFLISTEN
|
||||
value: "localhost:{{- $.Values.dendrite_config.global.profiling.port -}}"
|
||||
{{- end }}
|
||||
env:
|
||||
- name: HTTPS_PROXY
|
||||
value: "socks5://proxy:1080"
|
||||
resources:
|
||||
{{- toYaml $.Values.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/dendrite/
|
||||
name: {{ include "dendrite.fullname" . }}-conf-vol
|
||||
- mountPath: /etc/dendrite/secrets/
|
||||
name: {{ include "dendrite.fullname" . }}-signing-key
|
||||
{{- if (gt (len ($.Files.Glob "appservices/*")) 0) }}
|
||||
- mountPath: /etc/dendrite/appservices
|
||||
name: {{ include "dendrite.fullname" . }}-appservices
|
||||
readOnly: true
|
||||
{{ end }}
|
||||
- mountPath: {{ .Values.dendrite_config.media_api.base_path }}
|
||||
name: {{ include "dendrite.fullname" . }}-media
|
||||
- mountPath: {{ .Values.dendrite_config.global.jetstream.storage_path }}
|
||||
name: {{ include "dendrite.fullname" . }}-jetstream
|
||||
- mountPath: {{ .Values.dendrite_config.sync_api.search.index_path }}
|
||||
name: {{ include "dendrite.fullname" . }}-search
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
{{ . | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 10
|
||||
httpGet:
|
||||
path: /_dendrite/monitor/health
|
||||
port: http
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 10
|
||||
httpGet:
|
||||
path: /_dendrite/monitor/health
|
||||
port: http
|
||||
startupProbe:
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 10
|
||||
httpGet:
|
||||
path: /_dendrite/monitor/up
|
||||
port: http
|
||||
@@ -0,0 +1,116 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "dendrite.fullname" . -}}
|
||||
{{- $serverNameHost := .Values.dendrite_config.global.server_name -}}
|
||||
{{- $wellKnownServerHost := default $serverNameHost (regexFind "^(\\[.+\\])?[^:]*" .Values.dendrite_config.global.well_known_server_name) -}}
|
||||
{{- $wellKnownClientHost := default $serverNameHost (regexFind "//(\\[.+\\])?[^:/]*" .Values.dendrite_config.global.well_known_client_name | trimAll "/") -}}
|
||||
{{- $allHosts := list $serverNameHost $wellKnownServerHost $wellKnownClientHost | uniq -}}
|
||||
|
||||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
kubernetes.io/ingress.class: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if kindIs "slice" .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- else if .Values.ingress.tls.generate }}
|
||||
tls:
|
||||
- hosts:
|
||||
{{- range $allHosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ $fullName }}-ingress-tls
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hostName }}
|
||||
- host: {{ .Values.ingress.hostName | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $.Values.service.port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- host: {{ $serverNameHost | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: /.well-known/matrix
|
||||
pathType: Prefix
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $.Values.service.port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
- host: {{ $wellKnownServerHost | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range list "/_matrix/key" "/_matrix/federation" }}
|
||||
- path: {{ . | quote }}
|
||||
pathType: Prefix
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $.Values.service.port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- host: {{ $wellKnownClientHost | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range list "/_matrix/client" "/_matrix/media" }}
|
||||
- path: {{ . | quote }}
|
||||
pathType: Prefix
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $.Values.service.port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,100 @@
|
||||
{{ if and .Values.signing_key.create (not .Values.signing_key.existingSecret ) }}
|
||||
{{ $name := (print ( include "dendrite.fullname" . ) "-signing-key") }}
|
||||
{{ $secretName := (print ( include "dendrite.fullname" . ) "-signing-key") }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ $name }}
|
||||
labels:
|
||||
app.kubernetes.io/component: signingkey-job
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ $name }}
|
||||
labels:
|
||||
app.kubernetes.io/component: signingkey-job
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
- {{ $secretName }}
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ $name }}
|
||||
labels:
|
||||
app.kubernetes.io/component: signingkey-job
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ $name }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ $name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: generate-signing-key
|
||||
labels:
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: "Never"
|
||||
serviceAccount: {{ $name }}
|
||||
containers:
|
||||
- name: upload-key
|
||||
image: {{ $.Values.image.kubectl }}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
# check if key already exists
|
||||
key=$(kubectl get secret {{ $secretName }} -o jsonpath="{.data['signing\.key']}" 2> /dev/null)
|
||||
[ $? -ne 0 ] && echo "Failed to get existing secret" && exit 1
|
||||
[ -n "$key" ] && echo "Key already created, exiting." && exit 0
|
||||
# wait for signing key
|
||||
while [ ! -f /etc/dendrite/signing-key.pem ]; do
|
||||
echo "Waiting for signing key.."
|
||||
sleep 5;
|
||||
done
|
||||
# update secret
|
||||
kubectl patch secret {{ $secretName }} -p "{\"data\":{\"signing.key\":\"$(base64 /etc/dendrite/signing-key.pem | tr -d '\n')\"}}"
|
||||
[ $? -ne 0 ] && echo "Failed to update secret." && exit 1
|
||||
echo "Signing key successfully created."
|
||||
volumeMounts:
|
||||
- mountPath: /etc/dendrite/
|
||||
name: signing-key
|
||||
readOnly: true
|
||||
- name: generate-key
|
||||
{{- include "image.name" . | nindent 8 }}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
/usr/bin/generate-keys -private-key /etc/dendrite/signing-key.pem
|
||||
chown 1001:1001 /etc/dendrite/signing-key.pem
|
||||
volumeMounts:
|
||||
- mountPath: /etc/dendrite/
|
||||
name: signing-key
|
||||
volumes:
|
||||
- name: signing-key
|
||||
emptyDir: {}
|
||||
parallelism: 1
|
||||
completions: 1
|
||||
backoffLimit: 1
|
||||
{{ end }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- if and ( .Values.prometheus.rules.enabled ) ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) }}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "dendrite.fullname" . }}
|
||||
labels:
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
{{- with .Values.prometheus.rules.labels }}
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
groups:
|
||||
{{- if .Values.prometheus.rules.additionalRules }}
|
||||
- name: {{ template "dendrite.name" . }}-Additional
|
||||
rules: {{- toYaml .Values.prometheus.rules.additionalRules | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,69 @@
|
||||
{{ if not .Values.persistence.media.existingClaim }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
name: {{ include "dendrite.fullname" . }}-media-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.media.capacity }}
|
||||
{{ $storageClass := .Values.persistence.media.storageClass | default .Values.persistence.storageClass }}
|
||||
{{- if $storageClass }}
|
||||
{{- if (eq "-" $storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ $storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
{{ if not .Values.persistence.jetstream.existingClaim }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
name: {{ include "dendrite.fullname" . }}-jetstream-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.jetstream.capacity }}
|
||||
{{ $storageClass := .Values.persistence.jetstream.storageClass | default .Values.persistence.storageClass }}
|
||||
{{- if $storageClass }}
|
||||
{{- if (eq "-" $storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ $storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
{{ if not .Values.persistence.search.existingClaim }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
name: {{ include "dendrite.fullname" . }}-search-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.search.capacity }}
|
||||
{{ $storageClass := .Values.persistence.search.storageClass | default .Values.persistence.storageClass }}
|
||||
{{- if $storageClass }}
|
||||
{{- if (eq "-" $storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ $storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,45 @@
|
||||
{{- if (gt (len (.Files.Glob "appservices/*")) 0) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "dendrite.fullname" . }}-appservices-conf
|
||||
type: Opaque
|
||||
data:
|
||||
{{ (.Files.Glob "appservices/*").AsSecrets | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .Values.signing_key.create (not .Values.signing_key.existingSecret) }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
name: {{ include "dendrite.fullname" . }}-signing-key
|
||||
type: Opaque
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.dendrite_config.global.metrics }}
|
||||
{{- if .enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "dendrite.fullname" $ }}-metrics-basic-auth
|
||||
type: Opaque
|
||||
stringData:
|
||||
user: {{ .basic_auth.user | quote }}
|
||||
password: {{ .basic_auth.password | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "dendrite.fullname" . }}-conf
|
||||
type: Opaque
|
||||
stringData:
|
||||
dendrite.yaml: |
|
||||
{{ toYaml ( mustMergeOverwrite .Values.dendrite_config ( fromYaml (include "override.config" .) ) .Values.dendrite_config ) | nindent 4 }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{ template "validate.config" . }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
name: {{ include "dendrite.fullname" . }}
|
||||
labels:
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
{{- include "dendrite.selectorLabels" . | nindent 4 }}
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if and
|
||||
(and .Values.prometheus.servicemonitor.enabled .Values.dendrite_config.global.metrics.enabled )
|
||||
( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" )
|
||||
}}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "dendrite.fullname" . }}
|
||||
labels:
|
||||
{{- include "dendrite.labels" . | nindent 4 }}
|
||||
{{- with .Values.prometheus.servicemonitor.labels }}
|
||||
{{- . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
endpoints:
|
||||
- port: http
|
||||
basicAuth:
|
||||
username:
|
||||
name: {{ include "dendrite.fullname" . }}-metrics-basic-auth
|
||||
key: "user"
|
||||
password:
|
||||
name: {{ include "dendrite.fullname" . }}-metrics-basic-auth
|
||||
key: "password"
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "dendrite.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "dendrite.fullname" . }}-test-version"
|
||||
labels:
|
||||
{{- include "dendrite.selectorLabels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: curl
|
||||
image: curlimages/curl
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- 'http://{{- include "dendrite.fullname" . -}}:8008/_matrix/client/versions'
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,428 @@
|
||||
image:
|
||||
# -- Docker repository/image to use
|
||||
repository: "ghcr.io/matrix-org/dendrite-monolith"
|
||||
kubectl: "bitnami/kubectl"
|
||||
# -- Kubernetes pullPolicy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
|
||||
# signing key to use
|
||||
signing_key:
|
||||
# -- Create a new signing key, if not exists
|
||||
create: true
|
||||
# -- Use an existing secret
|
||||
existingSecret: ""
|
||||
|
||||
# -- Default resource requests/limits.
|
||||
# @default -- sets some sane default values
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
limits:
|
||||
memory: "4096Mi"
|
||||
|
||||
persistence:
|
||||
# -- The storage class to use for volume claims.
|
||||
# Used unless specified at the specific component.
|
||||
# Defaults to the cluster default storage class.
|
||||
# If defined, storageClassName: <storageClass>
|
||||
# If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
# If undefined (the default) or set to null, no storageClassName spec is
|
||||
# set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
# GKE, AWS & OpenStack)
|
||||
#
|
||||
storageClass:
|
||||
jetstream:
|
||||
# -- Use an existing volume claim for jetstream
|
||||
existingClaim: ""
|
||||
# -- PVC Storage Request for the jetstream volume
|
||||
capacity: "1Gi"
|
||||
# -- The storage class to use for volume claims.
|
||||
# Defaults to persistence.storageClass
|
||||
# If defined, storageClassName: <storageClass>
|
||||
# If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
# If undefined (the default) or set to null, no storageClassName spec is
|
||||
# set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
# GKE, AWS & OpenStack)
|
||||
storageClass:
|
||||
media:
|
||||
# -- Use an existing volume claim for media files
|
||||
existingClaim: ""
|
||||
# -- PVC Storage Request for the media volume
|
||||
capacity: "1Gi"
|
||||
# -- The storage class to use for volume claims.
|
||||
# Defaults to persistence.storageClass
|
||||
# If defined, storageClassName: <storageClass>
|
||||
# If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
# If undefined (the default) or set to null, no storageClassName spec is
|
||||
# set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
# GKE, AWS & OpenStack)
|
||||
storageClass:
|
||||
search:
|
||||
# -- Use an existing volume claim for the fulltext search index
|
||||
existingClaim: ""
|
||||
# -- PVC Storage Request for the search volume
|
||||
capacity: "1Gi"
|
||||
# -- The storage class to use for volume claims.
|
||||
# Defaults to persistence.storageClass
|
||||
# If defined, storageClassName: <storageClass>
|
||||
# If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
# If undefined (the default) or set to null, no storageClassName spec is
|
||||
# set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
# GKE, AWS & OpenStack)
|
||||
storageClass:
|
||||
|
||||
# -- Add additional volumes to the Dendrite Pod
|
||||
extraVolumes: []
|
||||
# ex.
|
||||
# - name: extra-config
|
||||
# secret:
|
||||
# secretName: extra-config
|
||||
|
||||
# -- Configure additional mount points volumes in the Dendrite Pod
|
||||
extraVolumeMounts: []
|
||||
# ex.
|
||||
# - mountPath: /etc/dendrite/extra-config
|
||||
# name: extra-config
|
||||
|
||||
strategy:
|
||||
# -- Strategy to use for rolling updates (e.g. Recreate, RollingUpdate)
|
||||
# If you are using ReadWriteOnce volumes, you should probably use Recreate
|
||||
type: Recreate
|
||||
rollingUpdate:
|
||||
# -- Maximum number of pods that can be unavailable during the update process
|
||||
maxUnavailable: 25%
|
||||
# -- Maximum number of pods that can be scheduled above the desired number of pods
|
||||
maxSurge: 25%
|
||||
|
||||
dendrite_config:
|
||||
version: 2
|
||||
global:
|
||||
# -- **REQUIRED** Servername for this Dendrite deployment.
|
||||
server_name: ""
|
||||
|
||||
# -- The private key to use. (**NOTE**: This is overriden in Helm)
|
||||
private_key: /etc/dendrite/secrets/signing.key
|
||||
|
||||
# -- The server name to delegate server-server communications to, with optional port
|
||||
# e.g. localhost:443
|
||||
well_known_server_name: ""
|
||||
|
||||
# -- The server name to delegate client-server communications to, with optional port
|
||||
# e.g. localhost:443
|
||||
well_known_client_name: ""
|
||||
|
||||
# -- Lists of domains that the server will trust as identity servers to verify third
|
||||
# party identifiers such as phone numbers and email addresses.
|
||||
trusted_third_party_id_servers:
|
||||
- matrix.org
|
||||
- vector.im
|
||||
|
||||
# -- The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
|
||||
# to old signing keys that were formerly in use on this domain name. These
|
||||
# keys will not be used for federation request or event signing, but will be
|
||||
# provided to any other homeserver that asks when trying to verify old events.
|
||||
old_private_keys:
|
||||
# If the old private key file is available:
|
||||
# - private_key: old_matrix_key.pem
|
||||
# expired_at: 1601024554498
|
||||
# If only the public key (in base64 format) and key ID are known:
|
||||
# - public_key: mn59Kxfdq9VziYHSBzI7+EDPDcBS2Xl7jeUdiiQcOnM=
|
||||
# key_id: ed25519:mykeyid
|
||||
# expired_at: 1601024554498
|
||||
|
||||
# -- Disable federation. Dendrite will not be able to make any outbound HTTP requests
|
||||
# to other servers and the federation API will not be exposed.
|
||||
disable_federation: false
|
||||
|
||||
key_validity_period: 168h0m0s
|
||||
|
||||
database:
|
||||
# -- The connection string for connections to Postgres.
|
||||
# This will be set automatically if using the Postgres dependency
|
||||
connection_string: ""
|
||||
|
||||
# -- Default database maximum open connections
|
||||
max_open_conns: 90
|
||||
# -- Default database maximum idle connections
|
||||
max_idle_conns: 5
|
||||
# -- Default database maximum lifetime
|
||||
conn_max_lifetime: -1
|
||||
|
||||
jetstream:
|
||||
# -- Persistent directory to store JetStream streams in.
|
||||
storage_path: "/data/jetstream"
|
||||
# -- NATS JetStream server addresses if not using internal NATS.
|
||||
addresses: []
|
||||
# -- The prefix for JetStream streams
|
||||
topic_prefix: "Dendrite"
|
||||
# -- Keep all data in memory. (**NOTE**: This is overriden in Helm to `false`)
|
||||
in_memory: false
|
||||
# -- Disables TLS validation. This should **NOT** be used in production.
|
||||
disable_tls_validation: true
|
||||
|
||||
cache:
|
||||
# -- The estimated maximum size for the global cache in bytes, or in terabytes,
|
||||
# gigabytes, megabytes or kilobytes when the appropriate 'tb', 'gb', 'mb' or
|
||||
# 'kb' suffix is specified. Note that this is not a hard limit, nor is it a
|
||||
# memory limit for the entire process. A cache that is too small may ultimately
|
||||
# provide little or no benefit.
|
||||
max_size_estimated: 1gb
|
||||
# -- The maximum amount of time that a cache entry can live for in memory before
|
||||
# it will be evicted and/or refreshed from the database. Lower values result in
|
||||
# easier admission of new cache entries but may also increase database load in
|
||||
# comparison to higher values, so adjust conservatively. Higher values may make
|
||||
# it harder for new items to make it into the cache, e.g. if new rooms suddenly
|
||||
# become popular.
|
||||
max_age: 1h
|
||||
|
||||
report_stats:
|
||||
# -- Configures phone-home statistics reporting. These statistics contain the server
|
||||
# name, number of active users and some information on your deployment config.
|
||||
# We use this information to understand how Dendrite is being used in the wild.
|
||||
enabled: false
|
||||
# -- Endpoint to report statistics to.
|
||||
endpoint: https://matrix.org/report-usage-stats/push
|
||||
|
||||
presence:
|
||||
# -- Controls whether we receive presence events from other servers
|
||||
enable_inbound: false
|
||||
# -- Controls whether we send presence events for our local users to other servers.
|
||||
# (_May increase CPU/memory usage_)
|
||||
enable_outbound: false
|
||||
|
||||
server_notices:
|
||||
# -- Server notices allows server admins to send messages to all users on the server.
|
||||
enabled: false
|
||||
# -- The local part for the user sending server notices.
|
||||
local_part: "_server"
|
||||
# -- The display name for the user sending server notices.
|
||||
display_name: "Server Alerts"
|
||||
# -- The avatar URL (as a mxc:// URL) name for the user sending server notices.
|
||||
avatar_url: ""
|
||||
# The room name to be used when sending server notices. This room name will
|
||||
# appear in user clients.
|
||||
room_name: "Server Alerts"
|
||||
|
||||
# prometheus metrics
|
||||
metrics:
|
||||
# -- Whether or not Prometheus metrics are enabled.
|
||||
enabled: false
|
||||
# HTTP basic authentication to protect access to monitoring.
|
||||
basic_auth:
|
||||
# -- HTTP basic authentication username
|
||||
user: "metrics"
|
||||
# -- HTTP basic authentication password
|
||||
password: metrics
|
||||
|
||||
dns_cache:
|
||||
# -- Whether or not the DNS cache is enabled.
|
||||
enabled: false
|
||||
# -- Maximum number of entries to hold in the DNS cache
|
||||
cache_size: 256
|
||||
# -- Duration for how long DNS cache items should be considered valid ([see time.ParseDuration](https://pkg.go.dev/time#ParseDuration) for more)
|
||||
cache_lifetime: "10m"
|
||||
|
||||
profiling:
|
||||
# -- Enable pprof. You will need to manually create a port forwarding to the deployment to access PPROF,
|
||||
# as it will only listen on localhost and the defined port.
|
||||
# e.g. `kubectl port-forward deployments/dendrite 65432:65432`
|
||||
enabled: false
|
||||
# -- pprof port, if enabled
|
||||
port: 65432
|
||||
|
||||
# -- Configuration for experimental MSC's. (Valid values are: msc2836)
|
||||
mscs:
|
||||
mscs: []
|
||||
# A list of enabled MSC's
|
||||
# Currently valid values are:
|
||||
# - msc2836 (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
|
||||
|
||||
app_service_api:
|
||||
# -- Disable the validation of TLS certificates of appservices. This is
|
||||
# not recommended in production since it may allow appservice traffic
|
||||
# to be sent to an insecure endpoint.
|
||||
disable_tls_validation: false
|
||||
# -- Appservice config files to load on startup. (**NOTE**: This is overriden by Helm, if a folder `./appservices/` exists)
|
||||
config_files: []
|
||||
|
||||
client_api:
|
||||
# -- Prevents new users from being able to register on this homeserver, except when
|
||||
# using the registration shared secret below.
|
||||
registration_disabled: true
|
||||
|
||||
# Prevents new guest accounts from being created. Guest registration is also
|
||||
# disabled implicitly by setting 'registration_disabled' above.
|
||||
guests_disabled: true
|
||||
|
||||
# -- If set, allows registration by anyone who knows the shared secret, regardless of
|
||||
# whether registration is otherwise disabled.
|
||||
registration_shared_secret: ""
|
||||
|
||||
# -- enable reCAPTCHA registration
|
||||
enable_registration_captcha: false
|
||||
# -- reCAPTCHA public key
|
||||
recaptcha_public_key: ""
|
||||
# -- reCAPTCHA private key
|
||||
recaptcha_private_key: ""
|
||||
# -- reCAPTCHA bypass secret
|
||||
recaptcha_bypass_secret: ""
|
||||
recaptcha_siteverify_api: ""
|
||||
|
||||
# TURN server information that this homeserver should send to clients.
|
||||
turn:
|
||||
# -- Duration for how long users should be considered valid ([see time.ParseDuration](https://pkg.go.dev/time#ParseDuration) for more)
|
||||
turn_user_lifetime: "24h"
|
||||
turn_uris: []
|
||||
turn_shared_secret: ""
|
||||
# -- The TURN username
|
||||
turn_username: ""
|
||||
# -- The TURN password
|
||||
turn_password: ""
|
||||
|
||||
rate_limiting:
|
||||
# -- Enable rate limiting
|
||||
enabled: true
|
||||
# -- After how many requests a rate limit should be activated
|
||||
threshold: 20
|
||||
# -- Cooloff time in milliseconds
|
||||
cooloff_ms: 500
|
||||
# -- Users which should be exempt from rate limiting
|
||||
exempt_user_ids:
|
||||
|
||||
federation_api:
|
||||
# -- Federation failure threshold. How many consecutive failures that we should
|
||||
# tolerate when sending federation requests to a specific server. The backoff
|
||||
# is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds, etc.
|
||||
# The default value is 16 if not specified, which is circa 18 hours.
|
||||
send_max_retries: 16
|
||||
# -- Disable TLS validation. This should **NOT** be used in production.
|
||||
disable_tls_validation: false
|
||||
prefer_direct_fetch: false
|
||||
# -- Prevents Dendrite from keeping HTTP connections
|
||||
# open for reuse for future requests. Connections will be closed quicker
|
||||
# but we may spend more time on TLS handshakes instead.
|
||||
disable_http_keepalives: false
|
||||
# -- Perspective keyservers, to use as a backup when direct key fetch
|
||||
# requests don't succeed.
|
||||
# @default -- See value.yaml
|
||||
key_perspectives:
|
||||
- server_name: matrix.org
|
||||
keys:
|
||||
- key_id: ed25519:auto
|
||||
public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
|
||||
- key_id: ed25519:a_RXGa
|
||||
public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
|
||||
|
||||
media_api:
|
||||
# -- The path to store media files (e.g. avatars) in
|
||||
base_path: "/data/media_store"
|
||||
# -- The max file size for uploaded media files
|
||||
max_file_size_bytes: 10485760
|
||||
# Whether to dynamically generate thumbnails if needed.
|
||||
dynamic_thumbnails: false
|
||||
# -- The maximum number of simultaneous thumbnail generators to run.
|
||||
max_thumbnail_generators: 10
|
||||
# -- A list of thumbnail sizes to be generated for media content.
|
||||
# @default -- See value.yaml
|
||||
thumbnail_sizes:
|
||||
- width: 32
|
||||
height: 32
|
||||
method: crop
|
||||
- width: 96
|
||||
height: 96
|
||||
method: crop
|
||||
- width: 640
|
||||
height: 480
|
||||
method: scale
|
||||
|
||||
sync_api:
|
||||
# -- This option controls which HTTP header to inspect to find the real remote IP
|
||||
# address of the client. This is likely required if Dendrite is running behind
|
||||
# a reverse proxy server.
|
||||
real_ip_header: X-Real-IP
|
||||
# -- Configuration for the full-text search engine.
|
||||
search:
|
||||
# -- Whether fulltext search is enabled.
|
||||
enabled: true
|
||||
# -- The path to store the search index in.
|
||||
index_path: "/data/search"
|
||||
# -- The language most likely to be used on the server - used when indexing, to
|
||||
# ensure the returned results match expectations. A full list of possible languages
|
||||
# can be found [here](https://github.com/matrix-org/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46)
|
||||
language: "en"
|
||||
|
||||
user_api:
|
||||
# -- bcrypt cost to use when hashing passwords.
|
||||
# (ranges from 4-31; 4 being least secure, 31 being most secure; _NOTE: Using a too high value can cause clients to timeout and uses more CPU._)
|
||||
bcrypt_cost: 10
|
||||
# -- OpenID Token lifetime in milliseconds.
|
||||
openid_token_lifetime_ms: 3600000
|
||||
# - Disable TLS validation when hitting push gateways. This should **NOT** be used in production.
|
||||
push_gateway_disable_tls_validation: false
|
||||
# -- Rooms to join users to after registration
|
||||
auto_join_rooms: []
|
||||
|
||||
# -- Default logging configuration
|
||||
logging:
|
||||
- type: std
|
||||
level: info
|
||||
|
||||
postgresql:
|
||||
# -- Enable and configure postgres as the database for dendrite.
|
||||
# @default -- See value.yaml
|
||||
enabled: false
|
||||
image:
|
||||
repository: bitnami/postgresql
|
||||
tag: "16.2.0"
|
||||
auth:
|
||||
username: dendrite
|
||||
password: changeme
|
||||
database: dendrite
|
||||
|
||||
persistence:
|
||||
enabled: false
|
||||
|
||||
ingress:
|
||||
# -- Create an ingress for the deployment
|
||||
enabled: false
|
||||
# -- The ingressClass to use. Will be converted to annotation if not yet supported.
|
||||
className: ""
|
||||
# -- Extra, custom annotations
|
||||
annotations: {}
|
||||
# -- The ingress hostname for your matrix server.
|
||||
# Should align with the server_name and well_known_* hosts.
|
||||
# If not set, generated from the dendrite_config values.
|
||||
hostName: ""
|
||||
# -- TLS configuration. Should contain information for the server_name and well-known hosts.
|
||||
# Alternatively, set tls.generate=true to generate defaults based on the dendrite_config.
|
||||
tls: []
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8008
|
||||
|
||||
prometheus:
|
||||
servicemonitor:
|
||||
# -- Enable ServiceMonitor for Prometheus-Operator for scrape metric-endpoint
|
||||
enabled: false
|
||||
# -- Extra Labels on ServiceMonitor for selector of Prometheus Instance
|
||||
labels: {}
|
||||
rules:
|
||||
# -- Enable PrometheusRules for Prometheus-Operator for setup alerting
|
||||
enabled: false
|
||||
# -- Extra Labels on PrometheusRules for selector of Prometheus Instance
|
||||
labels: {}
|
||||
# -- additional alertrules (no default alertrules are provided)
|
||||
additionalRules: []
|
||||
|
||||
grafana:
|
||||
dashboards:
|
||||
enabled: false
|
||||
# -- Extra Labels on ConfigMap for selector of grafana sidecar
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
# -- Extra Annotations on ConfigMap additional config in grafana sidecar
|
||||
annotations: {}
|
||||
@@ -3,4 +3,4 @@ dependencies:
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 14.2.3
|
||||
digest: sha256:9a752ef85baa3c754e9569b2cd08cb15bf8e9d182716f0296e853ce15e918c27
|
||||
generated: "2024-04-09T08:24:44.156192866Z"
|
||||
generated: "2025-01-16T18:45:16.873847536Z"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.13.7
|
||||
appVersion: 0.14.1
|
||||
dependencies:
|
||||
- condition: postgresql.enabled
|
||||
name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 14.2.3
|
||||
description: Dendrite Matrix Homeserver
|
||||
home: https://github.com/matrix-org/dendrite
|
||||
home: https://github.com/element-hq/dendrite
|
||||
icon: https://avatars.githubusercontent.com/u/8418310?s=48&v=4
|
||||
keywords:
|
||||
- matrix
|
||||
@@ -15,6 +15,6 @@ keywords:
|
||||
- dendrite
|
||||
name: dendrite
|
||||
sources:
|
||||
- https://github.com/matrix-org/dendrite
|
||||
- https://github.com/element-hq/dendrite
|
||||
type: application
|
||||
version: 0.14.1
|
||||
version: 0.15.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
# dendrite
|
||||
|
||||
  
|
||||
  
|
||||
Dendrite Matrix Homeserver
|
||||
|
||||
Status: **NOT PRODUCTION READY**
|
||||
@@ -32,7 +32,7 @@ Create a folder `appservices` and place your configurations in there. The confi
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/matrix-org/dendrite>
|
||||
* <https://github.com/element-hq/dendrite>
|
||||
## Requirements
|
||||
|
||||
| Repository | Name | Version |
|
||||
@@ -42,9 +42,10 @@ Create a folder `appservices` and place your configurations in there. The confi
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| image.repository | string | `"ghcr.io/matrix-org/dendrite-monolith"` | Docker repository/image to use |
|
||||
| image.repository | string | `"ghcr.io/element-hq/dendrite-monolith"` | Docker repository/image to use |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | Kubernetes pullPolicy |
|
||||
| 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.existingSecret | string | `""` | Use an existing secret |
|
||||
| resources | object | sets some sane default values | Default resource requests/limits. |
|
||||
@@ -58,11 +59,15 @@ Create a folder `appservices` and place your configurations in there. The confi
|
||||
| persistence.search.existingClaim | string | `""` | Use an existing volume claim for the fulltext search index |
|
||||
| persistence.search.capacity | string | `"1Gi"` | PVC Storage Request for the search volume |
|
||||
| persistence.search.storageClass | string | `nil` | The storage class to use for volume claims. Defaults to persistence.storageClass If defined, storageClassName: <storageClass> If set to "-", storageClassName: "", which disables dynamic provisioning If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack) |
|
||||
| extraArgs | list | `[]` | Add additional arguments to the dendrite command |
|
||||
| extraVolumes | list | `[]` | Add additional volumes to the Dendrite Pod |
|
||||
| extraVolumeMounts | list | `[]` | Configure additional mount points volumes in the Dendrite Pod |
|
||||
| strategy.type | string | `"Recreate"` | Strategy to use for rolling updates (e.g. Recreate, RollingUpdate) If you are using ReadWriteOnce volumes, you should probably use Recreate |
|
||||
| strategy.rollingUpdate.maxUnavailable | string | `"25%"` | Maximum number of pods that can be unavailable during the update process |
|
||||
| strategy.rollingUpdate.maxSurge | string | `"25%"` | Maximum number of pods that can be scheduled above the desired number of pods |
|
||||
| nodeSelector | object | `{}` | Node selector configuration |
|
||||
| tolerations | object | `{}` | Tolerations configuration |
|
||||
| affinity | object | `{}` | Affinity configuration |
|
||||
| dendrite_config.version | int | `2` | |
|
||||
| dendrite_config.global.server_name | string | `""` | **REQUIRED** Servername for this Dendrite deployment. |
|
||||
| dendrite_config.global.private_key | string | `"/etc/dendrite/secrets/signing.key"` | The private key to use. (**NOTE**: This is overriden in Helm) |
|
||||
@@ -134,7 +139,7 @@ Create a folder `appservices` and place your configurations in there. The confi
|
||||
| dendrite_config.sync_api.search | object | `{"enabled":true,"index_path":"/data/search","language":"en"}` | Configuration for the full-text search engine. |
|
||||
| dendrite_config.sync_api.search.enabled | bool | `true` | Whether fulltext search is enabled. |
|
||||
| dendrite_config.sync_api.search.index_path | string | `"/data/search"` | The path to store the search index in. |
|
||||
| dendrite_config.sync_api.search.language | string | `"en"` | The language most likely to be used on the server - used when indexing, to ensure the returned results match expectations. A full list of possible languages can be found [here](https://github.com/matrix-org/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) |
|
||||
| dendrite_config.sync_api.search.language | string | `"en"` | The language most likely to be used on the server - used when indexing, to ensure the returned results match expectations. A full list of possible languages can be found [here](https://github.com/element-hq/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46) |
|
||||
| dendrite_config.user_api.bcrypt_cost | int | `10` | bcrypt cost to use when hashing passwords. (ranges from 4-31; 4 being least secure, 31 being most secure; _NOTE: Using a too high value can cause clients to timeout and uses more CPU._) |
|
||||
| dendrite_config.user_api.openid_token_lifetime_ms | int | `3600000` | OpenID Token lifetime in milliseconds. |
|
||||
| dendrite_config.user_api.push_gateway_disable_tls_validation | bool | `false` | |
|
||||
@@ -189,5 +194,3 @@ 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`)
|
||||
|
||||
----------------------------------------------
|
||||
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "Dendrite dashboard from https://github.com/matrix-org/dendrite/",
|
||||
"description": "Dendrite dashboard from https://github.com/element-hq/dendrite/",
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"gnetId": 13916,
|
||||
@@ -95,9 +95,7 @@
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"calcs": ["lastNotNull"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
@@ -191,10 +189,7 @@
|
||||
"id": 6,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull"
|
||||
],
|
||||
"calcs": ["mean", "lastNotNull"],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true
|
||||
@@ -326,10 +321,7 @@
|
||||
"id": 10,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"lastNotNull"
|
||||
],
|
||||
"calcs": ["mean", "lastNotNull"],
|
||||
"displayMode": "table",
|
||||
"placement": "right",
|
||||
"showLegend": true
|
||||
@@ -384,10 +376,7 @@
|
||||
"refresh": "10s",
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"matrix",
|
||||
"dendrite"
|
||||
],
|
||||
"tags": ["matrix", "dendrite"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
@@ -411,12 +400,8 @@
|
||||
{
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
"text": ["All"],
|
||||
"value": ["$__all"]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{- define "validate.config" }}
|
||||
{{- if and (not .Values.signing_key.create) (eq .Values.signing_key.existingSecret "") -}}
|
||||
{{- fail "You must create a signing key for configuration.signing_key OR specify an existing secret name in .Values.signing_key.existingSecret to mount it. (see https://github.com/matrix-org/dendrite/blob/master/docs/INSTALL.md#server-key-generation)" -}}
|
||||
{{- fail "You must create a signing key for configuration.signing_key OR specify an existing secret name in .Values.signing_key.existingSecret to mount it. (see https://github.com/element-hq/dendrite/blob/master/docs/INSTALL.md#server-key-generation)" -}}
|
||||
{{- end -}}
|
||||
{{- if and (not .Values.postgresql.enabled) (eq .Values.dendrite_config.global.database.connection_string "") -}}
|
||||
{{- fail "Database connection string must be set." -}}
|
||||
|
||||
@@ -56,6 +56,9 @@ spec:
|
||||
args:
|
||||
- '--config'
|
||||
- '/etc/dendrite/dendrite.yaml'
|
||||
{{- with .Values.extraArgs }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8008
|
||||
@@ -65,9 +68,6 @@ spec:
|
||||
- name: PPROFLISTEN
|
||||
value: "localhost:{{- $.Values.dendrite_config.global.profiling.port -}}"
|
||||
{{- end }}
|
||||
env:
|
||||
- name: HTTPS_PROXY
|
||||
value: "socks5://proxy:1080"
|
||||
resources:
|
||||
{{- toYaml $.Values.resources | nindent 10 }}
|
||||
volumeMounts:
|
||||
@@ -113,3 +113,19 @@ spec:
|
||||
httpGet:
|
||||
path: /_dendrite/monitor/up
|
||||
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 }}
|
||||
@@ -54,11 +54,15 @@ metadata:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
{{ . | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
restartPolicy: "Never"
|
||||
serviceAccount: {{ $name }}
|
||||
containers:
|
||||
- name: upload-key
|
||||
image: {{ $.Values.image.kubectl }}
|
||||
image: bitnami/kubectl
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
@@ -94,6 +98,18 @@ spec:
|
||||
volumes:
|
||||
- name: signing-key
|
||||
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
|
||||
completions: 1
|
||||
backoffLimit: 1
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
image:
|
||||
# -- Docker repository/image to use
|
||||
repository: "ghcr.io/matrix-org/dendrite-monolith"
|
||||
kubectl: "bitnami/kubectl"
|
||||
repository: "ghcr.io/element-hq/dendrite-monolith"
|
||||
# -- Kubernetes pullPolicy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Overrides the image tag whose default is the chart appVersion.
|
||||
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:
|
||||
@@ -74,6 +77,9 @@ persistence:
|
||||
# GKE, AWS & OpenStack)
|
||||
storageClass:
|
||||
|
||||
# -- Add additional arguments to the dendrite command
|
||||
extraArgs: []
|
||||
|
||||
# -- Add additional volumes to the Dendrite Pod
|
||||
extraVolumes: []
|
||||
# ex.
|
||||
@@ -97,6 +103,15 @@ strategy:
|
||||
# -- Maximum number of pods that can be scheduled above the desired number of pods
|
||||
maxSurge: 25%
|
||||
|
||||
# -- Node selector configuration
|
||||
nodeSelector: {}
|
||||
|
||||
# -- Tolerations configuration
|
||||
tolerations: {}
|
||||
|
||||
# -- Affinity configuration
|
||||
affinity: {}
|
||||
|
||||
dendrite_config:
|
||||
version: 2
|
||||
global:
|
||||
@@ -235,7 +250,8 @@ dendrite_config:
|
||||
|
||||
# -- Configuration for experimental MSC's. (Valid values are: msc2836)
|
||||
mscs:
|
||||
mscs: []
|
||||
mscs:
|
||||
[]
|
||||
# A list of enabled MSC's
|
||||
# Currently valid values are:
|
||||
# - msc2836 (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
|
||||
@@ -351,7 +367,7 @@ dendrite_config:
|
||||
index_path: "/data/search"
|
||||
# -- The language most likely to be used on the server - used when indexing, to
|
||||
# ensure the returned results match expectations. A full list of possible languages
|
||||
# can be found [here](https://github.com/matrix-org/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46)
|
||||
# can be found [here](https://github.com/element-hq/dendrite/blob/76db8e90defdfb9e61f6caea8a312c5d60bcc005/internal/fulltext/bleve.go#L25-L46)
|
||||
language: "en"
|
||||
|
||||
user_api:
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ persistence:
|
||||
storageClass: nfs-client
|
||||
|
||||
image:
|
||||
tag: v0.14.0
|
||||
tag: v0.14.1
|
||||
kubectl: cr.wetofu.me/docker.io/bitnami/kubectl:1.23
|
||||
pullPolicy: IfNotPresent
|
||||
repository: ghcr.io/element-hq/dendrite-monolith
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
kind: Configmap
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: webdav
|
||||
|
||||
@@ -37,7 +37,7 @@ spec:
|
||||
- secretRef:
|
||||
name: transmission
|
||||
resources:
|
||||
{{- toYaml .Values.resources.transmission | nindent 10 }}
|
||||
{{- toYaml .Values.resources.transmission | nindent 12 }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.ports.transmission.web }}
|
||||
name: web
|
||||
|
||||
@@ -11,11 +11,11 @@ webdav:
|
||||
|
||||
images:
|
||||
transmission:
|
||||
repository: linuxserver/transmission
|
||||
repository: cr.wetofu.me/linuxserver/transmission
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
webdav:
|
||||
repository: bytemark/webdav
|
||||
repository: cr.wetofu.me/bytemark/webdav
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.47.2
|
||||
description: A Helm chart for trillium notes.
|
||||
maintainers:
|
||||
- name: ohdearaugustin
|
||||
url: https://github.com/ohdearaugustin
|
||||
name: trilium-notes
|
||||
type: application
|
||||
version: 0.1.2
|
||||
@@ -0,0 +1,21 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "trilium-notes.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "trilium-notes.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "trilium-notes.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "trilium-notes.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||
{{- end }}
|
||||
@@ -0,0 +1,63 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "trilium-notes.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "trilium-notes.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "trilium-notes.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "trilium-notes.labels" -}}
|
||||
helm.sh/chart: {{ include "trilium-notes.chart" . }}
|
||||
{{ include "trilium-notes.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "trilium-notes.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "trilium-notes.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "trilium-notes.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "trilium-notes.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,41 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "trilium-notes.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "trilium-notes.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ . }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "trilium-notes.fullname" . }}-headless
|
||||
labels:
|
||||
{{- include "trilium-notes.labels" . | nindent 4 }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
selector:
|
||||
{{- include "trilium-notes.selectorLabels" . | nindent 4 }}
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "trilium-notes.fullname" . }}
|
||||
labels:
|
||||
{{- include "trilium-notes.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
selector:
|
||||
{{- include "trilium-notes.selectorLabels" . | nindent 4 }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "trilium-notes.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "trilium-notes.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,88 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "trilium-notes.fullname" . }}
|
||||
labels:
|
||||
{{- include "trilium-notes.labels" . | nindent 4 }}
|
||||
spec:
|
||||
serviceName: {{ template "trilium-notes.fullname" . }}-headless
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "trilium-notes.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "trilium-notes.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "trilium-notes.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: TRILIUM_DATA_DIR
|
||||
value: "{{ .Values.dataDir }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: trilium-data
|
||||
mountPath: "{{ .Values.dataDir }}"
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.persistentVolume.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: trilium-data
|
||||
{{- if .Values.persistentVolume.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.persistentVolume.annotations | indent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{ toYaml .Values.persistentVolume.accessModes | indent 10 }}
|
||||
resources:
|
||||
requests:
|
||||
storage: "{{ .Values.persistentVolume.size }}"
|
||||
{{- if .Values.persistentVolume.storageClass }}
|
||||
{{- if (eq "-" .Values.persistentVolume.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.persistentVolume.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
volumes:
|
||||
- name: trilium-data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "trilium-notes.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "trilium-notes.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test-success
|
||||
spec:
|
||||
containers:
|
||||
- name: curl
|
||||
image: curlimages/curl:7.73.0
|
||||
command: ['curl']
|
||||
args: ['-v', '{{ include "trilium-notes.fullname" . }}:{{ .Values.service.port }}']
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,153 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema#",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"affinity": {
|
||||
"type": "object"
|
||||
},
|
||||
"dataDir": {
|
||||
"type": "string"
|
||||
},
|
||||
"fullnameOverride": {
|
||||
"type": "string"
|
||||
},
|
||||
"image": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pullPolicy": {
|
||||
"type": "string"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"imagePullSecrets": {
|
||||
"type": "array"
|
||||
},
|
||||
"ingress": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"type": "object"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hosts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
"type": "string"
|
||||
},
|
||||
"paths": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tls": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nameOverride": {
|
||||
"type": "string"
|
||||
},
|
||||
"nodeSelector": {
|
||||
"type": "object"
|
||||
},
|
||||
"persistentVolume": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"accessModes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"annotations": {
|
||||
"type": "object"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"size": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"podSecurityContext": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fsGroup": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"replicaCount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"resources": {
|
||||
"type": "object"
|
||||
},
|
||||
"securityContext": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allowPrivilegeEscalation": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"capabilities": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"drop": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"runAsNonRoot": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"runAsUser": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serviceAccount": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"type": "object"
|
||||
},
|
||||
"create": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "null"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tolerations": {
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
# yaml-language-server: $schema=./values.schema.json
|
||||
|
||||
# Default values for trilium-notes.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: zadam/trilium
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
annotations: {}
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
podSecurityContext:
|
||||
fsGroup: 10000
|
||||
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10000
|
||||
allowPrivilegeEscalation: false
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
dataDir: /srv/trilium-data
|
||||
|
||||
persistentVolume:
|
||||
enabled: false
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
annotations: {}
|
||||
size: 2Gi
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths: []
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: xianyu-auto-reply
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: xianyu-auto-reply
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: xianyu-auto-reply
|
||||
spec:
|
||||
volumes:
|
||||
- name: data
|
||||
hostPath:
|
||||
path: /data/xianyu-auto-reply
|
||||
containers:
|
||||
- name: xianyu-auto-reply
|
||||
image: registry.cn-shanghai.aliyuncs.com/zhinian-software/xianyu-auto-reply:latest
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- mountPath: /app/data
|
||||
name: data
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "500m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "2"
|
||||
@@ -0,0 +1,5 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
|
||||
|
||||
resources:
|
||||
- deploy.yaml
|
||||
- services.yaml
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: xianyu-auto-reply
|
||||
spec:
|
||||
selector:
|
||||
app: xianyu-auto-reply
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
Reference in New Issue
Block a user