Skip to content
A sidecar that watch image tag in registry and change annotation on resource in case of digest changes
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/k8s-resource-reloader
pkg
.gitignore
LICENSE
README.md Extract reloader from antiopa sources Apr 1, 2019

README.md

k8s resource reloader

K8srr is a sidecar that watch image tag in registry and change annotation on resource in case of digest changes.

Usage

containters:
- main container here
  ...
- image: flant/k8s-resource-reloader:0.0.1
  env:
  - name: "K8SRR_MONITOR_CONTAINER"
    value: "registry.gitlab.company_name.domain/group/project:a-meaningful-tag"
  - name: "K8SRR_POLL_INTERVAL"
    value: "10s"

Work

k8srr parse image name to get a registry url and use a registry secret to get username and password.

It also retrieves a controller manifest and get replicas to implement a poll interval to reduce the burden of a registry.

When digest of the image is changed, k8srr appends annotation to controller resource to reload pods.

Note: k8srr doesn't pull images, so you should use imagePullPolicy: Always or another method.

You can’t perform that action at this time.