All Projects → xcnt → kubernetes-update-manager

xcnt / kubernetes-update-manager

Licence: MIT license
A manager to update deployments with migration jobs in Kubernetes.

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to kubernetes-update-manager

powerapps-packagedeployer-template
Enhanced deployment capabilities when deploying with the Power Apps Package Deployer.
Stars: ✭ 18 (+5.88%)
Mutual labels:  continuous-delivery, continuous-deployment
badwolf
Docker based continuous integration, continuous deployment and code lint review system for BitBucket
Stars: ✭ 88 (+417.65%)
Mutual labels:  continuous-delivery, continuous-deployment
bodywork-ml-pipeline-project
Deployment template for a continuous training pipeline.
Stars: ✭ 22 (+29.41%)
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 (-11.76%)
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 (+35.29%)
Mutual labels:  continuous-delivery, continuous-deployment
www.go.cd
Github pages repo
Stars: ✭ 39 (+129.41%)
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 (-5.88%)
Mutual labels:  continuous-delivery, continuous-deployment
Xrm Ci Framework
xRM CI Framework provides you with the tools automate the build and deployment of your CRM Solution. Using the framework to implement a fully automated DevOps pipeline will allow you to deploy more frequently with added consistency and quality.
Stars: ✭ 172 (+911.76%)
Mutual labels:  continuous-delivery, continuous-deployment
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (+52.94%)
Mutual labels:  continuous-delivery, continuous-deployment
flyway-ant
Flyway Ant tasks
Stars: ✭ 14 (-17.65%)
Mutual labels:  continuous-delivery, continuous-deployment
Rok8s Scripts
Opinionated scripts for managing application deployment lifecycle in Kubernetes
Stars: ✭ 248 (+1358.82%)
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 (+282.35%)
Mutual labels:  continuous-delivery, continuous-deployment
Liquibase
Main Liquibase Source
Stars: ✭ 2,910 (+17017.65%)
Mutual labels:  continuous-delivery, continuous-deployment
nightly-docker-rebuild
Use nightli.es 🌔 to rebuild N docker 🐋 images 📦 on hub.docker.com
Stars: ✭ 13 (-23.53%)
Mutual labels:  continuous-delivery, continuous-deployment
Rocket
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (+1176.47%)
Mutual labels:  continuous-delivery, continuous-deployment
ship-it
Wattpad's tool for continuously deploying code to Kubernetes quickly, safely, and observably.
Stars: ✭ 14 (-17.65%)
Mutual labels:  continuous-delivery, continuous-deployment
Syncd
syncd是一款开源的代码部署工具,它具有简单、高效、易用等特点,可以提高团队的工作效率.
Stars: ✭ 2,065 (+12047.06%)
Mutual labels:  continuous-delivery, continuous-deployment
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (+900%)
Mutual labels:  continuous-delivery, continuous-deployment
maestro
Faster CI/CD for multi-artifact projects
Stars: ✭ 13 (-23.53%)
Mutual labels:  continuous-delivery, continuous-deployment
ofcourse
A Concourse resource generator
Stars: ✭ 41 (+141.18%)
Mutual labels:  continuous-delivery, continuous-deployment

Kubernetes Update Manager

Update Example

This code allows to update deployments in a kubernetes cluster without needing to give cluster admin access to the updating entity. Instead an API is provided which handles the update process via pre-defined annotations in the specified deployment structure.

Motivation

We wrote a blog article on our website to explain why we think this feature is needed. Check it out.

Installation

Currently it is expected for the update manager to run in the same cluster in which the upgrades should be applied. The image is available on Docker Hub for installation. Example deployments can be found in the kube folder. You must adjust the secret to set an api key and additionally adjust the namespace where you want to update-manager to run in. Additionally, if you want the update-manager to be accessible externally you should expose the manager. This can be for example done with an Ingress configuration.

Additionally, if you are using calico for network policies an example policy can be found here.

Configuration

The server can additionally be configured with the following environment variables:

Name Description Default Required
UPDATE_MANAGER_LISTENING_HOST The host to bind the server to. 0.0.0.0 true
UPDATE_MANAGER_LISTENING_PORT The port which the update manager should be available at. 9000 true
UPDATE_MANAGER_AUTOLOAD_NAMESPACES If all namespaces should be scanned when applying an update. This is per default true and can be turned off if only specific namespaces should be scanned for update information. true true
UPDATE_MANAGER_NAMESPACES A list of namespaces which should be scanned for an update. This is only used if autload of namespaces has been switched off. The namespaces should be added comma separated. false
UPDATE_MANAGER_API_KEY The pre-shared API key used to authenticate API calls. This is a required field and must be set. true
SENTRY_DSN The sentry dsn which should be used when reporting errors from the server. false

Usage

The update manager scans the specified namespaces for deployments and jobs which have the image attached. They then search for the update classifier and update the images for the specified deployments. This can be either done via the REST API provided by the script which swagger documentation can be accessed by going to the updates-managers URL and add /swagger (so for example https://up.xcnt.io/swagger). Alternatively, it is also possible to use the update command provided by the update manager itself:

docker run --rm -t xcnt/kubernetes-update-manager:stable update --url https://up.xcnt.io/updates --image xcnt/kubernetes-update-manager:1.0.0 --update-classifier stable

This would notify the update manager to update itself, if the following annotation has been put on the deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: update-manager
  annotations:
    xcnt.io/update-classifier: stable
  labels:
    app: update-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: update-manager
  template:
    metadata:
      labels:
        app: update-manager
    spec:
      containers:
      - name: update-manager
        image:  xcnt/kubernetes-update-manager:stable

Additionally, it is possible to specify migration jobs for the image which should be updated. This can be done by adding a job with the given image and also adding a xcnt.io/update-classifier annotation. For example:

apiVersion: batch/v1
kind: Job
metadata:
  name: migration-job
  annotations:
    xcnt.io/update-classifier: stable
spec:
  template:
    spec:
      containers:
      - name: migration-job
        image: xcnt/test:develop
        imagePullPolicy: Always
        command: ["python", "run.py", "run-migrations"]
      restartPolicy: Never
  backoffLimit: 4

If a update call is done with the classifier stable and the image xcnt/test it will execute a copy of this job once during the update process.

Error Handling

If a deployment doesn't start or a job fails, a rollback of the deployments will be attempted. However, this does not reverse any jobs which have already been executed, meaning the state of the application might need manual work to be restored to a previously compatible version.

License

The application is published under the MIT License.

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].