From ca7183240f611aa9d578ee3a54e5faa047155e54 Mon Sep 17 00:00:00 2001 From: Rich Braun Date: Fri, 16 Jan 2026 08:26:22 -0800 Subject: [PATCH] SYS-668 database reconnect config for kea; bump grafana helm version --- images/dhcpd-dns-pxe/README.md | 6 ++-- images/dhcpd-dns-pxe/src/kea.conf.j2 | 14 +++++--- images/dovecot/helm/Chart.yaml | 5 +-- images/dovecot/helm/templates/configmap.yaml | 20 ++++++++---- images/weewx/helm-nginx/Chart.yaml | 4 +-- k8s/helm/grafana/Chart.yaml | 8 ++--- .../grafana/subcharts/alertmanager/Chart.yaml | 4 +-- .../grafana/subcharts/prometheus/Chart.yaml | 4 +-- .../element/templates/configmap.yaml | 32 ++++++++++++++++++- .../synapse/subcharts/element/values.yaml | 11 +++++++ k8s/helm/synapse/values.yaml | 19 +++++++++-- 11 files changed, 97 insertions(+), 30 deletions(-) diff --git a/images/dhcpd-dns-pxe/README.md b/images/dhcpd-dns-pxe/README.md index f3a4f735..71bb9cc4 100644 --- a/images/dhcpd-dns-pxe/README.md +++ b/images/dhcpd-dns-pxe/README.md @@ -5,7 +5,7 @@ Serve DNS and DHCP from one or more small Alpine Linux container(s). This suppli ### Usage -In kubernetes.yaml / docker-compose.yml, set the environment variables for your environment. +In docker-compose.yml or helm, set the environment variables for your environment. Mount these under /etc: @@ -19,7 +19,7 @@ GRANT USAGE ON *.* TO `kea`@`%` IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON `kea`.* TO `kea`@`%`; ``` -See the kubernetes.yaml provided here. If you're using Swarm, see the docker-compose.yml file provided here in the source directory. This repo has complete instructions for +If you're using Swarm, see the docker-compose.yml file provided here in the source directory. This repo has complete instructions for [building a kubernetes cluster](https://github.com/instantlinux/docker-tools/blob/main/k8s/README.md) where you can launch with [helm](https://github.com/instantlinux/docker-tools/tree/main/images/dhcpd-dns-pxe/helm), or [kubernetes.yaml](https://github.com/instantlinux/docker-tools/blob/main/images/dhcpd-dns-pxe/kubernetes.yaml) using _make_ and customizing [Makefile.vars](https://github.com/instantlinux/docker-tools/blob/main/k8s/Makefile.vars) after cloning this repo: ~~~ git clone https://github.com/instantlinux/docker-tools.git @@ -27,7 +27,7 @@ cd docker-tools/k8s make dhcpd-dns-pxe ~~~ -You can build a failsafe cluster of DHCP servers under kubernetes using the helm chart included here. Define a ConfigMap with your reservations defined as shown in kea documentation, and hosts defined as in the dnsmasq documentation. If a replica goes down, the others will continue to assign addresses. They won't conflict thanks to the way DHCP protocol works; a client will use the first address offered and ignore any additional offers from the server pool. Subsequent requests will be checked against the reservations database. +This builds a failsafe cluster of DHCP servers under kubernetes using the helm chart. Define a ConfigMap with your reservations defined as shown in kea documentation, and hosts defined as in the dnsmasq documentation. If a replica goes down, the others will continue to assign addresses. They won't conflict thanks to the way DHCP protocol works; a client will use the first address offered and ignore any additional offers from the server pool. Subsequent requests will be checked against the reservations database. Verified to work with a single subnet and with the limited set of DHCP/DNS options supported in environment vars defined here. Additional options as defined in the [dnsmasq man page](https://linux.die.net/man/8/dnsmasq) can be specified as any .conf file under /etc/dnsmasq.d/local volume mount, and for dhcpd as any .conf file under /etc/dhcpd.d/local. diff --git a/images/dhcpd-dns-pxe/src/kea.conf.j2 b/images/dhcpd-dns-pxe/src/kea.conf.j2 index cc1048b0..706ede5e 100644 --- a/images/dhcpd-dns-pxe/src/kea.conf.j2 +++ b/images/dhcpd-dns-pxe/src/kea.conf.j2 @@ -12,11 +12,15 @@ "allocator": "random", "host-reservation-identifiers": [ "hw-address" ], "lease-database": { - "type": "mysql", - "host": "{{ DB_HOST }}", - "name": "{{ DB_NAME }}", - "user": "{{ DB_USER }}", - "password": "{{ DB_PASS }}" + "type": "mysql", + "host": "{{ DB_HOST }}", + "name": "{{ DB_NAME }}", + "user": "{{ DB_USER }}", + "password": "{{ DB_PASS }}", + "max-reconnect-tries": 200, + "on-fail": "stop-retry-exit", + "reconnect-wait-time": 3000, + "retry-on-startup": true }, "max-valid-lifetime": 14400, "valid-lifetime": 3600, diff --git a/images/dovecot/helm/Chart.yaml b/images/dovecot/helm/Chart.yaml index bcb027d9..10e0c8f5 100644 --- a/images/dovecot/helm/Chart.yaml +++ b/images/dovecot/helm/Chart.yaml @@ -7,11 +7,12 @@ sources: - https://github.com/vdukhovni/dovecot type: application version: 0.1.11 -appVersion: "2.4.1-r2" + # appVersion: "2.4.1-r2" +appVersion: "2.3.21.1-r0" dependencies: - name: chartlib version: 0.1.8 repository: https://instantlinux.github.io/docker-tools - name: data-sync - version: 0.1.14 + version: 0.1.3 repository: https://instantlinux.github.io/docker-tools diff --git a/images/dovecot/helm/templates/configmap.yaml b/images/dovecot/helm/templates/configmap.yaml index 0df03c71..3f1634f8 100644 --- a/images/dovecot/helm/templates/configmap.yaml +++ b/images/dovecot/helm/templates/configmap.yaml @@ -7,19 +7,23 @@ metadata: {{- include "local.labels" . | nindent 4 }} data: dovecot.conf: | + dovecot_config_version = 2.4 auth_mechanisms = plain login - disable_plaintext_auth = yes + auth_allow_cleartext = no mail_access_groups = mail protocols = imap - mail_location = mbox:~/Mail:INBOX=/var/spool/mail/%u + # mail_location = mbox:~/Mail:INBOX=/var/spool/mail/%u + mail_driver = mbox + mail_path = ~/Mail + mail_inbox_path = /var/spool/mail/%{user} mail_debug = no first_valid_uid = 300 - passdb { + passdb dovecot { driver = ldap args = /etc/dovecot/dovecot-ldap.conf } - userdb { + userdb dovecot { driver = passwd } service auth { @@ -37,9 +41,11 @@ data: ssl = yes } } - ssl_cert = + # cp /config/homeserver.yaml /data/homeserver.yaml && + # /start.py generate # The synapse pod will then contain a /data/homeserver.yaml # with generated secrets from which you can add three more # keys to your secret: @@ -100,7 +104,6 @@ deployment: - -c - > apk add envsubst && - env > /config/vars && for file in $(find /templates -type f -exec basename {} \;); do envsubst < /templates/$file > /config/$file; done @@ -187,6 +190,18 @@ element: ingress: enabled: false +nginx: + # Enable this to serve .well-known service discovery on top-level + # FQDN if Synapse runs on a subdomain like matrix.example.com + enabled: false + tlsHostname: example.com + deployment: + env: + country_code: US + homeserver_url: https://synapse.example.com + room_directory_servers: [ matrix.org ] + server_name: My matrix instance + postgres: enabled: false statefulset: