about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--README.md7
-rw-r--r--flake.nix6
-rw-r--r--k8s/helmsman.yml45
-rw-r--r--k8s/metallb.yml (renamed from k8s/metallb_config.yml)5
-rw-r--r--k8s/metallb_announce.yml5
6 files changed, 60 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 4278107..4fad39f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 .direnv/
 
 /bazel-*
+
+.helmsman-tmp/
diff --git a/README.md b/README.md
index e370961..69d8278 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,6 @@
 install k3s
+install helmsman
 
-helm --namespace metallb-system install --create-namespace metallb metallb/metallb
-kubectl apply -f metallb_config.yml
-kubectl apply -f metallb_announce.yml
-
-helm install kafka oci://registry-1.docker.io/bitnamicharts/kafka --set controller.replicaCount=1,controller.livenessProbe.initialDelaySeconds=120
+COMMIT_SHA=$(git rev-parse --short HEAD) helmsman --apply -f k8s/helmsman.yml
 
 to deploy, execute the ./deploy.sh script
diff --git a/flake.nix b/flake.nix
index 7e0e307..b1cdba6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -17,6 +17,12 @@
       {
         devShells.default = mkShell {
           buildInputs = [
+            helmsman
+            (wrapHelm kubernetes-helm {
+              plugins = with kubernetes-helmPlugins; [
+                helm-diff
+              ];
+            })
             bazel
             buildozer
             go
diff --git a/k8s/helmsman.yml b/k8s/helmsman.yml
new file mode 100644
index 0000000..5579d82
--- /dev/null
+++ b/k8s/helmsman.yml
@@ -0,0 +1,45 @@
+# Helmsman
+
+helmRepos:
+  metallb: https://metallb.github.io/metallb
+
+namespaces:
+  default:
+  metallb-system:
+
+apps:
+  metallb:
+    namespace: metallb-system
+    enabled: true
+    wait: true
+    chart: metallb/metallb
+    version: 0.14.5
+    valuesFile: metallb.yml
+
+  kafka:
+    namespace: default
+    enabled: true
+    wait: true
+    chart: oci://registry-1.docker.io/bitnamicharts/kafka
+    version: 28.1.1
+    set:
+      controller.replicaCount: 1
+      controller.livenessProbe.initialDelaySeconds: 120
+
+  payload-processor:
+    namespace: default
+    enabled: true
+    wait: true
+    chart: payload-processor
+    version: 0.1.0
+    set:
+      image.tag: "payload-processor-$COMMIT_SHA"
+
+  rest-api:
+    namespace: default
+    enabled: true
+    wait: true
+    chart: rest-api
+    version: 0.1.0
+    set:
+      image.tag: "rest-api-$COMMIT_SHA"
diff --git a/k8s/metallb_config.yml b/k8s/metallb.yml
index 497ab94..e9c8bb6 100644
--- a/k8s/metallb_config.yml
+++ b/k8s/metallb.yml
@@ -6,3 +6,8 @@ metadata:
 spec:
   addresses:
   - 192.168.11.0/24
+apiVersion: metallb.io/v1beta1
+kind: L2Advertisement
+metadata:
+  name: simplel2
+  namespace: metallb-system
diff --git a/k8s/metallb_announce.yml b/k8s/metallb_announce.yml
deleted file mode 100644
index 3ef889a..0000000
--- a/k8s/metallb_announce.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-apiVersion: metallb.io/v1beta1
-kind: L2Advertisement
-metadata:
-  name: simplel2
-  namespace: metallb-system