hall / kubenix

Kubernetes management with Nix
https://kubenix.org/
MIT License
320 stars 30 forks source link

Trouble using helm charts #72

Open Industrial opened 8 hours ago

Industrial commented 8 hours ago
{
  inputs,
  settings,
  ...
}: (inputs.kubenix.evalModules.${settings.system} {
  module = {kubenix, ...}: {
    imports = [
      kubenix.modules.helm
    ];
    kubernetes = {
      helm = {
        releases = {
          immich = {
            chart = kubenix.lib.helm.fetch {
              repo = "https://immich-app.github.io/immich-charts";
              chart = "immich/immich";
              sha256 = "sKVqx99O4SNIq5y8Qo/b/2xIqXqSsZJzrgnYYz/0TKg=";
            };
          };
        };
      };
    };
  };
})

I'm getting:

       … while calling the 'readFile' builtin
         at /nix/store/5n6kf35hgbm6x4fdl2wwrxi9gr4nn6v7-source/lib/trivial.nix:683:24:
          682|   importJSON = path:
          683|     builtins.fromJSON (builtins.readFile path);
             |                        ^
          684|

I'm probably passing the wrong thing, but I don't know what to pass here to make it work.

I have a lot of ideas for services that I would like to try out with Kubernetes, and even the official kubernetes dashboard is using Helm so to get that working I need to learn to pass the right arguments.

Can someone please help me with this? :)

adrian-gierakowski commented 8 hours ago

Hi @Industrial error seems incomplete

Industrial commented 8 hours ago

@adrian-gierakowski the stack trace is actually huge and it scrolls past my vscode terminal limit..

https://gist.github.com/Industrial/74e932f4e18b20bfdabc1f95cab7b6d4

adrian-gierakowski commented 7 hours ago

Try building

Try building

helm.chart2json {
  inherit (kubernetes.helm.releases.immich) chart name namespace values kubeVersion includeCRDs noHooks apiVersions;
}

since thats where the error seems to be coming from: https://github.com/hall/kubenix/blob/d6ddf1b4e8804e3c9564696a493ac14c0bcb19e2/modules/helm.nix#L129C38-L129C42