k8s resource reloader
K8srr is a sidecar that watch image tag in registry and change annotation on resource in case of digest changes.
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"
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.