From df821b1b87d835a4be25b420b35ea3f53026d10e Mon Sep 17 00:00:00 2001 From: Sebastian Widmer Date: Mon, 18 Mar 2024 11:54:45 +0100 Subject: [PATCH] Disable NS quota in agent if UsageProfiles are disabled. (#88) They are still active in Kyverno if not actively disabled there. --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 6cad286..0d777e9 100644 --- a/main.go +++ b/main.go @@ -229,7 +229,10 @@ func main() { Client: mgr.GetClient(), Decoder: admission.NewDecoder(mgr.GetScheme()), - Skipper: psk, + Skipper: skipper.NewMultiSkipper( + skipper.StaticSkipper{ShouldSkip: disableUsageProfiles}, + psk, + ), OrganizationLabel: conf.OrganizationLabel, UserDefaultOrganizationAnnotation: conf.UserDefaultOrganizationAnnotation,