farcaller/nixhelm

App Template 3 won't build inside a Nix sandbox

Goorzhel opened this issue · 3 comments

It does JSON schema validation using a web $ref, frustrating attempts to build it inside a sandbox.

I have a vague idea for a workaround, which is to munge the source repo ...

mkDerivation {
  src = fetchFromGitHub {...}
  buildPhase = ''
    cp -r $src $out
    cp -rf $out/charts/library/common/*schema* \
           $out/charts/other/app-template
  '';
}

... and special-case the chart somewhere in nixhelm, but I haven't found a non-ugly way to do that. So I've filed this as a placeholder until I figure it out.

Helm 3.16.0 will fix this.

I think we're at 3.16.2 in nixpkgs now. Is it still an issue @Goorzhel ?

Nope: kubelib.buildHelmChart {extraOpts = ["--skip-schema-validation"]; ...} should suffice.

I would have preferred not to discard schema validation entirely, but I can't justify the effort to make it work with this case alone. If more cases appear, I could set about moving the helm pull to buildPhase and making installPhase configurable. Until then, this issue has no more gas in it.