All Projects → philpep → imago

philpep / imago

Licence: Apache-2.0 license
Ensure kubernetes pods run on latest images builds from the docker registry

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to imago

maestro
Faster CI/CD for multi-artifact projects
Stars: ✭ 13 (-84.34%)
Mutual labels:  continuous-delivery, continuous-deployment
chuckwagon
a Scala/sbt AWS Lambda Toolkit
Stars: ✭ 29 (-65.06%)
Mutual labels:  continuous-delivery, continuous-deployment
flyway-ant
Flyway Ant tasks
Stars: ✭ 14 (-83.13%)
Mutual labels:  continuous-delivery, continuous-deployment
aws-cloudformation-simplified
AWS CloudFormation - Simplified | Hands On Learning !!
Stars: ✭ 51 (-38.55%)
Mutual labels:  continuous-delivery, continuous-deployment
nightly-docker-rebuild
Use nightli.es 🌔 to rebuild N docker 🐋 images 📦 on hub.docker.com
Stars: ✭ 13 (-84.34%)
Mutual labels:  continuous-delivery, continuous-deployment
badwolf
Docker based continuous integration, continuous deployment and code lint review system for BitBucket
Stars: ✭ 88 (+6.02%)
Mutual labels:  continuous-delivery, continuous-deployment
workr
Simple and easy to setup job runner for any kind of automation
Stars: ✭ 15 (-81.93%)
Mutual labels:  continuous-delivery, continuous-deployment
generator-nullfactory-xrm
Yeoman generator for Dynamics 365 Solutions. It generates a project structure that facilitates the quick creation builds and automated release strategies with minimal effort.
Stars: ✭ 15 (-81.93%)
Mutual labels:  continuous-delivery, continuous-deployment
powerapps-packagedeployer-template
Enhanced deployment capabilities when deploying with the Power Apps Package Deployer.
Stars: ✭ 18 (-78.31%)
Mutual labels:  continuous-delivery, continuous-deployment
Kotsu
✨ Clean, opinionated foundation for new projects — to boldly go where no man has gone before
Stars: ✭ 48 (-42.17%)
Mutual labels:  continuous-delivery, continuous-deployment
k8s.ecoysystem.apps
kubernetes(k8s) ecosystem applications written c#, including micro-service(aspnetcore.webapi) and health checks etc. the goal is automatic complete continuous integration, delivery, deployment by committing code to the respository. so i will continue to be iterated...
Stars: ✭ 16 (-80.72%)
Mutual labels:  continuous-delivery, continuous-deployment
kubernetes-update-manager
A manager to update deployments with migration jobs in Kubernetes.
Stars: ✭ 17 (-79.52%)
Mutual labels:  continuous-delivery, continuous-deployment
ship-it
Wattpad's tool for continuously deploying code to Kubernetes quickly, safely, and observably.
Stars: ✭ 14 (-83.13%)
Mutual labels:  continuous-delivery, continuous-deployment
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (-68.67%)
Mutual labels:  continuous-delivery, continuous-deployment
bodywork-ml-pipeline-project
Deployment template for a continuous training pipeline.
Stars: ✭ 22 (-73.49%)
Mutual labels:  continuous-delivery, continuous-deployment
ofcourse
A Concourse resource generator
Stars: ✭ 41 (-50.6%)
Mutual labels:  continuous-delivery, continuous-deployment
Liquibase
Main Liquibase Source
Stars: ✭ 2,910 (+3406.02%)
Mutual labels:  continuous-delivery, continuous-deployment
Rok8s Scripts
Opinionated scripts for managing application deployment lifecycle in Kubernetes
Stars: ✭ 248 (+198.8%)
Mutual labels:  continuous-delivery, continuous-deployment
cloud-s4-sdk-pipeline
The Cloud SDK pipeline uses the Cloud SDK continuous delivery server for building, checking, and deploying extension applications. Projects based on the SAP Cloud SDK archetype will automatically use this pipeline.
Stars: ✭ 65 (-21.69%)
Mutual labels:  continuous-delivery, continuous-deployment
variants
A command-line tool to setup deployment variants for iOS and Android, alongside a working CI/CD setup.
Stars: ✭ 23 (-72.29%)
Mutual labels:  continuous-delivery, continuous-deployment

Imago

Build Status Go Report Card

This project aims to ease continuous delivery of docker images in a kubernetes cluster.

Imago is the last stage of an insect, it also refer to image and go (golang).

imago looks for kubernetes Deployments, DaemonSets, StatefulSet and CronJobs configuration and update them to use the latest image sha256 digest from the docker repository.

This is useful to handle the following cases:

  • image is rebuilt for security fixes
  • ensure all pods use exactly the same image
  • image is rebuilt by CI for continuous delivery

imago ensure your pods are running the latest build.

How it works ?

imago looks for Deployments, DaemonSets, StatefulSet and CronJob configuration, get the latest sha256 digest from registry and update containers specifications to set image to the corresponding registry/image@sha256:... notation. It track the original image specification in the imago-config-spec annotation.

Alternatively, with the -restart option, it check running pods sha256 and just restart resource that need to use newer images (assuming imagePullPolicy is Always). This method is slower than -update but it leave the container image in manifests untouched.

Arguments

$ imago --help
Usage of imago:
  -A	Check deployments and daemonsets on all namespaces (shorthand) (default false)
  -all-namespaces
		Check deployments and daemonsets on all namespaces (default false)
  -check-pods
		check image digests of running pods (default false)
  -field-selector string
		Kubernetes field-selector
		example: metadata.name=myapp
  -kubeconfig string
		kube config file (default "~/.kube/config")
  -l string
		Kubernetes labels selectors
		Warning: applies to Deployment, DaemonSet, StatefulSet and CronJob, not pods !
  -n value
		Check deployments and daemonsets in given namespaces (default to current namespace)
  -restart
		rollout restart deployments and daemonsets to use newer images, implies -check-pods and assume imagePullPolicy is Always (default false)
  -update
		update deployments and daemonsets to use newer images (default false)
  -x value
		Check deployments and daemonsets in all namespaces except given namespaces (implies --all-namespaces)

By default, imago doesn't update your deployments, unless invoked with --update.

The --check-pods is a less intrusive mode where update is done only if one of the running pods doesn't run on latest digest image.

Example output

$ imago --update
2019/02/11 17:55:21 checking default/Deployment/aptly:
2019/02/11 17:55:21   aptly ok
2019/02/11 17:55:21   nginx ok
2019/02/11 17:55:22 checking default/Deployment/kibana:
2019/02/11 17:55:22   kibana ok
2019/02/11 17:55:22   nginx ok
2019/02/11 17:55:22 update default/Deployment/philpep.org
2019/02/11 17:55:22 checking DaemonSet/fluentd:
2019/02/11 17:55:22   fluentd has to be updated from r.in.philpep.org/fluentd to r.in.philpep.org/fluentd@sha256:6a92af8a9db2ca243e0eba8d401cec11b124822e15b558b35ab45825ed4d1f54
2019/02/11 17:55:22 update default/DaemonSet/fluentd

Install and run

From the command line

Assuming you have a working ~/.kube/config file, just download and build the code:

$ go get github.com/philpep/imago/...
$ $(go env GOPATH)/bin/imago --help

From the docker image

Assuming you have a working ~/.kube/config file:

$ docker pull philpep/imago
$ docker run --rm -it -u $(id -u) -v ~/.kube/config:/var/lib/imago/.kube/config philpep/imago --help

From a pre-built binary

Check releases page.

Inside the cluster

You can run imago inside the cluster, for instance in a CronJob kubernetes object that runs every day.

See the ServiceAccount and CronJob objects.

$ kubectl apply -f deploy/serviceaccount.yaml
$ kubectl apply -f deploy/cronjob.yaml

Docker credentials

Image will looks for docker registry credentials in ~/.docker/config.json (e.g. /var/lib/imago/.docker/config.json in docker image). So, in case you're using imagePullSecrets, you will have to mount the secret here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].