Code Monkey home page Code Monkey logo

debug-hcloud-api's Introduction

Debug hcloud reverse-proxy

This repo contains a mutatingwebhook that uses the ENV variable HCLOUD_ENDPOINT to redirect all requests that normally go to api.hetzner.cloud to a reverse-proxy that stores and forwards the request. The code for the webhook is located under webhook. A manifest to use the webhook and to redirect requests to a reverse proxy can be found under k8s/mutatingwebhook.yaml. To analyze a cluster you can just:

kubectl apply -f https://raw.githubusercontent.com/23technologies/debug-hcloud-api/5852b622e15760a6f69cd60f50cda3d6834e0cf3/k8s/mutatingwebhook.yaml

Reverse proxy configuration

Furthermore this repository contains files to configure a reverse proxy and to setup prometheus and grafana for it. To create a reverse proxy first setup cert-manager and the letsencrypt-prod clusterissuer. Next install nginx via helm chart and the values located under k8s/helm/nginx.yaml. These values install nginx along with a sidecar that reads the accesslog of nginx and exposes them as a prometheus-metric, to make these metrics available in the whole cluster please apply k8s/reverse-proxy-metrics-service.yaml. To configure the sidecar properly please apply k8s/configmap-nginx-accesslog-to-metrics-exporter.yaml. To create the reverse-proxy ingress, please apply k8s/ingress-mitm-reverse-proxy.yaml. If you want the remaining tokens as an additional metric also apply k8s/hcloud-remaining-tokens-metric.yaml, make sure that you add the token that you want to monitor to the included script. You can scrape your metrics with prometheus and the provided values under k8s/helm/prometheus.yaml. You can graph them with grafana with the grafana helmchart and the values under k8s/helm/grafana.yaml`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.