mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #220196 from LongerHV/init-polaris
kubernetes-polaris: init at 7.3.2
This commit is contained in:
commit
3a639575a8
3 changed files with 60 additions and 0 deletions
|
@ -8684,6 +8684,12 @@
|
|||
fingerprint = "74F5 E5CC 19D3 B5CB 608F 6124 68FF 81E6 A785 0F49";
|
||||
}];
|
||||
};
|
||||
longer = {
|
||||
email = "michal@mieszczak.com.pl";
|
||||
name = "Michał Mieszczak";
|
||||
github = "LongerHV";
|
||||
githubId = 46924944;
|
||||
};
|
||||
lourkeur = {
|
||||
name = "Louis Bettens";
|
||||
email = "louis@bettens.info";
|
||||
|
|
52
pkgs/tools/security/kubernetes-polaris/default.nix
Normal file
52
pkgs/tools/security/kubernetes-polaris/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, packr, ... }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kubernetes-polaris";
|
||||
version = "7.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FairwindsOps";
|
||||
repo = "polaris";
|
||||
rev = version;
|
||||
sha256 = "sha256-LteclhYNMFNuGjFSuhPuY9ZA1Vlq4DPdcCGAQaujwh8=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-3htwwRkUOf8jLyLfRlhcWhftBImmcUglc/PP/Yk2oF0=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.Version=${version}"
|
||||
"-X main.Commit=${version}"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
${packr}/bin/packr2 -v --ignore-imports
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd polaris \
|
||||
--bash <($out/bin/polaris completion bash) \
|
||||
--fish <($out/bin/polaris completion fish) \
|
||||
--zsh <($out/bin/polaris completion zsh)
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
$out/bin/polaris help
|
||||
$out/bin/polaris version | grep 'Polaris version:${version}'
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Validate and remediate Kubernetes resources to ensure configuration best practices are followed";
|
||||
homepage = "https://www.fairwinds.com/polaris";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = with maintainers; [ longer ];
|
||||
};
|
||||
}
|
|
@ -18293,6 +18293,8 @@ with pkgs;
|
|||
|
||||
kubeprompt = callPackage ../development/tools/kubeprompt { };
|
||||
|
||||
kubernetes-polaris = callPackage ../tools/security/kubernetes-polaris { };
|
||||
|
||||
kubescape = callPackage ../tools/security/kubescape { };
|
||||
|
||||
kubesec = callPackage ../tools/security/kubesec { };
|
||||
|
|
Loading…
Reference in a new issue