helm-version-checker

module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2021 License: Apache-2.0

README

helm-version-checker

Build Status Go Report Card codecov

Helm version monitoring utility for watching updated and deprecated helm releases and reporting the result as metrics.

This tool is heavily inspired by the awesome tools:

Heavy lifting supplied by helm-whatup

The actual Helm version checking is done by helm-whatup, originally developed by bacongobbler and now maintained by fabmation-gmbh

Table of contents

Table of contents generated with markdown-toc

Features

Looking for Deprecated Helm Releases

Installation

helm-version-checker can be installed as a standalone static binary from the release page

latest release

./helm-version-checker

...
# Now open browser at:
#   -  http://localhost:8081/
#   -  http://localhost:8080/metrics
In Kubernetes as static manifests

helm-version-checker can be installed as static manifests:

$ kubectl create namespace helm-version-checker

# Deploy helm-version-checker, with kubernetes services and demo configuration
$ kubectl apply -n helm-version-checker -f deploy/yaml/deploy.yaml

# If you are using the Grafana sidecar for loading dashboards
$ kubectl apply -n helm-version-checker -f deploy/yaml/grafana-dashboard-cm.yaml

# If you are using the Prometheus CRDs for setting up scrape targets
$ kubectl apply -n helm-version-checker -f deploy/yaml/servicemonitor.yaml
Helm

helm-version-checker can be installed as as helm release:

$ kubectl create namespace helm-version-checker
$ helm install helm-version-checker deploy/charts/helm-version-checker --namespace helm-version-checker

Depending on your setup, you may need to modify the ServiceMonitor to get Prometheus to scrape it in a particular namespace. See this.

You may also need to add additional labels to the ServiceMonitor. If you have installed the prometheus-community/kube-prometheus-stack with the name of prometheus the following should work:

$ helm upgrade helm-version-checker deploy/charts/helm-version-checker \
    --namespace helm-version-checker    \
    --set=grafanaDashboard.enabled=true \
    --set=serviceMonitor.enabled=true   \
    --set=serviceMonitor.additionalLabels.release=prometheus
Kustomize

helm-version-checker can be installed using kustomize:

Create a kustomization.yaml file:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: helm-version-checker
resources:
- github.com/mogensen/helm-version-checker/deploy/yaml
# optionally pin to a specific git tag
# - github.com/mogensen/helm-version-checker/deploy/yaml?ref=helm-version-checker-0.0.1

Use the kustomization.yaml file to preview and deploy helm-version-checker:

$ kustomize build kustomization.yaml | less # preview yaml manifests
$ kustomize build kustomization.yaml | kubectl apply --dry-run=client -f - # dry-run apply manifests
$ kustomize build kustomization.yaml | kubectl apply -f - # deploy manifests

Web dashboard

By default, helm-version-checker will expose a web ui on http://0.0.0.0:8081/.

Web dashboard

Metrics

By default, helm-version-checker will expose the version information as Prometheus metrics on http://0.0.0.0:8080/metrics.

Grafana Dashboard

A Grafana dashboard is also included in this repository. It is located in the deployment folder: deploy/yaml/grafana-dashboard-cm.yaml

Grafana Dashboard

Local development

Build a docker image, load it into kind and deploy helm-version-checker and promeheus/grafana stuff:

make dev-kind-create
make image dev-kind-install

Access the local infrastructure here:

System URL
Prometheus: http://prometheus.localtest.me/graph?g0.expr=helm_version_checker_is_latest%7B%7D&g0.tab=1&g0.stacked=0&g0.range_input=1h&g1.expr=helm_version_checker_is_deprecated%7B%7D&g1.tab=1&g1.stacked=0&g1.range_input=1h
Grafana: http://grafana.localtest.me/d/helm-version-checker/helm-version-checker
Dashboard: http://helm-version-checker.localtest.me/

Directories

Path Synopsis
cmd
app
pkg
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL