Sign inSign up

n8500x/prometheus-adapter

By n8500x

•Updated over 1 year ago

Prometheus Adapter

Image
0

130

n8500x/prometheus-adapter repository overview

⁠Prometheus Adapter

Customized build of the Kubernetes Prometheus Adapter for serving custom, resource, and external metrics to the Kubernetes metrics APIs.

⁠Overview

This image is a thin wrapper around the upstream registry.k8s.io/prometheus-adapter/prometheus-adapter:v0.12.0 image. It keeps the upstream binary, entrypoint, and command unchanged, and only re-declares the runtime user.

The Dockerfile briefly switches to root and then explicitly sets the runtime user back to 65534:65534 (the nobody/nogroup UID/GID). No files, binaries, or configuration in the base image are added or altered. The net effect versus upstream is an explicit, pinned non-root runtime user.

⁠Quick start

docker pull n8500x/prometheus-adapter

Prometheus Adapter is not run standalone — it is deployed in-cluster as a Kubernetes API extension (an APIService backing custom.metrics.k8s.io, external.metrics.k8s.io, and/or metrics.k8s.io). Deploy it the usual way, typically via the upstream Helm chart or manifests, pointing the image at n8500x/prometheus-adapter and supplying your adapter config and Prometheus URL.

⁠What's inside

  • Upstream base: registry.k8s.io/prometheus-adapter/prometheus-adapter:v0.12.0
  • Modification: the runtime user is explicitly set to 65534:65534 (nobody/nogroup). Everything else — the adapter binary, ENTRYPOINT, and CMD — is inherited unchanged from the upstream image.

⁠Configuration

  • Runtime user: 65534:65534 (non-root).
  • Entrypoint / command: inherited from the upstream image (not overridden).
  • Adapter config: none is baked into this image. Provide the adapter's rules configuration and the --prometheus-url flag through your deployment (e.g. a mounted ConfigMap and container args), exactly as with the upstream image.

⁠Build

docker build -t n8500x/prometheus-adapter C:/Users/luked/github/docker/prometheus-adapter

⁠Notes

  • This image is functionally equivalent to upstream v0.12.0; the only difference is the explicitly pinned non-root UID/GID 65534:65534.
  • The USER root step in the Dockerfile performs no modifications before returning to the non-root user.
  • Running as UID 65534 requires that any mounted config/cert paths be readable by that user.

Tag summary

Content type

Image

Digest

sha256:2f499b02f…

Size

36.5 MB

Last updated

over 1 year ago

docker pull n8500x/prometheus-adapter:v0.12.0-v1.0.0