Giter Club home page Giter Club logo

crd-versioning-demo's Introduction

Cluster setup:

There are two important components that a cluster would need to enable CRD versioning:

  • Cert manager to manage certificates. API and conversion webhook communicate over TLS, hence the need for certs.
  • Storage version migrator to migrate existing CRs to desired storage version defined in the CRD.

Creation of the API(defining types.go):

Following the quickstart from kubebuilder, scaffolded the files. (you don't need to do this if you're cloning the repo)

  • kubebuilder create api --group webapp --version v1 --kind Guestbook

Code is segmented in branches.

  • In the v1 branch, "webapp.example.com/v1" API will be the stored version and "webapp.example.com/v2" will be introduced to users. Additionally, we could add a deprecation warning on "webapp.example.com/v1" and start requesting users to move to "webapp.example.com/v2".
  • In the v2 branch, "webapp.example.com/v2" will be set as the stored version. Users can still view objects in "webapp.example.com/v1" but they should start migrating objects to "webapp.example.com/v2" using Storage Version Migrator.
  • In the v3, "webapp.example.com/v1" will no longer be a served version, therefore deprecating it. Users can no longer view objects in v1.

To deploy a branch :

  • Run make install
  • Run make deploy IMG=harshthakur/guestbook-controller

crd-versioning-demo's People

Contributors

realharshthakur avatar

Watchers

 avatar  avatar

Forkers

lprashanthgowda

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.