OpenShift Pipelines is using deprecated APIs in OCP 4.8
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4.8
- Red Hat OpenShift Pipelines
Issue
APIRemovedInNextEUSReleaseInUseandAPIRemovedInNextReleaseInUsealert has been triggered after upgrading OCP 4.8 cluster for OpenShift Pipelines.- Following the KCS for preparing to upgrade to OpenShift Container Platform 4.9, the
openshift-pipelines-operator/v0.0.0userAgentappears to be using APIs that are to be removed.
Example:
$ oc get apirequestcounts.apiserver.openshift.io validatingwebhookconfigurations.v1beta1.admissionregistration.k8s.io -o jsonpath='{range .status.last24h..byUser[*]}{..byVerb[*].verb}{","}{.username}{","}{.userAgent}{"\n"}{end}' | sort -k 2 -t, -u | column -t -s, -NVERBS,USERNAME,USERAGENT
VERBS USERNAME USERAGENT
watch system:serviceaccount:openshift-pipelines:tekton-pipelines-controller openshift-pipelines-webhook/v0.0.0
watch system:serviceaccount:openshift-pipelines:tekton-triggers-controller openshift-pipelines-triggers-webhook/v0.0.0
Resolution
The openshift-pipelines-operator/v0.0.0 userAgent is reading the deprecated API customresourcedefinitions.v1beta1.apiextensions.k8s.io, but not using it.
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 Pipelines 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
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.