From 18bb275a6133c99d3b46a9d3963421dd93ade3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mudrini=C4=87?= Date: Thu, 19 Sep 2019 10:12:36 +0200 Subject: [PATCH] Update default admission controllers for 1.16 --- pkg/kubeflags/data.go | 16 ++++++++++++++++ pkg/kubeflags/flags.go | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/pkg/kubeflags/data.go b/pkg/kubeflags/data.go index 367126d5a..f6a828956 100644 --- a/pkg/kubeflags/data.go +++ b/pkg/kubeflags/data.go @@ -58,4 +58,20 @@ var ( "ValidatingAdmissionWebhook", "ResourceQuota", } + + defaultAdmissionControllersv116x = []string{ + "NamespaceLifecycle", + "LimitRanger", + "ServiceAccount", + "TaintNodesByCondition", + "Priority", + "DefaultTolerationSeconds", + "DefaultStorageClass", + "StorageObjectInUseProtection", + "PersistentVolumeClaimResize", + "MutatingAdmissionWebhook", + "ValidatingAdmissionWebhook", + "RuntimeClass", + "ResourceQuota", + } ) diff --git a/pkg/kubeflags/flags.go b/pkg/kubeflags/flags.go index 88f296f65..9f6eed9b2 100644 --- a/pkg/kubeflags/flags.go +++ b/pkg/kubeflags/flags.go @@ -26,6 +26,7 @@ var ( constrainv1130v1132 = mustConstraint(">= 1.13.0, < 1.13.3") constrainv1133v114x = mustConstraint(">= 1.13.3, < 1.15.0") constrainv115x = mustConstraint("1.15.x") + constrainv116x = mustConstraint("1.16.x") ) // DefaultAdmissionControllers return list of default admission controllers for @@ -38,10 +39,12 @@ func DefaultAdmissionControllers(kubeVersion *semver.Version) string { return strings.Join(defaultAdmissionControllersv1133v114x, ",") case constrainv115x.Check(kubeVersion): return strings.Join(defaultAdmissionControllersv115x, ",") + case constrainv116x.Check(kubeVersion): + return strings.Join(defaultAdmissionControllersv116x, ",") } // return same as for last known release - return strings.Join(defaultAdmissionControllersv115x, ",") + return strings.Join(defaultAdmissionControllersv116x, ",") } func mustConstraint(c string) *semver.Constraints {