From e03f3bf88509e99c0965f5479064778912ed75f1 Mon Sep 17 00:00:00 2001 From: Joe Monk Date: Sun, 4 Aug 2024 20:27:04 +0100 Subject: [PATCH] Add longhorn --- clusters/kairos/longhorn/helmrelease.yaml | 16 ++++++++++++++++ clusters/kairos/longhorn/helmrepo.yaml | 9 +++++++++ clusters/kairos/longhorn/kustomization.yaml | 6 ++++++ readme.md | 13 +++++++++++-- 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 clusters/kairos/longhorn/helmrelease.yaml create mode 100644 clusters/kairos/longhorn/helmrepo.yaml create mode 100644 clusters/kairos/longhorn/kustomization.yaml diff --git a/clusters/kairos/longhorn/helmrelease.yaml b/clusters/kairos/longhorn/helmrelease.yaml new file mode 100644 index 0000000..56b39b6 --- /dev/null +++ b/clusters/kairos/longhorn/helmrelease.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: longhorn-release + namespace: longhorn-system +spec: + chart: + spec: + chart: longhorn + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: longhorn-repo + version: 1.6.0 + interval: 1m0s diff --git a/clusters/kairos/longhorn/helmrepo.yaml b/clusters/kairos/longhorn/helmrepo.yaml new file mode 100644 index 0000000..122be45 --- /dev/null +++ b/clusters/kairos/longhorn/helmrepo.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: longhorn-repo + namespace: longhorn-system +spec: + interval: 1m0s + url: https://charts.longhorn.io diff --git a/clusters/kairos/longhorn/kustomization.yaml b/clusters/kairos/longhorn/kustomization.yaml new file mode 100644 index 0000000..364d5a6 --- /dev/null +++ b/clusters/kairos/longhorn/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kube-system +resources: +- helmrepo.yaml +- helmrelease.yaml \ No newline at end of file diff --git a/readme.md b/readme.md index 38648cf..0e0a425 100644 --- a/readme.md +++ b/readme.md @@ -8,8 +8,6 @@ # Kairos -Kairos automatically includes Traefik - - Grab the latest image from https://github.com/kairos-io/kairos/releases, the image should have the format `kairos-debian-bookworm-standard-amd64-generic-v3.1.1-k3sv1.30.2+k3s1`. The main things we're looking for are the latest debian, standard, amd64, then the versions of kairos (v3.1.1) and k3s (1.30.2). - Burn to usb @@ -28,3 +26,14 @@ Host 192.168.1.101 ## Flux CD - `flux bootstrap git --private-key-file=/config/.ssh/gitea --url ssh://git@gitea.home.joemonk.co.uk:2222/joe/gitops.git --branch main --path=clusters/kairos` + +## DNS + +We need to point a dns server to the server so we can access things via hostname rather than needing complex routing. + +### In OPNSense + +- Make sure Services > UnboundDNS is active and working +- In overrides, add the host as `*`, domain as `k3s` and value as the ip address of the server + +You should be able to access `http://traefik.k3s:9000/dashboard#/` (at the time of writing, looking to route this properly)