feat(overrides/kontemplate): Automatically use primary-cluster.yaml

This commit is contained in:
Vincent Ambo 2019-12-20 20:55:25 +00:00
parent 49fd50bc8a
commit 495b6481c1
2 changed files with 8 additions and 3 deletions

2
.envrc
View file

@ -4,4 +4,4 @@
export PATH="${PWD}/bin:${PATH}" export PATH="${PWD}/bin:${PATH}"
export NIX_PATH="nixpkgs=${PWD}/default.nix" export NIX_PATH="nixpkgs=${PWD}/default.nix"
export REPO_ROOT="${PWD}" export REPO_ROOT="${PWD}"
export SECRETS_DIR="${PWD}/secrets" export SECRETS_DIR="${PWD}/ops/secrets"

View file

@ -9,6 +9,11 @@ let master = pkgs.third_party.kontemplate.overrideAttrs(_: {
}; };
}); });
in pkgs.third_party.writeShellScriptBin "kontemplate" '' in pkgs.third_party.writeShellScriptBin "kontemplate" ''
export PATH="${pkgs.tools.kms_pass}/bin:$PATH" export PATH="${pkgs.ops.kms_pass}/bin:$PATH"
exec ${master}/bin/kontemplate $@
if [[ -z $1 ]]; then
exec ${master}/bin/kontemplate
fi
exec ${master}/bin/kontemplate $1 ${./../..}/ops/infra/kubernetes/primary-cluster.yaml ''${@:2}
'' ''