Code Monkey home page Code Monkey logo

couchdb-operator's Introduction

couchdb operator

this k8s operator allows you to run a 2.1 couchdb cluster on top of k8s.

status

  • operator
    • RBAC support
    • CRD (CouchDB)
      • definition
      • management custom object add (spawn cluster)
      • management custom object update (update cluster)
      • management custom object delete (delete cluster)
    • deployment template (port, readyness, livelyness)
    • cluster management
      • credentials from configMap, secrets
      • pod anti affinity
      • node selection via labels
      • custom labels
      • new pod -> join cluster
      • old pod gone -> leave cluster
    • operator definition
  • README

guiding notes

see 7 principles taken from coreOS post: https://coreos.com/blog/introducing-operators.html and https://github.com/kubernetes/community/blob/master/contributors/devel/controllers.md

prerequisites

  • k8s >= 1.7.0

usage

$ kubectl apply -f k8s/resource-type.yml
$ kubectl apply -f k8s/deployment.yml

now, you can deploy a couchdb cluster like this:

apiVersion: "stable.couchdb.org/v1"
kind: CouchDB
metadata:
  name: my-couchdb-cluster
spec:
  version: "2.1.0"
  image:   "nicolai86/couchdb"
  replicas: 3 

the operator takes care of spawning the necessary pods and joining them into a single cluster.

development

required: golang 1.9+, kubernetes cluster (minikube, GKE, Azure...). To get a working operator locally, assuming kubectl is setup correctly:

$ go get -u github.com/golang/dep/cmd/dep
$ go get -du github.com/nicolai86/couchdb-operator
$ cd $(go env GOPATH)/src/github.com/nicolai86/couchdb-operator
$ dep ensure
$ OPERATOR_NAMESPACE=couchdb-operator 
$ OPERATOR_NAME=couchdb-operator 
$ KUBECONFIG=~/.kube/config 
$ go run main.go

couchdb-operator's People

Contributors

nicolai86 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

rgfaber

couchdb-operator's Issues

Needs a license

I was looking at potentially using this or improving on it for use in Apache OpenWhisk. However, I noticed that you didn't attach any licensing information to this repository. Can you clarify on the licensing terms here?

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.