Go to file
Karolis Rusenas 61d6e0faca thin k8s wrapper for testing 2017-06-11 20:10:19 +01:00
hack rename 2017-06-11 11:41:15 +01:00
provider thin k8s wrapper for testing 2017-06-11 20:10:19 +01:00
trigger created manager to automatically create subscriptions based on current deployments 2017-06-11 20:10:02 +01:00
types more logging, at least for now 2017-06-11 11:41:34 +01:00
util/version name getter 2017-06-11 11:29:48 +01:00
vendor vendor deps 2017-06-10 12:22:05 +01:00
.gitignore ignore 2017-06-10 12:23:00 +01:00
Dockerfile dockerfile 2017-06-10 12:23:07 +01:00
Makefile makefile for build/push 2017-06-10 12:24:03 +01:00
glide.lock vendor deps 2017-06-10 12:22:05 +01:00
glide.yaml vendor deps 2017-06-10 12:22:05 +01:00
main.go initialising 2017-06-11 00:25:36 +01:00
readme.md readme 2017-06-11 11:29:33 +01:00

readme.md

Keel

Lightweight Kubernetes controller for automating image updates for deployments. Keel uses semantic versioning to determine whether deployment needs an update or not.

Getting started

Once Keel is deployed in your Kubernetes cluster - it waits for events regarding updated images. Images tagged with label keel.io/policy will be processed.

Available policy options:

  • all - update whenever there is a version bump
  • major - update major versions
  • minor - update only minor versions
  • patch - update only patch versions

Deployment

GCE Kubernetes + GCR

Google Container Registry uses pubsub events to inform about pushed/deleted images. Keel subscribes to this queue, parses events and submits them to Keel Kubernetes provider.

Since access to pubsub is required in GCE Kubernetes - your cluster node pools need to have permissions. If you are creating new cluster - just enable pubsub from the start. If you have existing cluster - currently the only way is create new node-pool through the gcloud CLI (more info in the docs:

gcloud container node-pools create new-pool --cluster CLUSTER_NAME --scopes https://www.googleapis.com/auth/pubsub

Then, you need to create a subscription for registry events (docs). Just replace "PROJECT-ID" with your own project ID and "QUALIFIED-GCR-URI" with your registry/image:

gcloud alpha pubsub topics create projects/PROJECT-ID/topics/QUALIFIED-GCR-URI
gcloud alpha pubsub subscriptions create gcr-sub --topic=QUALIFIED-GCR-URI

Example:

  • QUALIFIED-GCR-URI - gcr.io%2Frepo-name, where %2F is encoded forward slash. So if your repo is gcr.io/awesome-app, then QUALIFIED-GCR-URI would be gcr.io%2Fawesome-app.

Actual deployment

  • Create service account:

    kubectl create serviceaccount keel --namespace=kube-system

While running Kubernetes on GCE it's convenient to use Google Container Registry.