Categorygithub.com/terotuomala/k8s-image-watcher
modulepackage
0.0.11
Repository: https://github.com/terotuomala/k8s-image-watcher.git
Documentation: pkg.go.dev

# README

k8s-image-watcher

Application for watching and notifying image changes from daemonsets, deployments and statefulsets.

Install

Helm

helm repo add terotuomala https://terotuomala.github.io/k8s-image-watcher/

If notifications to Slack is enabled (disabled by default) add your Slack-token:

kubectl create ns k8s-image-watcher
kubectl -n k8s-image-watcher create secret generic slack-secret --from-literal=token=<your-slack-token>
helm upgrade --install k8s-image-watcher \
-n k8s-image-watcher \
--create-namespace \
terotuomala/k8s-image-watcher

Configuration

The following tables lists the configurable parameters of the k8s-image-watcher chart and their default values.

ParameterDefaultDescription
replicaCount1Desired number of pods
logging.levelinfoLog level: debug, info, warn, error
image.repositoryghcr.io/terotuomala/k8s-image-watcherImage repository
image.tag""Image tag
image.pullPolicyIfNotPresentImage pull policy
serviceAccount.createtrueWhether a service account should be created
securityContext{}The security context to be set on the k8s-image-watcher container
resources.requests.cpu1mPod CPU request
resources.requests.memory5MiPod memory request
resources.limits.cpu5mPod CPU limit
resources.limits.memory15MiPod memory limit
nodeSelector{}Node labels for pod assignment
tolerations[]List of node taints to tolerate
affinity{}Node/pod affinities
podAnnotations{}Pod annotations
watch.namespace""Which namespace(s) will be watched. Single namespace or all namespaces ("" = all namespaces)
watch.deploymenttrueWatch Deployments from watch.namespace namespace(s)
watch.daemonsetfalseWatch DaemonSets from watch.namespace namespace(s)
watch.statefulsetfalseWatch StatefulSets from watch.namespace namespace(s)
slack.enabledfalseEnable notifications to Slack
slack.channel""Slack channel name where to send notifications
slack.messageTitle""Slack message tittle

Local development

I like to use go-task in order to make the usage a bit easier:

Install depedencies

task deps

Install tools (k3d, skaffold) for local development

task tools

Create local k3s cluster using k3d

task create-k3s-cluster

Run the application in dev mode using skaffold (uses gcr.io/distroless/base-debian11:debug image)

task dev

Deploy the application using skaffold (uses cgr.dev/chainguard/static image)

task deploy

Generate helm manifest from templates

task generate-manifests

Delete local k3s cluster

task create-k3s-delete

# Packages

No description provided by the author
No description provided by the author