Add option for Helm --include-crds (#18)

This commit is contained in:
Felix Scheinost 2023-02-28 02:22:59 +01:00 committed by GitHub
parent b2feaf6b40
commit 919e4ec901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -18,6 +18,8 @@ with lib;
values ? {},
# kubernetes version to template chart for
kubeVersion ? null,
# whether to include CRD
includeCRDs ? false
}: let
valuesJsonFile = builtins.toFile "${name}-values.json" (builtins.toJSON values);
in
@ -29,6 +31,7 @@ with lib;
${optionalString (kubeVersion != null) "--kube-version ${kubeVersion}"} \
${optionalString (namespace != null) "--namespace ${namespace}"} \
${optionalString (values != {}) "-f ${valuesJsonFile}"} \
${optionalString (includeCRDs) "--include-crds"} \
${chart} >resources.yaml
# split multy yaml file into multiple files