From 89e1e70bf04f94c5241a8fa15898e7e4cef2b8b0 Mon Sep 17 00:00:00 2001 From: Bryton Hall Date: Mon, 15 Aug 2022 09:46:23 -0400 Subject: [PATCH] rename helm instances to releases --- docs/examples/helm-chart/default.nix | 2 +- modules/helm.nix | 12 ++++++------ tests/helm/simple.nix | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/examples/helm-chart/default.nix b/docs/examples/helm-chart/default.nix index 2e19d8c..2a4eb0e 100644 --- a/docs/examples/helm-chart/default.nix +++ b/docs/examples/helm-chart/default.nix @@ -2,7 +2,7 @@ (evalModules { module = {kubenix, ...}: { imports = with kubenix.modules; [helm]; - kubernetes.helm.instances.example = { + kubernetes.helm.releases.example = { chart = kubenix.lib.helm.fetch { chart = "nginx"; repo = "https://charts.bitnami.com/bitnami"; diff --git a/modules/helm.nix b/modules/helm.nix index 4294151..865eec5 100644 --- a/modules/helm.nix +++ b/modules/helm.nix @@ -32,8 +32,8 @@ in { imports = [./k8s.nix]; options.kubernetes.helm = { - instances = mkOption { - description = "Attribute set of helm instances"; + releases = mkOption { + description = "Attribute set of helm releases"; type = types.attrsOf (types.submodule ({ config, name, @@ -108,7 +108,7 @@ in { kubernetes.api.resources = mkMerge (flatten (mapAttrsToList ( - _: instance: + _: release: map (object: let apiVersion = parseApiVersion object.apiVersion; @@ -117,10 +117,10 @@ in { "${apiVersion.group}"."${apiVersion.version}".${object.kind}."${name}" = mkMerge ([ object ] - ++ instance.overrides); + ++ release.overrides); }) - instance.objects + release.objects ) - cfg.instances)); + cfg.releases)); }; } diff --git a/tests/helm/simple.nix b/tests/helm/simple.nix index 835453a..1bba027 100644 --- a/tests/helm/simple.nix +++ b/tests/helm/simple.nix @@ -80,7 +80,7 @@ in { ''; }; - kubernetes.helm.instances.app-psql = { + kubernetes.helm.releases.app-psql = { namespace = "some-overridden-by-kubetest"; chart = helm.fetch { repo = "https://charts.bitnami.com/bitnami";