github-rate-limits-prometheus-exporter

by kalgurn

Helm chartv0.2.15App v3.2.0Verified publisher

A Helm chart for Github Rate Limits prometheus exporter

About this chart

Github Rate Limit prometheus exporter helm chart

This helm chart helps to install and configure github-rate-limits-prometheus-exporter

The helm chart itself is a simplified version of a generated helm chart for 'any' service. Values which can be configured can be viewed here

To add a repository to your local helm repos

helm repo add grl-exporter https://kalgurn.github.io/github-rate-limits-prometheus-exporter-charts/

To install the chart

helm upgrade --install \
    release_name grl-exporter/github-rate-limits-prometheus-exporter \
    -f path_to_values/with_github_configuration.yaml

Application specific configuration

GitHub PAT

github:
  authType: pat 
  secretName: secret # Name of a secret which stores PAT

GitHub App

github:
  authType: app
  appID: 1 # GitHub applicaiton ID
  installationID: 1 # GitHub App installation ID
  privateKeyPath: "/tmp" # path to which the private key will be mounted
  secretName: secret # name of a secret which stores key.pem

Example values file

github:
  authType: pat
  secretName: gh-token

replicaCount: 1

image:
  repository: ghcr.io/kalgurn/grl-exporter
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion.
  tag: "v0.1.4"

resources:
  limits:
    cpu: 100m
    memory: 128Mi
  requests:
    cpu: 100m
    memory: 128Mi

Prerequisites

For the application to run the Kubernetes secrets should be installed in the same namespace. E.g., for GitHub App you can create a secret from the key.pem with the command below.

kubectl create secret generic github-key --from-file=key.pem

It will create a secret with a name github-key and a private key stored within the keys data["key.pem"]

For the PAT the easiest way would be

echo -n 'ghb_token' > ./token
kubectl create secret generic gh-token --from-file=token

The command above will create a secret gh-token in the current namespace and a token stored within keys data["token"]

Deploy github-rate-limits-prometheus-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has github-rate-limits-prometheus-exporter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartgithub-rate-limits-prometheus-exporter is pinned at v0.2.15 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply