mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fmt
This commit is contained in:
parent
c3fa598922
commit
db6d83c61e
53 changed files with 1916 additions and 1599 deletions
|
|
@ -13,19 +13,22 @@ with lib;
|
|||
, namespace ? null
|
||||
|
||||
# values to pass to chart
|
||||
, values ? {}
|
||||
, values ? { }
|
||||
|
||||
# kubernetes version to template chart for
|
||||
, kubeVersion ? null }: let
|
||||
, kubeVersion ? null
|
||||
}:
|
||||
let
|
||||
valuesJsonFile = builtins.toFile "${name}-values.json" (builtins.toJSON values);
|
||||
in stdenvNoCC.mkDerivation {
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "${name}.json";
|
||||
buildCommand = ''
|
||||
# template helm file and write resources to yaml
|
||||
helm template "${name}" \
|
||||
${optionalString (kubeVersion != null) "--api-versions ${kubeVersion}"} \
|
||||
${optionalString (namespace != null) "--namespace ${namespace}"} \
|
||||
${optionalString (values != {}) "-f ${valuesJsonFile}"} \
|
||||
${optionalString (values != { }) "-f ${valuesJsonFile}"} \
|
||||
${chart} >resources.yaml
|
||||
|
||||
# split multy yaml file into multiple files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue