From 3592c9a9c24fc0d36f80c974959eb3fd10dbeb02 Mon Sep 17 00:00:00 2001 From: Sebastian Florek Date: Wed, 5 Feb 2025 12:38:46 +0100 Subject: [PATCH] extend osartifact chart with wifi configuration --- charts/osartifact/Chart.yaml | 2 +- charts/osartifact/templates/secret.yaml | 11 +++++++++++ charts/osartifact/values.yaml | 12 +++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/charts/osartifact/Chart.yaml b/charts/osartifact/Chart.yaml index 85cd948..6f23e21 100644 --- a/charts/osartifact/Chart.yaml +++ b/charts/osartifact/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - name: Plural email: support@plural.sh type: application -version: 0.7.0 \ No newline at end of file +version: 0.8.0 \ No newline at end of file diff --git a/charts/osartifact/templates/secret.yaml b/charts/osartifact/templates/secret.yaml index 2323590..0cf061d 100644 --- a/charts/osartifact/templates/secret.yaml +++ b/charts/osartifact/templates/secret.yaml @@ -22,6 +22,17 @@ stringData: #cloud-config hostname: pluralos-{{ `{{ trunc 10 .MachineID }}` }} + {{- if .Values.wifi.enabled }} + stages: + boot: + - name: Enable wireless + commands: + - connmanctl enable wifi + - wpa_passphrase '{{ .Values.wifi.ssid }}' '{{ .Values.wifi.password }}' > /etc/wpa_supplicant/wpa_supplicant.conf + - wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf + - udhcpc -i wlan0 &` + {{- end }} + users: - name: kairos lock_passwd: true diff --git a/charts/osartifact/values.yaml b/charts/osartifact/values.yaml index fc0f3f9..d34458e 100644 --- a/charts/osartifact/values.yaml +++ b/charts/osartifact/values.yaml @@ -7,6 +7,12 @@ image: quay.io/kairos/alpine:3.19-standard-arm64-rpi4-v3.2.4-k3sv1.31.3-k3s1 # Target device. Currently supported values: rpi4 device: rpi4 +# WiFi configuration. It will attempt the connection on the first boot. +wifi: + enabled: false + ssid: ~ + password: ~ + # Username that will be used to access the device over SSH username: plural @@ -25,12 +31,12 @@ tokenSecret: # A list of our required bundles that should be added to the result ISO image. defaultBundles: - plural-bundle: ghcr.io/pluralsh/kairos-plural-bundle:0.1.6 + plural-bundle: ghcr.io/pluralsh/kairos-plural-bundle:1.0.0 # A list of our optional bundles that should be added to the result ISO image. bundles: - plural-images-bundle: ghcr.io/pluralsh/kairos-plural-images-bundle:0.1.2 - plural-trust-manager-bundle: ghcr.io/pluralsh/kairos-plural-trust-manager-bundle:0.1.0 + plural-images-bundle: ghcr.io/pluralsh/kairos-plural-images-bundle:1.0.0 + plural-trust-manager-bundle: ghcr.io/pluralsh/kairos-plural-trust-manager-bundle:0.2.0 # A list of extra bundles that should be added to the result ISO image. extraBundles: {}