From 736d309390fd5a0a1ddf571c87c442379c551876 Mon Sep 17 00:00:00 2001 From: nikolaypopov Date: Mon, 8 Jul 2024 21:04:44 +0000 Subject: [PATCH] PTX-25021 Add API acknowledgement for OCP 4.16 Signed-off-by: nikolaypopov --- drivers/scheduler/openshift/openshift.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scheduler/openshift/openshift.go b/drivers/scheduler/openshift/openshift.go index 28e2f2e91..05116983d 100644 --- a/drivers/scheduler/openshift/openshift.go +++ b/drivers/scheduler/openshift/openshift.go @@ -78,6 +78,8 @@ var ( openshiftVersion_4_12, _ = version.NewVersion("4.12.0") openshiftVersion_4_13, _ = version.NewVersion("4.13.0") openshiftVersion_4_14, _ = version.NewVersion("4.14.0") + openshiftVersion_4_15, _ = version.NewVersion("4.15.0") + openshiftVersion_4_16, _ = version.NewVersion("4.16.0") ) type openshift struct { @@ -753,8 +755,10 @@ func ackAPIRemoval(ocpVer string) error { patchData = "{\"data\":{\"ack-4.11-kube-1.25-api-removals-in-4.12\":\"true\"}}" } else if openshiftVersion.GreaterThanOrEqual(openshiftVersion_4_13) && openshiftVersion.LessThan(openshiftVersion_4_14) { patchData = "{\"data\":{\"ack-4.12-kube-1.26-api-removals-in-4.13\":\"true\"}}" - } else if openshiftVersion.GreaterThanOrEqual(openshiftVersion_4_14) { + } else if openshiftVersion.GreaterThanOrEqual(openshiftVersion_4_14) && openshiftVersion.LessThan(openshiftVersion_4_15) { patchData = "{\"data\":{\"ack-4.13-kube-1.27-api-removals-in-4.14\":\"true\"}}" + } else if openshiftVersion.GreaterThanOrEqual(openshiftVersion_4_16) { + patchData = "{\"data\":{\"ack-4.15-kube-1.29-api-removals-in-4.16\":\"true\"}}" } else { log.Infof("Providing acknowledgment of API removal is not needed when upgrading to OCP version [%s]", openshiftVersion.String()) return nil