1
0
Fork 0
Commit Graph

15 Commits (687775c595aea8f91eaf6c378609c99904079799)

Author SHA1 Message Date
Dustin 7c9737e092 kitchen: Update DTEX calendar URL
I wrote a Thunderbird add-on for my work computer that periodically
exports my entire DTEX calendar to a file.  Unfortunately, the file it
creates is not directly usable by the kitchen screen server currently;
it seems to use a time zone identifier that `tzinfo` doesn't understand:

```
Error in background update:
Traceback (most recent call last):
  File "/usr/local/kitchen/lib64/python3.12/site-packages/kitchen/service/agenda.py", line 19, in _background_update
    await self._update()
  File "/usr/local/kitchen/lib64/python3.12/site-packages/kitchen/service/agenda.py", line 34, in _update
    calendar = await self.fetch_calendar(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/kitchen/lib64/python3.12/site-packages/kitchen/service/caldav.py", line 39, in fetch_calendar
    return icalendar.Calendar.from_ical(r.text)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/kitchen/lib64/python3.12/site-packages/icalendar/cal.py", line 369, in from_ical
    _timezone_cache[component['TZID']] = component.to_tz()
                                         ^^^^^^^^^^^^^^^^^
  File "/usr/local/kitchen/lib64/python3.12/site-packages/icalendar/cal.py", line 659, in to_tz
    return cls()
           ^^^^^
  File "/usr/local/kitchen/lib64/python3.12/site-packages/pytz/tzinfo.py", line 190, in __init__
    self._transition_info[0])
    ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
```

It seems to work fine in Nextcloud, though, so the work-around is to
import it as a subscription in Nextcloud and then read it from there,
using Nextcloud as a sort of proxy.
2025-09-07 08:27:19 -05:00
Dustin 28d6bdc3a9 kitchen: Pin to amd64 nodes
There is not (currently) an aarch64 build of the kitchen screen server,
so we need to force the pod to run on a x86_64 node.  This seems a good
candidate for running on a Raspberry Pi, so I should go ahead and build
a multi-arch image.
2025-09-07 08:27:19 -05:00
Dustin 0822afe0b3 kitchen: Round weather metrics
Home Assistant has started sending the full sensor values for weather
metrics to Prometheus, even though their precision is way beyond their
accuracy.  We don't need to see 4+ decimal points for these on the
Kitchen display, so let's round the values when we query.
2025-07-21 14:40:35 -05:00
Dustin c3c9c0c555 kitchen: Run as non-root user
The *kitchen* server service does not need to run as root or have any
access to writable storage.
2024-06-06 11:03:42 -05:00
Dustin b4d6dfeb07 kitchen: Re-enable graceful shutdown timeout
Version 0.5.1 fixes the issue with `uvicorn` hanging on shutdown because
of the WebSocket message queue.
2024-06-06 10:09:37 -05:00
Dustin 7b8b11111e kitchen: Updates for v0.5
Kitchen v0.5 a few changes that affect the deployment:

* The Bored Board is now backed by MQTT
* The pool temperature is now displayed in the weather pane
* The container image is now based on Fedora and includes its own time
  zone database and root CA bundle
* The websocket server prevents the process from stopping correctly
  unless the graceful shutdown feature of `uvicorn` is disabled
2024-06-05 22:04:55 -05:00
Dustin 96928a2611 kitchen: Fix weather metrics API URI
Apparently, I never bothered to check that the Kitchen HUD server was
actually fetching data from Victoria Metrics when I updated it before; I
only verified that the Unauthorized errors in the `vmselect` log
went away.  They did, but only because now the Kitchen server was
failing to contact `vmselect` at all.
2024-02-21 08:01:35 -06:00
Dustin 94300ac502 kitchen: Use SealedSecret template for config
The configuration file for the kitchen HUD server has credentials
embedded in it.  Until I get around to refactoring it to read these from
separate locations, we'll make use of the template feature of
SealedSecrets.  With this feature, fields can refer to the (decrypted)
value of other fields using Go template syntax.  This makes it possible
to have most of the `config.yaml` document unencrypted and easily
modifiable, while still protecting the secrets.
2024-02-01 21:18:46 -06:00
Dustin a7450a8af2 kitchen: Fix Jenkins deployment role
Since Jenkins jobs run in Kubernetes now, they can authenticate to the
Kubernetes API using a ServiceAccount and do not need a dedicated
User.
2024-01-22 17:00:50 -06:00
Dustin 990204b2cf kitchen: Use Certifi TLS CA bundle for OpenSSL
The MQTT client needs a trusted root CA bundle, which is not available
in the container image used by the *kitchen* server (it's based on
*pythonctnr* which literally *only* includes Python).  Fortunately, as
it uses OpenSSL under the hood, we can configure it to use the bundle
included with the *certifi* Python package via an environment variable.
2024-01-22 16:57:38 -06:00
Dustin 0eb121b833 kitchen: Remove config.yml ConfigMap generator
The `config.yml` document for *kitchen* contains several "secret" values
(e.g. passwords to Nextcloud, MQTT, etc.).  We don't want to commit
these to the Git repository, of course, but as long as Kustomize expects
to find the `config.yml` file, we won't be able to manage the
application with Argo CD.  Ultimately, *kitchen* needs to be modified to
be able to read secrets separately from config, but until then, we will
have to avoid managing `config.yml` with Kustomize.
2023-10-14 22:01:26 -05:00
Dustin 53a057666a kitchen: Set instance label for Argo CD
Argo CD wants every resource managed by an application to have that
application's name as the value of the `app.kubernetes.io/instance`
label.
2023-10-14 21:45:01 -05:00
Dustin c5c63d2684 kitchen: Migrate to Sealed Secrets 2023-10-14 21:44:47 -05:00
Dustin 668b5bf5a9 kitchen: Allow Jenkins to restart deployment
Jenkins is now allowed to restart the Deployment named *kitchen* in the
*kitchen* namespace.  It will do this after pushing a new container
image from a build of the *master* branch.
2022-11-06 17:22:46 -06:00
Dustin de054bd68f kitchen: Add manifest for kitchen screen server
I decided to run the kitchen screen service in Kubernetes rather than on
the Raspberry Pi in the kitchen.  This will hopefully make it a bit more
reliable and easier to update.  It will also make it easier to rebuild
the OS on the Pi, if it ever becomes necessary, since it really only
needs Firefox (and MQTTDPMS) now.
2022-11-05 16:39:22 -05:00