Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jetstack/version-checker
Kubernetes utility for exposing image versions in use, compared to latest available upstream, as metrics.
https://github.com/jetstack/version-checker
docker gcr go grafana grafana-dashboard image kubernetes prometheus quay sre utility version
Last synced: 2 days ago
JSON representation
Kubernetes utility for exposing image versions in use, compared to latest available upstream, as metrics.
- Host: GitHub
- URL: https://github.com/jetstack/version-checker
- Owner: jetstack
- License: apache-2.0
- Created: 2020-08-13T15:17:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-08T16:53:01.000Z (3 days ago)
- Last Synced: 2025-01-09T03:12:27.574Z (3 days ago)
- Topics: docker, gcr, go, grafana, grafana-dashboard, image, kubernetes, prometheus, quay, sre, utility, version
- Language: Go
- Homepage: https://jetstack.io
- Size: 1010 KB
- Stars: 709
- Watchers: 15
- Forks: 80
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-repositories - jetstack/version-checker - Kubernetes utility for exposing image versions in use, compared to latest available upstream, as metrics. (Go)
README
# version-checker
![GitHub Release](https://img.shields.io/github/v/release/jetstack/version-checker)
[![Go Report Card](https://goreportcard.com/badge/github.com/jetstack/version-checker)](https://goreportcard.com/report/github.com/jetstack/version-checker)
[![Tests](https://github.com/jetstack/version-checker/actions/workflows/build-test.yaml/badge.svg)](https://github.com/jetstack/version-checker/actions/workflows/build-test.yaml?query=branch%3Amain)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/jetstack/version-checker)version-checker is a Kubernetes utility for observing the current versions of
images running in the cluster, as well as the latest available upstream. These
checks get exposed as Prometheus metrics to be viewed on a dashboard, or _soft_
alert cluster operators.## Registries
version-checker supports the following registries:
- [ACR](https://azure.microsoft.com/en-us/services/container-registry/)
- [Docker Hub](https://hub.docker.com/)
- [ECR](https://aws.amazon.com/ecr/)
- [GCR](https://cloud.google.com/container-registry/) (inc gcr facades such as k8s.gcr.io)
- [Quay](https://quay.io/)
- Self Hosted (Docker V2 API compliant registries, e.g.
[registry](https://hub.docker.com/_/registry),
[artifactory](https://jfrog.com/artifactory/) etc.). Multiple self hosted
registries can be configured at once.These registries support authentication.
---
## Installation
version-checker can be installed as either static manifests;
```sh
$ kubectl apply -k ./deploy/yaml
```Or through helm;
```sh
$ helm repo add jetstack https://charts.jetstack.io
"jetstack" has been added to your repositories
$ helm install version-checker jetstack/version-checker
NAME: version-checker
LAST DEPLOYED: Wed Jul 12 17:47:41 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```The helm chart supports creating a Prometheus/ServiceMonitor to expose the
version-checker metrics.#### Grafana Dashboard
A [grafana dashboard](https://grafana.com/grafana/dashboards/12833) is also
available to view the image versions as a table.![](img/grafana.jpg)
Grafana Dashboard
---
## Options
By default, without the flag `-a, --test-all-containers`, version-checker will
only test containers where the pod has the annotation
`enable.version-checker.io/*my-container*`, where `*my-container*` is the `name`
of the container in the pod.version-checker supports the following annotations present on **other** pods to
enrich version checking on image tags:- `pin-major.version-checker.io/my-container: 4`: will pin the major version to
check to 4 (`v4.0.0`).- `pin-minor.version-checker.io/my-container: 3`: will pin the minor version to
check to 3 (`v0.3.0`).- `pin-patch.version-checker.io/my-container: 23`: will pin the patch version to
check to 23 (`v0.0.23`).- `use-metadata.version-checker.io/my-container: "true"`: will allow to search
for image tags which contain information after the first part of the semver
string. For example, this can be pre-releases or build metadata
(`v1.2.4-alpha.0`, `v1.2.3-debian-r3`).- `use-sha.version-checker.io/my-container: "true"`: will check against the latest
SHA tag available. Essentially, the latest image by date. This is silently
set to true if no image tag, or "latest" image tag is set. Cannot be used with
any other options.- `match-regex.version-checker.io/my-container: ^v\d+\.\d+\.\d+-debian-`: is
used for only comparing against image tags which match the regex set. For
example, the above annotation will only check against image tags which have
the form of something like `v1.3.4-debian-r30`.
`use-metadata.version-checker.io` is not required when this is set. All
other options, apart from URL overrides, are ignored when this is set.- `override-url.version-checker.io/my-container: docker.io/bitnami/etcd`: is
used to change the URL for where to lookup where the latest image version
is. In this example, the current version of `my-container` will be compared
against the image versions in the `docker.io/bitnami/etcd` registry.## Known configurations
From time to time, version-checker may need some of the above options applied to determine the latest version,
depending on how the maintainers publish their images. We are making a conscious effort to collate some of these configurations.See [known-configurations.md](known-configurations.md) for more details.
## Metrics
By default, version-checker will expose the version information as Prometheus
metrics on `0.0.0.0:8080/metrics`.