GithubHelp home page GithubHelp logo

cofyc / advanced-statefulset Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pingcap/advanced-statefulset

0.0 2.0 0.0 14.96 MB

Makefile 0.61% Shell 11.12% Go 84.11% Dockerfile 0.22% Groovy 1.84% Python 2.10%

advanced-statefulset's Introduction

Advanced StatefulSet

This is an Advanced StatefulSet CRD implementation based on official StatefulSet in Kubernetes 1.17.0.

This is an experimental project.

Features

In addition to official StatefulSet, it adds one feature:

Development

Verify

make verify

Unit Tests

make test

Integration Tests

make test-integration

E2E

make e2e

Test it out

start a cluster

kind v0.7.0+ is recommended.

curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64
chmod +x ./kind
./kind create cluster

run advanced statefulset controller locally

Open a new terminal and run controller:

hack/local-up.sh

deploy a statefulset

kubectl apply -f examples/statefulset.yaml

scale out

Note that --resource-version is required for CRD objects.

RESOURCE_VERSION=$(kubectl get statefulsets.pingcap.com web -ojsonpath='{.metadata.resourceVersion}')
kubectl scale --resource-version=$RESOURCE_VERSION --replicas=4 statefulsets.pingcap.com web

scale in

RESOURCE_VERSION=$(kubectl get statefulsets.pingcap.com web -ojsonpath='{.metadata.resourceVersion}')
kubectl scale --resource-version=$RESOURCE_VERSION --replicas=3 statefulsets.pingcap.com web

scale in at arbitrary position

We should set delete-slots annotations and decrement spec.replicas at the same time.

kubectl apply -f examples/scale-in-statefulset.yaml 

advanced-statefulset's People

Contributors

cofyc avatar

Watchers

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