Code Monkey home page Code Monkey logo

updatey's Introduction

updatey

Brings Semantic versioning constraints to Kubernetes resources!

Background

Many Kubernetes clusters rely on third party software to aid your own applications. For example, FileBeat collects logs and ships them to Elastic search. Once deployed into the cluster, either you never update the version or actively have to keep up to date with version releases. Wouldn't it be great if you didn't have to worry about this? This is where updatey comes in, by specifying semantic versioning constraints in your image versions you can let updatey do the work.

Example on Semantic version constraints

For more information: https://github.com/Masterminds/semver#checking-version-constraints

Results may vary due to nginx creating new releases

Patch update

Lets say we have a pod manifest:

apiVersion: v1
kind: Pod
metadata:
  name: mypod
  labels:
    app: mypod
spec:
  containers:
  - name: nginx
    image: "nginx:1.14.1"

And you want to benefit from updating to the latest patch version:

apiVersion: v1
kind: Pod
metadata:
  name: mypod
  labels:
    app: mypod
spec:
  containers:
  - name: nginx
    image: "nginx:~1.14"

Resulting as of 24.03.19

apiVersion: v1
kind: Pod
metadata:
  labels:
    app: mypod
  name: mypod
spec:
  containers:
  - image: nginx:1.14.2
    name: nginx

Minior update

apiVersion: v1
kind: Pod
metadata:
  name: mypod
  labels:
    app: mypod
spec:
  containers:
  - name: nginx
    image: "nginx:1.15.8-alpine"

And you want to benefit from updating to the latest minor version:

apiVersion: v1
kind: Pod
metadata:
  name: mypod
  labels:
    app: mypod
spec:
  containers:
  - name: nginx
    image: "nginx:^1.15"

Resulting as of 24.03.19

apiVersion: v1
kind: Pod
metadata:
  labels:
    app: mypod
  name: mypod
spec:
  containers:
  - image: nginx:1.15.9
    name: nginx

Installation

  1. Replace the ca and key fields in the helm chart with your own.
  2. helm install -n updatey --namespace=<YOUR_NAMESPACE> helm/updatey

Caveats

  • The current semantic versioning implementation doesn't respect pre releases. So -alpine won't be respected, this will be fixed in later versions.

  • Updates have to be triggered by updating the resources, which will cause the resource to go through the admission controller, this will be fixed by providing another component responsible for handling this automatically.

updatey's People

Contributors

jw-s avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.