Skip to content

Commit e7d377d

Browse files
committed
SYS-674 helm chart updates for auth protection of mythtv-backend
1 parent 98020ad commit e7d377d

2 files changed

Lines changed: 18 additions & 38 deletions

File tree

images/mythtv-backend/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@ The MythTV backend built under Ubuntu noble (24.04).
77

88
This image must be run in network_mode:host in order to communicate with HD Homerun tuners; assign a new IP address and hostname for this application, and define it as a secondary IP address on your Docker host's primary interface.
99

10-
For configuration, see the example docker-compose.yml (for swarm or standalone docker) or [helm](https://github.com/instantlinux/docker-tools/blob/main/images/helm) or kubernetes.yaml to run on bare-metal Kubernetes. Set environment variables and secrets as defined here, and customize volume mounts as desired. This repo has complete instructions for
11-
[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/mythtv-backend/helm) or [kubernetes.yaml](https://github.com/instantlinux/docker-tools/blob/main/images/mythtv-backend/kubernetes.yaml) using _make_ and customizing [Makefile.vars](https://github.com/instantlinux/docker-tools/blob/main/k8s/Makefile.vars) after cloning this repo:
10+
For configuration, see the example docker-compose.yml (for swarm or standalone docker) or [helm](https://github.com/instantlinux/docker-tools/blob/main/images/helm). Set variables and secrets as defined here, and customize volume mounts as desired. This repo has complete instructions for
11+
[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/mythtv-backend/helm) using _make_ and customizing [Makefile.vars](https://github.com/instantlinux/docker-tools/blob/main/k8s/Makefile.vars) after cloning this repo:
1212
~~~
1313
git clone https://github.com/instantlinux/docker-tools.git
1414
cd docker-tools/k8s
1515
make mythtv-backend
1616
~~~
1717

18-
If you have two Kubernetes nodes set up, run the kubernetes-ha.yaml to set up data sync between two identical drives across the nodes, and define a floating IP address. One copy of mythbackend will be running on one of the nodes at any given time, providing a simple high-availability configuration. See more details in the Makefile in k8s directory. The kubernetes.yaml sample provided here can also set up the mythweb virtual-host https://mythweb.yourdomain.com so you can schedule recordings when you're not home; create an htpasswd file with name _auth_ and then:
19-
~~~
20-
kubectl create secret generic mythweb-auth --from-file=auth
21-
~~~
18+
If you have two Kubernetes nodes set up, run the kubernetes-ha.yaml to set up data sync between two identical drives across the nodes, and define a floating IP address. One copy of mythbackend will be running on one of the nodes at any given time, providing a simple high-availability configuration. See more details in the Makefile in k8s directory. The kubernetes.yaml sample provided here can also set up the mythweb virtual-host https://mythweb.yourdomain.com so you can schedule recordings when you're not home.
2219

2320
You can also run this image directly (without compose or kubernetes) using environment variables and secrets files.
2421

@@ -43,7 +40,6 @@ Starting with v34, mythtv-setup is accessed via <pod-ip>:6544/setupwizard. Use t
4340
### Variables
4441
Variable | Default | Description
4542
-------- | ------- | -----------
46-
APACHE_LOG_DIR | /var/log/apache2 | Apache logs
4743
DBNAME | mythtv | Database name
4844
DBSERVER | db00 | Database server hostname
4945
LANG | en_US.UTF-8 |
@@ -69,11 +65,10 @@ Note that the [Kodi](https://kodi.tv/download/) frontend also provides limited s
6965

7066
### Volumes
7167

72-
Optionally, mount these path names to persistent storage:
68+
Optionally, mount this path name to persistent storage:
7369

7470
Path | Description
7571
---- | -----------
76-
/var/log/apache2 | Apache logs
7772
/etc/ssh | Host keys and configs for ssh
7873

7974
### Secrets
@@ -84,7 +79,6 @@ Secret | Description
8479
------ | -----------
8580
mythtv-db-password | Password of MythTV db user
8681
mythtv-user-password | Hashed password of MythTV ssh user
87-
mythweb-auth | htpasswd for mythweb user(s) under k8s
8882

8983
### Upgrade Notes
9084

images/mythtv-backend/helm/values.yaml

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,40 +85,26 @@ autoscaling:
8585
enabled: false
8686

8787
authelia:
88+
# To override, use tlsHostname at top level
8889
fqdn: authtotp.example.com
8990
ip: 10.101.1.5
91+
path: /Myth/LoginUser
9092
ingress:
9193
# This ingress exposes your MythTV schedule and operational controls to
92-
# the public Internet.
93-
# TODO: change default back to true once the setup wizard screens
94-
# are secured by the authentication framework.
94+
# the public Internet. Set up the admin user before enabling.
9595
enabled: false
96-
annotations:
97-
cert-manager.io/cluster-issuer: letsencrypt-prod
98-
kubernetes.io/ingress.class: nginx
99-
nginx.ingress.kubernetes.io/auth-type: basic
100-
nginx.ingress.kubernetes.io/auth-secret: mythweb-auth
101-
hosts:
102-
- host: mythweb.example.com
103-
paths:
104-
- path: /
105-
pathType: Prefix
106-
tls:
107-
- secretName: tls-mythtv-backend
108-
hosts:
109-
- mythweb.example.com
11096
ingressTOTP:
111-
annotations:
112-
cert-manager.io/cluster-issuer: letsencrypt-prod
113-
kubernetes.io/ingress.class: nginx
114-
hosts:
115-
- host: mythweb.example.com
116-
paths:
117-
- path: /settings
118-
pathType: Prefix
119-
tls:
120-
- secretName: tls-mythtv-backend
121-
hosts: [ mythweb.example.com ]
97+
# Enable this ingress for TOTP if you have Authelia installed,
98+
# along with an external DNS name.
99+
# TODO: this helm chart does trigger TOTP, but Authelia's login
100+
# splash page doesn't come up. The http-post operation to
101+
# /Myth/LoginUser fails to redirect. But you can manually
102+
# bring it up (e.g. https://authtotp.example.com) and authenticate
103+
# there, then come back to the MythTV dashboard's login link.
104+
# Fixing that is a low-priority, as ingress-nginx is deprecated
105+
# and there may be an easier way to implement TOTP under envoy
106+
# gateway.
107+
enabled: false
122108

123109
# Subchart data-sync, maintains persistent data across nodes
124110
data-sync:

0 commit comments

Comments
 (0)