github-edouard-devouge / nightwatch

Track freshly released docker images in a kubernetes cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NightWatch

About

NightWatch is a tool to monitor docker images deployed in a kubernetes cluster and track for new tags released in the registry.

WebUi screenshot

An all-in-one docker image is released including these components:

  • Daemon: is the job that watches every hour in the kubernetes cluster for images and in the registry for new tags.
  • API: is an http endpoint exposing both: daemon lifecycle related actions and a REST CRUD api. An OpenApi / Swagger doc is also exposed (route: /api/v1/)
  • Metrics: exposes prometheus metrics at OpenMetrics format (route: /metrics)
  • WebUI: is a simple web console (route: /)

For now, only docker.io and quay.io registries are supported.

Getting started

The simplest way to start is to chose the in-cluster deployment strategy:

  1. Clone this repo:
    git clone git@github.com:edevouge/nightwatch.git
  2. Edit the example of kubernetes yaml manifests to match your environnement requirements
  3. Apply manifests to your kubernetes cluster:
    kubectl apply -f ./nightwatch/kubernetes/
  4. Bind the kubernetes service port to your localhost:
    kubectl port-forward -n nightwatch svc/nightwatch 8000:80
  5. Access the service:

Filter tags

As tag names are free text fields in most docker compatible registries, it could be useful to ignore some tags containing strings like: latest, master, .*ubuntu, .*amd, etc.

NightWatch implements powerful filters to select eligible tags matching a regular expression. These filters could be global or scoped at registry or repository levels.

Default filters could be found here and could be extended using a configmap like this one.

About

Track freshly released docker images in a kubernetes cluster

License:Apache License 2.0


Languages

Language:Python 50.9%Language:Vue 30.0%Language:Shell 5.4%Language:Makefile 5.1%Language:JavaScript 4.3%Language:Dockerfile 3.2%Language:HTML 1.2%