Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.0.0 #206

Merged
merged 18 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ab0dbed
bump version and add prometheus CRDs before installing zitadel and re…
jessebot Apr 6, 2024
09c7273
don't default recurse directories for zitadel, and always retry on cr…
jessebot Apr 6, 2024
714fe61
fix generic device plugin help text
jessebot Apr 6, 2024
05ecb31
add defaults for home assistant bluetooth devices and for home assist…
jessebot Apr 6, 2024
9422e69
add home assistant latitude, longitude, and elevation to default config
jessebot Apr 6, 2024
8d2eee7
preparing everything to create a home assistant owner user by default…
jessebot Apr 8, 2024
4fa209b
bump version to 3.8.0 as we have some new features
jessebot Apr 8, 2024
e5fd423
add external url to the secret keys we create for home assistant
jessebot Apr 8, 2024
6c31946
populate external url for home assistant with https or http
jessebot Apr 8, 2024
ffef557
add default country to home assistant variables
jessebot Apr 8, 2024
8c15ae0
add a default currency
jessebot Apr 8, 2024
6757ef0
add todo for checking debug logging and enabling it for argocd by def…
jessebot Apr 8, 2024
3ae0955
update docs for home assistant
jessebot Apr 8, 2024
e2353be
explain changes to home assistant
jessebot Apr 8, 2024
1b7dc37
update the docs for prometheus a bit
jessebot Apr 8, 2024
d2876b4
fix link in docs for generic device plugin
jessebot Apr 8, 2024
eef530b
always set enabled to False if app is not present
jessebot Apr 8, 2024
d12e46b
update version to 4.0.0 and update poetry.lock and add upgrade info t…
jessebot Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/k8s_apps/generic_device_plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apps:
generic_device_plugin:
enabled: true
description: |
This installs the [link=https://github.com/squat/generic-device-plugin/tree/main]squat/generic-device-plugin[/link], which is recommended for exposing generic devices such as USB devices to your k8s pods. This can useful if you have an IoT coordinator device such as the conbee 2 that you are using with deconz or home assistant. You can read more about device plugins in the [Kubernetes docs](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/).
This installs the [link=https://github.com/squat/generic-device-plugin/tree/main]squat/generic-device-plugin[/link], which is recommended for exposing generic devices such as USB devices to your k8s pods. This can useful if you have an IoT coordinator device such as the conbee 2 that you are using with deconz or home assistant. You can read more about device plugins in the [link=https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/]Kubernetes docs[/link]
argo:
secret_keys: {}
repo: https://github.com/small-hack/argocd-apps
Expand Down
109 changes: 88 additions & 21 deletions docs/k8s_apps/home_assistant.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,85 @@
[Home Assistant](https://www.home-assistant.io/) is an open source IoT management solution. We deploy a [small-hack maintained helm chart](https://github.com/small-hack/home-assistant-chart/) by default.
[Home Assistant](https://www.home-assistant.io/) is an open source IoT management solution. We deploy a [small-hack maintained helm chart](https://github.com/small-hack/home-assistant-chart/) by default, which allows us to:

- specify a default `configuration.yaml`
- create an initial user to disable public registration

<img src="../../assets/images/screenshots/home-assistant_screenshot.png" alt="screenshot of the home-assistant-app in Argo CD showing a tree featuring a configmap, pvc, service, service account, deployment, and ingress resource all called home-assistant.">

The main variable you need to worry about when setting up home assistant is your `hostname`.
*NOTE*: You'll need to enable the [Generic Device Plugin](/k8s_apps/generic-device-plugin.md) as a prereq in order to use USB devices with home assistant.

### Secret Keys

The main variables you need to worry about when setting up home assistant is your `hostname`.

You'll need the [Generic Device Plugin](/k8s_apps/generic-device-plugin.md) as a prereq in order to use USB devices with home assistant.
### Sensitive Initialization Values
Since we support the creation of an initial user for Home Assistant, you need to either fill in the password for that user via the TUI, or before you run `smol-k8s-lab`, you run the following to export `$HOME_ASSISTANT_PASSWORD` as an enviornment variable:

```bash
export HOME_ASSISTANT_PASSWORD="mysupersecretpassword"
```

## Example configs

### Using tolerations and node affinity

```yaml
apps:
home_assistant:
enabled: true
description: |
[link=https://home-assistant.io]Home Assistant[/link] is a home IOT management solution.

By default, we assume you want to use node affinity and tolerations to keep home assistant pods on certain nodes and keep other pods off said nodes. If you don't want to use either of these features but still want to use the small-hack/argocd-apps repo, first change the argo path to /home-assistant/ and then remove the 'toleration_' and 'affinity' secret_keys from the yaml file under apps.home_assistant.description.

[b]NOTE[/b]: If you want to pass in a USB device, you will need the generic device plugin (which is available as a default Argo CD app via smol-k8s-lab 💙)

This app takes one sensitive value, password for the initial owner user. You can also pass it in as an enviornment variable called $HOME_ASSISTANT_PASSWORD.
# Initialization of the app through smol-k8s-lab
init:
# enable the creation of an initial owner user
enabled: true
values:
# -- owner user's name
name: "admin"
# -- owner user's username
user_name: "admin"
# -- owner user's language, default is english
language: "en"
sensitive_values:
- PASSWORD
argo:
secret_keys:
hostname: "home-assistant.cooldomainfordogs.biz"
hostname: ""
# name of your home assistant area, users often just use "home"
name: "home"
# default alpha-2 country code, default is NL which is The Netherlands
country: "NL"
# currency code to use for calculating costs, defaults to EUR for euro
currency: "EUR"
# other option is "imperial"
unit_system: "metric"
# set to F for USA imperialist tempurature
temperature_unit: "C"
# tolerate taints
toleration_key: "iot"
toleration_operator: "Equal"
toleration_value: "true"
toleration_effect: "NoSchedule"
# make the node attractive
affinity_key: "iot"
affinity_value: "true"
# latitude of your personal coordinates
latitude: ""
# longitude of your personal coordinates
longitude: ""
# the elevation of your house?
elevation: ""
# you can delete these if you're not using tolerations/affinity
toleration_key: ""
toleration_operator: ""
toleration_value: ""
toleration_effect: ""
# these are for node affinity, delete if not in use
affinity_key: ""
affinity_value: ""
# these are for passing in a USB device such as the conbee II
# this is the path on the node
usb_device_path: "/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509111242-if00"
# this is the path on the container
usb_device_path: ""
usb_device_mount_path: "/dev/ttyACM0"
# this is the generic device plugin device index
usb_device_index: "1"
# these are for passing in a bluetooth device
bluetooth_device_path: /run/dbus
bluetooth_device_mount_path: /run/dbus
bluetooth_device_index: '2'
repo: https://github.com/small-hack/argocd-apps
path: home-assistant/toleration_and_affinity/
revision: main
Expand All @@ -60,20 +102,45 @@ apps:
enabled: true
description: |
[link=https://home-assistant.io]Home Assistant[/link] is a home IOT management solution.
init:
enabled: true
values:
# -- owner user's name
name: "admin"
# -- owner user's username
user_name: "admin"
# -- owner user's language, default is english
language: "en"
sensitive_values:
- PASSWORD
argo:
secret_keys:
hostname: "home-assistant.cooldomainfordogs.biz"
hostname: ""
# name of your home assistant area, users often just use "home"
name: "home"
# default alpha-2 country code, default is NL which is The Netherlands
country: "NL"
# currency code to use for calculating costs, defaults to EUR for euro
currency: "EUR"
# other option is "imperial"
unit_system: "metric"
# set to F for USA imperialist tempurature
temperature_unit: "C"
# latitude of your personal coordinates
latitude: ""
# longitude of your personal coordinates
longitude: ""
# the elevation of your house?
elevation: ""
repo: https://github.com/small-hack/argocd-apps
path: home-assistant/
revision: main
namespace: home-assistant
directory_recursion: false
project:
name:
name: home-assistant
source_repos:
- http://small-hack.github.io/home-assistant-chart
- https://small-hack.github.io/home-assistant-chart
destination:
namespaces:
- argocd
Expand Down
90 changes: 90 additions & 0 deletions docs/k8s_apps/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,93 @@ You can see an overview of the whole Prometheus Stack Argo CD Application at [sm
<a href="../../assets/images/screenshots/prometheus_screenshot.png">
<img src="../../assets/images/screenshots/prometheus_screenshot.png" alt="screenshot of the Argo CD web interface showing the prometheus app of apps which includes the following children: loki, prometheus-crd, prometheus-appset, prometheus-pushgateway-appset">
</a>

## Important note

We haven't generated new screenshots, but we've updated how we now deploy the Prometheus CRDs. They are now deployed separately, so that anything that relies on them that gets deployed earlier on, such as your identity provider, which you may want to secure the prometheus related frontends.

## Example configs

### Custom Resource Definitions (CRDs)

```yaml
apps:
prometheus_crds:
description: |
[link=https://prometheus.io/docs/introduction/overview/]Prometheus[/link] CRDs to start with.
You can optionally disable this if you don't want to deploy apps with metrics.

enabled: true
argo:
# secrets keys to make available to Argo CD ApplicationSets
secret_keys: {}
# git repo to install the Argo CD app from
repo: https://github.com/small-hack/argocd-apps
# path in the argo repo to point to. Trailing slash very important!
path: prometheus/crds/
# either the branch or tag to point at in the argo repo above
revision: main
# namespace to install the k8s app in
namespace: prometheus
# recurse directories in the provided git repo
directory_recursion: false
# source repos for Argo CD App Project (in addition to argo.repo)
project:
name: prometheus
source_repos:
- https://github.com/prometheus-community/helm-charts.git
destination:
# automatically includes the app's namespace and argocd's namespace
namespaces:
- kube-system
- prometheus
```

### kube-prometheus-stack

**NOTE**: You need to *also* enable the CRD app above for this to work!

```yaml
apps:
prometheus:
description: |
Full monitoring stack with [link=https://prometheus.io/docs/introduction/overview/]Prometheus[/link], grafana, loki, and alert manager.

smol-k8s-lab supports initialization by setting up your ingress hostnames.

enabled: false
argo:
# secrets keys to make available to Argo CD ApplicationSets
secret_keys:
# FQDN to use for Prometheus web interface
hostname: ""
# FQDN to use for grafana
grafana_hostname: ""
# FQDN to use for Alert Manager web interface
alert_manager_hostname: ""
# FQDN to use for the prometheus push gateway
push_gateway_hostname: ""
# git repo to install the Argo CD app from
repo: https://github.com/small-hack/argocd-apps
# path in the argo repo to point to. Trailing slash very important! This
# is an app of apps. Change to "monitoring/kube-prometheus-stack/" to
# only install kube-prometheus-stack (foregoing loki and push gateway)
path: prometheus/
# either the branch or tag to point at in the argo repo above
revision: main
# namespace to install the k8s app in
namespace: "prometheus"
# recurse directories in the provided git repo
directory_recursion: false
# source repos for Argo CD App Project (in addition to argo.repo)
project:
name: prometheus
source_repos:
- "registry-1.docker.io"
- "https://github.com/prometheus-community/helm-charts.git"
- "https://prometheus-community.github.io/helm-charts"
destination:
# automatically includes the app's namespace and argocd's namespace
namespaces:
- kube-system
```
Loading
Loading