Skip to content

Prometheus asynchronous metric exporter that simulates builds on your OCP environment and collects information such as total build time and failures/success count.

Notifications You must be signed in to change notification settings

RazcoDev/openshift-builds-exporter

Repository files navigation

Openshift Builds Exporter

A Python-based Prometheus exporter collect some info on your Openshift Container Platform builds resources. Using AsyncIO Prometheus client for Python 3+. /metrics example : enter image description here

Requirements

Configuration

  • Uses environment variables to define the connection to OCP environment and other configurations.
  • You can give your user cluster-reader role with 2 options:
  1. Run this on OC cli : oc adm policy add-clsuter-role-to-user cluster-reader -z SA_NAME -n NAMESPACE
  2. Create cluster-role binding with this .yaml file :
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: build-metric
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: default
    namespace: build-metric-dev

There is official documentation by Openshift.com on how to give cluster role for your OCP user.

How to Use

  • First choose your exporter OCP namespace, such as kubesystem.
  • Delpoy new Python application from OCP catalog.
  • Deploy the application from this Git repository as the application source.
  • Edit your Deployment environment variables, here's a nice example : Environment variables example

Notes

  • More documentation will be comming soon !

About

Prometheus asynchronous metric exporter that simulates builds on your OCP environment and collects information such as total build time and failures/success count.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages