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
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ stdenvNoCC, lib, kubernetes-helm, cacert }:
|
||||
|
||||
let
|
||||
cleanName = name: lib.replaceStrings ["/"] ["-"] name;
|
||||
cleanName = name: lib.replaceStrings [ "/" ] [ "-" ] name;
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
# name of the chart
|
||||
chart
|
||||
|
||||
|
|
@ -13,20 +13,21 @@ in {
|
|||
# version of the chart
|
||||
, version ? null
|
||||
|
||||
# chart hash
|
||||
# chart hash
|
||||
, sha256
|
||||
|
||||
# whether to extract chart
|
||||
# whether to extract chart
|
||||
, untar ? true
|
||||
|
||||
# use custom charts repo
|
||||
# use custom charts repo
|
||||
, repo ? null
|
||||
|
||||
# pass --verify to helm chart
|
||||
# pass --verify to helm chart
|
||||
, verify ? false
|
||||
|
||||
# pass --devel to helm chart
|
||||
, devel ? false }: stdenvNoCC.mkDerivation {
|
||||
# pass --devel to helm chart
|
||||
, devel ? false
|
||||
}: stdenvNoCC.mkDerivation {
|
||||
name = "${cleanName chart}-${if version == null then "dev" else version}";
|
||||
|
||||
buildCommand = ''
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
let
|
||||
fetchhelm = pkgs.callPackage ./fetchhelm.nix { };
|
||||
chart2json = pkgs.callPackage ./chart2json.nix { };
|
||||
in rec {
|
||||
fetchhelm = pkgs.callPackage ./fetchhelm.nix { };
|
||||
chart2json = pkgs.callPackage ./chart2json.nix { };
|
||||
in
|
||||
rec {
|
||||
postgresql-chart = fetchhelm {
|
||||
chart = "stable/postgresql";
|
||||
version = "0.18.1";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue