Skip to content

Commit

Permalink
patch kustomize to --enable-alpha-plugins always
Browse files Browse the repository at this point in the history
  • Loading branch information
jashan-lco committed Sep 13, 2024
1 parent 98c64c1 commit 62bf250
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 65 deletions.
4 changes: 2 additions & 2 deletions cd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
name = "Ensure staging kustomization output is up to date";
pass_filenames = false;
raw.always_run = true;
entry = "${pkgs.kustomize}/bin/kustomize build staging/ --output output/staging/manifest.yaml";
entry = "kustomize build staging/ --output output/staging/manifest.yaml";
};

kustomize-build-prod = {
enable = false;
name = "Ensure prod kustomization output is up to date";
pass_filenames = false;
raw.always_run = true;
entry = "${pkgs.kustomize}/bin/kustomize build prod/ --output output/prod/manifest.yaml";
entry = "kustomize build prod/ --output output/prod/manifest.yaml";
};
};

Expand Down
11 changes: 9 additions & 2 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ in

perSystem = { system, pkgs, ... }: {

devenv.shells.default = {
devenv.shells.default = let
kustomize = pkgs.kustomize.overrideAttrs (prevAttrs: {
postPatch = ''
substituteInPlace kustomize/commands/build/flagenableplugins.go \
--replace 'false,' 'true,'
'';
});
in {
name = "devenv-k8s";

imports = [
Expand All @@ -32,7 +39,7 @@ in
pkgs.kind
pkgs.kubeseal
pkgs.kubernetes-helm
pkgs.kustomize
kustomize
pkgs.jq
pkgs.ctlptl
] ++ localFlake.withSystem system ({self', ...}: [
Expand Down
Loading

0 comments on commit 62bf250

Please sign in to comment.