Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-1385

APIRemovedInNextReleaseInUse alert for priorityclasses

    XMLWordPrintable

Details

    • Logging (Core) - Sprint 201
    • Passed
    • NEW
    • NEW
    • Hide
      The `priorityclasses.v1beta1.scheduling.k8s.io` was removed in 1.22 and replaced by `priorityclasses.v1.scheduling.k8s.io` (`v1beta1` was replaced by `v1`). Before this update, `APIRemovedInNextReleaseInUse` alerts were generated for `priorityclasses` because `v1beta1` was still present . This update resolves the issue by replacing `v1beta1` with `v1`. The alert is no longer generated.
      Show
      The `priorityclasses.v1beta1.scheduling.k8s.io` was removed in 1.22 and replaced by `priorityclasses.v1.scheduling.k8s.io` (`v1beta1` was replaced by `v1`). Before this update, `APIRemovedInNextReleaseInUse` alerts were generated for `priorityclasses` because `v1beta1` was still present . This update resolves the issue by replacing `v1beta1` with `v1`. The alert is no longer generated.

    Description

      Description of problem:
      APIRemovedInNextReleaseInUse alerts for validatingwebhookconfigurations/customresourcedefinitions/ingresses/rolebindings/roles/priorityclasses, except priorityclasses, the issue with other resources are tracked with bug 1947719 and other bugs. this bug is only for priorityclasses.

      search with ALERTS

      {alertname="APIRemovedInNextReleaseInUse"}

      with prometheus API

      1. token=`oc sa get-token prometheus-k8s -n openshift-monitoring`
      2. oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 – curl -k -H "Authorization: Bearer $token" 'https://prometheus-k8s.openshift-monitoring.svc:9091/api/v1/query?query=ALERTS%7Balertname%3D%22APIRemovedInNextReleaseInUse%22%7D' | jq
        {
        "status": "success",
        "data": {
        "resultType": "vector",
        "result": [
        Unknown macro: { "metric"}

        ,

        Unknown macro: { "metric"}

        ,

        Unknown macro: { "metric"}

        ,

        Unknown macro: { "metric"}

        ,

        Unknown macro: { "metric"}

        ,

        Unknown macro: { "metric"}

        ]
        }
        }

      checked the resources version, they are v1

      1. for i in validatingwebhookconfigurations customresourcedefinitions ingresses rolebindings roles priorityclasses; do echo $i; oc explain $i | head -n 2; echo -e "\n"; done
        validatingwebhookconfigurations
        KIND: ValidatingWebhookConfiguration
        VERSION: admissionregistration.k8s.io/v1

      customresourcedefinitions
      KIND: CustomResourceDefinition
      VERSION: apiextensions.k8s.io/v1

      ingresses
      KIND: Ingress
      VERSION: networking.k8s.io/v1

      rolebindings
      KIND: RoleBinding
      VERSION: rbac.authorization.k8s.io/v1

      roles
      KIND: Role
      VERSION: rbac.authorization.k8s.io/v1

      priorityclasses
      KIND: PriorityClass
      VERSION: scheduling.k8s.io/v1

      Version-Release number of selected component (if applicable):

      1. oc version
        Client Version: 4.8.0-0.nightly-2021-05-13-180601
        Server Version: 4.8.0-0.nightly-2021-05-13-180601
        Kubernetes Version: v1.21.0-rc.0+6998007

      How reproducible:
      always

      Steps to Reproduce:
      1. see the description
      2.
      3.

      Actual results:
      APIRemovedInNextReleaseInUse alert for priorityclasses

      Expected results:
      no alert

      Additional info:
      alert: APIRemovedInNextReleaseInUse
      expr: group by(group, version, resource) (apiserver_requested_deprecated_apis

      {removed_release="1.22"}

      ) and (sum by(group, version, resource) (rate(apiserver_request_total[4h]))) > 0
      for: 1h
      labels:
      severity: info
      annotations:
      message: Deprecated API that will be removed in the next version is being used. Removing the workload that is using the "{{$labels.group"}}."{{$labels.version"}}/"{{$labels.resource"}} API might be necessary for a successful upgrade to the next cluster version. Refer to the apirequestcount.apiserver.openshift.io resources to identify the workload.

      Attachments

        Activity

          People

            jchaloup@redhat.com Jan Chaloupka
            jchaloup@redhat.com Jan Chaloupka
            Giriyamma K R Giriyamma K R (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: