Bug 2000126

Summary: high load on Prometheus using the ptp operator
Product: OpenShift Container Platform Reporter: Sebastian Scheinkman <sscheink>
Component: NetworkingAssignee: Sebastian Scheinkman <sscheink>
Networking sub component: ptp QA Contact: elevin
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified    
Version: 4.9   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:50:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sebastian Scheinkman 2021-09-01 13:00:56 UTC
Description of problem:
The ptp operator use the lowest number possible for the metrics scraping. (10sec)
This makes a high load on Prometheus in large clusters

Comment 3 elevin 2021-10-06 13:26:37 UTC
Server Version: 4.9.0-rc.0
ptp-operator.4.9.0-202110041951

-------------------------------------

interval: 30s

-------------------------------------

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  creationTimestamp: "2021-10-06T07:58:37Z"
  generation: 2
  labels:
    name: monitor-ptp
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:name: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"b3effb49-0e6f-4944-844f-cf3fd44acc8c"}: {}
      f:spec:
        .: {}
        f:endpoints: {}
        f:jobLabel: {}
        f:namespaceSelector:
          .: {}
          f:matchNames: {}
        f:selector:
          .: {}
          f:matchLabels:
            .: {}
            f:name: {}
    manager: ptp-operator
    operation: Update
    time: "2021-10-06T07:58:37Z"
  name: monitor-ptp
  namespace: openshift-ptp
  ownerReferences:
  - apiVersion: ptp.openshift.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: PtpOperatorConfig
    name: default
    uid: b3effb49-0e6f-4944-844f-cf3fd44acc8c
  resourceVersion: "251182"
  uid: f6642746-45b8-453f-835a-41cc00464871
spec:
  endpoints:
  - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    interval: 30s
    port: metrics
    scheme: https
    tlsConfig:
      caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
      serverName: ptp-monitor-service.openshift-ptp.svc
  jobLabel: app
  namespaceSelector:
    matchNames:
    - openshift-ptp
  selector:
    matchLabels:
      name: ptp-monitor-service

Comment 6 errata-xmlrpc 2021-10-18 17:50:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759