Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNF-11234: Enable RTE metrics to be scraped securely by Prometheus #1035

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on Oct 6, 2024

  1. Enable metrics by default

    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    5402651 View commit details
    Browse the repository at this point in the history
  2. Ensure that NROP metrics are served securely

    This commit consist of the following changes:
    
    * Reenabled kube-rbac-proxy sidecar container to securely expose the /metrics endpoint for Prometheus scraping.
    * Added a secret to enforce HTTPS-only access to the /metrics endpoint, restricted to the Prometheus service account.
    * modified ServiceMonitor resource to enable Prometheus pods to scrape metrics.
    * Added an annotation to the deployment Service, which is monitored by the Service CA operator. This operator will generate the tls.key and tls.crt files inside the secret-kube-rbac-proxy-tls secret, which is used by the kube-rbac-proxy container.
    * Added Role and RoleBinding resources to grant the necessary permissions to the Prometheus service account.
    
    Most of this configuration was based on this guide:
    https://rhobs-handbook.netlify.app/products/openshiftmonitoring/collecting_metrics.md/
    
    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    86a85df View commit details
    Browse the repository at this point in the history
  3. make generate bundle manifests

    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    707c9e0 View commit details
    Browse the repository at this point in the history
  4. Enabled RTE metrics server by default

    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    eb3a59d View commit details
    Browse the repository at this point in the history
  5. Added sidecar to RTE DaemonSet

    This allows injecting the kube-rbac-proxy container into the RTE DaemonSet before deployment.
    
    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    dbceda2 View commit details
    Browse the repository at this point in the history
  6. Enable pulling sidecar image from operator

    Added functionality to pull the kube-proxy-sidecar image by default, using the same image as the operator.
    
    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    f9b59c7 View commit details
    Browse the repository at this point in the history
  7. Added RTE metrics package and manifests

    We will use the pkg/metrics to generate the needed metrics manifests to be applied by the operator.
    
    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    1655ed1 View commit details
    Browse the repository at this point in the history
  8. Add rule to operator ClusterRole to manage Service resource

    As part of enabling metrics for RTE, a Service resource is created during the deployment of the RTE metrics manifests by the operator. This commit grants the operator pod the necessary permissions to deploy the Service CR.
    
    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    7f22ac0 View commit details
    Browse the repository at this point in the history
  9. RTE metrics enablement

    * Integrating RTE metrics manifests to be deployed by the operator
    * This adds unit test for metrics components creation
    
    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    e741fe1 View commit details
    Browse the repository at this point in the history
  10. make generate

    Signed-off-by: Ronny Baturov <[email protected]>
    rbaturov committed Oct 6, 2024
    Configuration menu
    Copy the full SHA
    c25a99d View commit details
    Browse the repository at this point in the history