← Back to Pull requests

OCPBUGS-113708: align operator metrics port, probes, and TLS with controllercmd #1336

Closed
unknown closed this pull request without merging on Sep 02, 2026 08:33 UTC
View on GitHub
unknown unknown commented on Aug 28, 2026 12:21 UTC
Author

Hi Team,

The operator binary uses library-go's controllercmd which serves on port 8443 with TLS from /var/run/secrets/serving-cert. The deployment manifests incorrectly declared port 60000 with no health probes or serving-cert volume, causing broken metrics scraping and no liveness/readiness checks.

  • Change containerPort from 60000 to 8443 (deploy, e2e, CSV)

  • Add HTTPS liveness and readiness probes on /healthz

  • Mount serving-cert secret for TLS termination

  • Add resource requests (10m CPU, 50Mi memory)

  • Add operator metrics Service with serving-cert annotation

  • Add ServiceMonitor for Prometheus HTTPS scraping

  • Apply Service before Deployment in e2e setup for cert issuance
  • // Verification

    oc get pods -n openshift-cli-manager-operator -o wide
    NAME                                              READY   STATUS    RESTARTS      AGE   IP            NODE                                        NOMINATED NODE   READINESS GATES
    openshift-cli-manager-5f8df99d9c-94kxp            1/1     Running   0             85s   10.129.2.16   ip-10-0-42-185.us-east-2.compute.internal   <none>           <none>
    openshift-cli-manager-5f8df99d9c-zncsb            1/1     Running   0             85s   10.131.0.36   ip-10-0-15-125.us-east-2.compute.internal   <none>           <none>
    openshift-cli-manager-operator-5f7757d584-9dch8   1/1     Running   1 (86s ago)   88s   10.131.0.35   ip-10-0-15-125.us-east-2.compute.internal   <none>           <none>
    
    oc get pod/openshift-cli-manager-operator-5f7757d584-9dch8 -n openshift-cli-manager-operator -o jsonpath='{.spec.containers[0].ports}' | jq 
    [
      {
        "containerPort": 8443,
        "name": "https",
        "protocol": "TCP"
      }
    ]
    

    // Before PR:

    oc run probe-test --image=busybox --rm -it --restart=Never -- \
      sh -c "wget -qO- --no-check-certificate --timeout=5 https://10.131.0.25:60000 2>&1 && echo REACHABLE || echo UNREACHABLE"
    All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
    If you don't see a command prompt, try pressing enter.
    warning: couldn't attach to pod/probe-test, falling back to streaming logs: unable to upgrade connection: container probe-test not found in pod probe-test_default
    wget: can't connect to remote host (10.131.0.25): Connection refused
    UNREACHABLE
    pod "probe-test" deleted from default namespace
    

    // After PR:

    oc run probe-test --image=busybox --rm -it --restart=Never --   sh -c "wget -qO- --no-check-certificate --timeout=5 https://10.131.0.35:8443/healthz 2>&1 && echo REACHABLE || echo UNREACHABLE"
    All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
    If you don't see a command prompt, try pressing enter.
    warning: couldn't attach to pod/probe-test, falling back to streaming logs: unable to upgrade connection: container probe-test not found in pod probe-test_default
    okREACHABLE
    pod "probe-test" deleted from default namespace
    

    This PR is similar to
    1. https://github.com/openshift/secondary-scheduler-operator/pull/1625
    2. https://github.com/openshift/cluster-kube-descheduler-operator/pull/2366

    Diff: 410 lines (+307 / -103) across 5 files Reviewer: ropatil010 Review duration: 6971m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.68) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.68 · 410 lines diff across 5 files
    0.68
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.360
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.068
    Real PR Conversation Timeline
    1 comments
    "Review active on #1336"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 68% (HIGH) · Higher = larger blast radius
    68%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.9% · Safe to merge
    26.9%