Skip to content

Commit 0d68775

Browse files
authored
SYS-668 database reconnect config for kea; bump grafana helm version (#249)
1 parent 3a047b2 commit 0d68775

11 files changed

Lines changed: 97 additions & 30 deletions

File tree

images/dhcpd-dns-pxe/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Serve DNS and DHCP from one or more small Alpine Linux container(s). This suppli
55

66
### Usage
77

8-
In kubernetes.yaml / docker-compose.yml, set the environment variables for your environment.
8+
In docker-compose.yml or helm, set the environment variables for your environment.
99

1010
Mount these under /etc:
1111

@@ -19,15 +19,15 @@ GRANT USAGE ON *.* TO `kea`@`%` IDENTIFIED BY '<password>';
1919
GRANT ALL PRIVILEGES ON `kea`.* TO `kea`@`%`;
2020
```
2121

22-
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
22+
If you're using Swarm, see the docker-compose.yml file provided here in the source directory. This repo has complete instructions for
2323
[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:
2424
~~~
2525
git clone https://github.com/instantlinux/docker-tools.git
2626
cd docker-tools/k8s
2727
make dhcpd-dns-pxe
2828
~~~
2929

30-
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.
30+
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.
3131

3232
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.
3333

images/dhcpd-dns-pxe/src/kea.conf.j2

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@
1212
"allocator": "random",
1313
"host-reservation-identifiers": [ "hw-address" ],
1414
"lease-database": {
15-
"type": "mysql",
16-
"host": "{{ DB_HOST }}",
17-
"name": "{{ DB_NAME }}",
18-
"user": "{{ DB_USER }}",
19-
"password": "{{ DB_PASS }}"
15+
"type": "mysql",
16+
"host": "{{ DB_HOST }}",
17+
"name": "{{ DB_NAME }}",
18+
"user": "{{ DB_USER }}",
19+
"password": "{{ DB_PASS }}",
20+
"max-reconnect-tries": 200,
21+
"on-fail": "stop-retry-exit",
22+
"reconnect-wait-time": 3000,
23+
"retry-on-startup": true
2024
},
2125
"max-valid-lifetime": 14400,
2226
"valid-lifetime": 3600,

images/dovecot/helm/Chart.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ sources:
77
- https://github.com/vdukhovni/dovecot
88
type: application
99
version: 0.1.11
10-
appVersion: "2.4.1-r2"
10+
# appVersion: "2.4.1-r2"
11+
appVersion: "2.3.21.1-r0"
1112
dependencies:
1213
- name: chartlib
1314
version: 0.1.8
1415
repository: https://instantlinux.github.io/docker-tools
1516
- name: data-sync
16-
version: 0.1.14
17+
version: 0.1.3
1718
repository: https://instantlinux.github.io/docker-tools

images/dovecot/helm/templates/configmap.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,23 @@ metadata:
77
{{- include "local.labels" . | nindent 4 }}
88
data:
99
dovecot.conf: |
10+
dovecot_config_version = 2.4
1011
auth_mechanisms = plain login
11-
disable_plaintext_auth = yes
12+
auth_allow_cleartext = no
1213
mail_access_groups = mail
1314
protocols = imap
14-
mail_location = mbox:~/Mail:INBOX=/var/spool/mail/%u
15+
# mail_location = mbox:~/Mail:INBOX=/var/spool/mail/%u
16+
mail_driver = mbox
17+
mail_path = ~/Mail
18+
mail_inbox_path = /var/spool/mail/%{user}
1519
mail_debug = no
1620
1721
first_valid_uid = 300
18-
passdb {
22+
passdb dovecot {
1923
driver = ldap
2024
args = /etc/dovecot/dovecot-ldap.conf
2125
}
22-
userdb {
26+
userdb dovecot {
2327
driver = passwd
2428
}
2529
service auth {
@@ -37,9 +41,11 @@ data:
3741
ssl = yes
3842
}
3943
}
40-
ssl_cert = </etc/ssl/certs/smtpd-cert.pem
41-
ssl_key = </etc/ssl/private/smtpd-key.pem
42-
ssl_min_protocol = TLSv1.1
44+
# ssl_cert = </etc/ssl/certs/smtpd-cert.pem
45+
# ssl_key = </etc/ssl/private/smtpd-key.pem
46+
ssl_min_protocol = TLSv1.2
47+
ssl_server_cert_file = /etc/ssl/certs/smtpd-cert.pem
48+
ssl_server_key_file = /etc/ssl/private/smtpd-key.pem
4349
syslog_facility = "local1"
4450
dovecot-ldap.conf: |
4551
hosts = {{ .Values.ldap.hosts }}

images/weewx/helm-nginx/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ home: https://github.com/instantlinux/docker-tools
55
sources:
66
- https://github.com/instantlinux/docker-tools
77
type: application
8-
version: 0.1.4
9-
appVersion: "1.27.3-alpine"
8+
version: 0.1.5
9+
appVersion: "1.29.3-alpine"
1010
dependencies:
1111
- name: chartlib
1212
version: 0.1.8

k8s/helm/grafana/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ sources:
66
- https://github.com/instantlinux/docker-tools
77
- https://github.com/grafana/grafana
88
type: application
9-
version: 0.1.2
10-
appVersion: 12.4.0
9+
version: 0.1.3
10+
appVersion: 12.3.1
1111
dependencies:
1212
- name: chartlib
1313
version: 0.1.8
1414
repository: https://instantlinux.github.io/docker-tools
1515
- name: prometheus
16-
version: 0.1.2
16+
version: 0.1.3
1717
repository: file://subcharts/prometheus
1818
condition: prometheus.enabled
1919
- name: alertmanager
20-
version: 0.1.0
20+
version: 0.1.1
2121
repository: file://subcharts/alertmanager
2222
condition: alertmanager.enabled

k8s/helm/grafana/subcharts/alertmanager/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sources:
66
- https://github.com/instantlinux/docker-tools
77
- https://hub.docker.com/r/prom/alertmanager
88
type: application
9-
version: 0.1.0
10-
appVersion: "v0.28.1"
9+
version: 0.1.1
10+
appVersion: "v0.30.1"
1111
dependencies:
1212
- name: chartlib
1313
version: 0.1.8

k8s/helm/grafana/subcharts/prometheus/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sources:
66
- https://github.com/instantlinux/docker-tools
77
- https://hub.docker.com/r/prom/prometheus
88
type: application
9-
version: 0.1.2
10-
appVersion: "v3.8.0"
9+
version: 0.1.3
10+
appVersion: "v3.9.1"
1111
dependencies:
1212
- name: chartlib
1313
version: 0.1.8

k8s/helm/synapse/subcharts/element/templates/configmap.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ data:
3333
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
3434
"defaultCountryCode": "{{ .Values.country_code }}",
3535
"show_labs_settings": false,
36-
"features": { },
36+
"features": {
37+
"feature_video_rooms": false,
38+
"feature_new_room_decoration_ui": true,
39+
"feature_group_calls": false,
40+
"feature_element_call_video_rooms": false,
41+
"feature_use_device_session_member_events": true
42+
},
3743
"default_federate": true,
3844
"default_theme": "light",
3945
"room_directory": {
@@ -48,5 +54,29 @@ data:
4854
},
4955
"jitsi": {
5056
"preferred_domain": "meet.element.io"
57+
},
58+
"element_call": {
59+
"url": "{{ .Values.call.widget_url }}",
60+
"participant_limit": 8,
61+
"brand": "Element Call",
62+
"use_exclusively": true
5163
}
5264
}
65+
client: |
66+
{
67+
"default_server_config": {
68+
"m.homeserver": {
69+
"base_url": "{{ .Values.homeserver_url }}",
70+
"server_name": "{{ .Values.server_name }}"
71+
},
72+
"m.identity_server": {
73+
"base_url": "https://vector.im"
74+
}
75+
},
76+
"org.matrix.msc4143.rtc_foci": [{
77+
"type": "livekit",
78+
"livekit_service_url": "{{ .Values.call.livekit_service_url }}"
79+
}]
80+
}
81+
element.json: |
82+
{"call": {"widget_url": "{{ .Values.call.widget_url }}" }}

k8s/helm/synapse/subcharts/element/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Default values for element.
2+
call:
3+
livekit_service_url: https://livekit.example.com
4+
widget_url: https://call.element.io
25
country_code: US
36
homeserver_url: https://synapse.example.com
47
room_directory_servers: [ "\"matrix.org\"" ]
@@ -16,6 +19,14 @@ volumeMounts:
1619
name: config
1720
readOnly: true
1821
subPath: config.json
22+
- mountPath: /app/.well-known/matrix/client
23+
name: config
24+
readOnly: true
25+
subPath: client
26+
- mountPath: /app/.well-known/element/element.json
27+
name: config
28+
readOnly: true
29+
subPath: element.json
1930
volumes:
2031
- name: config
2132
configMap:

0 commit comments

Comments
 (0)