OpenShift GitOps is using deprecated APIs in OCP 4.8

Solution Verified - Updated

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.8
  • Red Hat OpenShift GitOps

Issue

  • APIRemovedInNextEUSReleaseInUse and APIRemovedInNextReleaseInUse alert has been triggered after upgrading Red Hat Openshift cluster to 4.8 into the argocd-application-controller.
  • Following the KCS for preparing to upgrade to OpenShift Container Platform 4.9, the argocd-application-controller/v0.0.0 userAgent appears to be using APIs that are to be removed.

Resolution

The argocd-application-controller/v0.0.0 userAgent is reading the deprecated API customresourcedefinitions.v1beta1.apiextensions.k8s.io, but not using it. In any case, it's recommended to upgrade to the latest OpenShift GitOps operator available before upgrading the cluster.

Check if other workloads in the cluster are also using the deprecated APIs following KCS 6329921: Preparing to upgrade to OpenShift Container Platform 4.9.

Root Cause

The OpenShift GitOps operator is reading the deprecated APIs, but not using them.

Diagnostic Steps

Check the customresourcedefinitions.v1beta1.apiextensions.k8s.io apirequestcount to find the originator of the API requests:

$ oc get apirequestcounts customresourcedefinitions.v1beta1.apiextensions.k8s.io \
  -o jsonpath='{range .status.currentHour..byUser[*]}{..byVerb[*].verb}{","}{.username}{","}{.userAgent}{"\n"}{end}' \
  | sort -k 2 -t, -u | column -t -s, -NVERBS,USERNAME,USERAGENT
SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.