Giter VIP home page Giter VIP logo

gitcontroller's Introduction

gitcontroller

gitcontroller watches Kubernetes Deployments which use one or more gitRepo volumes and then watches for changes in the associated git repository and branch.

When there are changes in git the gitcontroller will perform a rolling upgrade of the Kubernetes Deployments to use the new configuration git repository revision; or rollback. The rolling upgrade policy (e.g. speed and number of concurrent pods which update and so forth) is all specified by your rolling update configuration in the Deployment specification.

Here is an example of how to add a gitRepo volume to your application; in this case a spring boot application to load the application.properties file from a git repository.

You can either run gitcontroller as a microservice in your namespace or you can use the gitcontroller binary at any time or as part of your CI / CD Pipeline process.

Note we recommend using separate git based configuration repository only for things which truly are environment specific. Its simpler to include all other configuration data with your microservice source code and then use a more regular CI / CD Pipeline from a single git repository to build your code, create the configuration files and package it all into an immutable docker image.

An alternative approach to using a git repository for environmental configuration and gitcontroller is to use ConfigMap such as the ConfigMap PropertySource for spring. On the plus side ConfigMap is supported natively inside Kubernetes; though the downside is ConfigMap has no versioning or history; so once a ConfigMap is changed you've lost track of who changed what and when which makes it harder to track changes.

So if history or tracking changes in your configuration is important we recommend git over ConfigMap.

Using gitcontroller as a command

To use gitcontroller as a command, such as in a CI / CD pipeline download a binary of gitcontroller then use the following command:

gitcontroller check

This will check all Deployments in the current namespace for gitRepo volumes and perform rolling upgrades if they have changed.

You can specify a label selector expression via the --selector command line option which will filter the deployments that are checked.

Using gitcontroller as a microservice

The gitcontroller microservice is now included in the fabric8 release so you can install and run gitcontroller via the fabric8 developer console via the Run... button on the Runtime view or the gofabric8 installer via:

gofabric8 deploy -y --app=gitcontroller --domain=vagrant.f8

You can also run the gitcontroller microservice locally on your machine via the following (adding a --selector selector to filter the deployments watched if you prefer)

gitcontroller run

Development

Prerequisites

Install go version 1.5.1

Building

git clone [email protected]:fabric8io/gitcontroller.git $GOPATH/src/github.com/fabric8io/gitcontroller
./make

Make changes to *.go files, rerun make and run the generated binary..

e.g.

./build/gitcontroller help

gitcontroller's People

Contributors

fusesource-ci avatar jstrachan avatar rawlingsj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitcontroller's Issues

can't find gitcontroller !!

Hi, is gitcontroller is deprecated or so?, i tried to isntall it using

gofabric8 deploy -y --app=gitcontroller

But nothing get changed in my minikube cluster, and i even can't find it when i use Run... button in my fabric8 console?..

and is there any alternative way to monitor changes on my gitRepo volume mounted into my service container?

Thanks

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.