farcaller / nixhelm

This is a collection of helm charts in a nix-digestable format.
Apache License 2.0
73 stars 7 forks source link

Insert Charts directly in K3S #24

Open Svenum opened 1 week ago

Svenum commented 1 week ago

Hello,

maybe I am dump but I dont understand how to pass these charts directly into my K3S Cluster built on NixOS. Or is this even possible with this Flake? Maybe I dont understand the purpose of this flake right.

Thats how I build the cluster:

{ ... }:
{
  services.k3s = {
    enable = true;
    tokenFile = /path/to/sops-nix/token;
    extraFlags = "--clusterCIDR 10.11.0.0/16";
    clusterInit = true;

    # and on Node 2 und 3
    serverAddress = "https://10.10.0.1:6443" # IP from the first Node
  };
}
farcaller commented 1 week ago

The k3s helm integration expects you to point at the chart repo directly, so I don't think there's any feasible way to use this repo with it. This repo is mostly useful for tooling like argocd, or even applying the redered charts directly with kubectl apply in your activation script.

Svenum commented 1 week ago

Ok, I understand. But do you know a way to fully manage the Kube Cluster with nix? All I found was maybe this: https://github.com/gytis-ivaskevicius/nix-helm. But this only creates a shell script to apply the changes to the cluster if I understand it correctly.

farcaller commented 1 week ago

There's no real way to fully manage a k8s cluster from nix because it's tricky to make sure there are no outside changes. Otherwise, you can e.g. just dump your yamls into /var/lib/rancher/k3s/server/manifests with an activation script and let k3s reapply them. That's pretty close to managing it with nix, but it's not much practical.