From 5c5191680e27ca83996f7b6cf745659627d7f036 Mon Sep 17 00:00:00 2001 From: Bryton Hall Date: Mon, 15 Aug 2022 01:27:50 -0400 Subject: [PATCH] add helm chart example --- .github/workflows/ci.yml | 2 +- docs/examples/default.nix | 1 + docs/examples/helm-chart/default.nix | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 docs/examples/helm-chart/default.nix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab791b8..21b239b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,4 +18,4 @@ jobs: run: nix -Lv flake check - name: Check Nix parsing - run: nix -Lv develop -c "evalnix" + run: nix -Lv develop -c evalnix diff --git a/docs/examples/default.nix b/docs/examples/default.nix index 6f824eb..896d90b 100644 --- a/docs/examples/default.nix +++ b/docs/examples/default.nix @@ -3,4 +3,5 @@ evalModules ? (import ../. {}).evalModules.${system}, }: {registry ? "docker.io/gatehub"}: { nginx-deployment = import ./nginx-deployment {inherit evalModules registry;}; + helm-chart = import ./helm-chart {inherit evalModules;}; } diff --git a/docs/examples/helm-chart/default.nix b/docs/examples/helm-chart/default.nix new file mode 100644 index 0000000..2e19d8c --- /dev/null +++ b/docs/examples/helm-chart/default.nix @@ -0,0 +1,16 @@ +{evalModules}: +(evalModules { + module = {kubenix, ...}: { + imports = with kubenix.modules; [helm]; + kubernetes.helm.instances.example = { + chart = kubenix.lib.helm.fetch { + chart = "nginx"; + repo = "https://charts.bitnami.com/bitnami"; + sha256 = "sha256-wP3tcBnySx+kvZqfW2W9k665oi8KOI50tCcAl0g9cuw="; + }; + }; + }; +}) +.config +.kubernetes +.result