Giter Club home page Giter Club logo

cluster-manager-api's People

Contributors

alika avatar coffeepac avatar davidewatson avatar foolusion avatar l337ch avatar maratoid avatar oneilcin avatar philoserf avatar venezia avatar zachpuck avatar

Stargazers

 avatar  avatar  avatar

Watchers

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

cluster-manager-api's Issues

Break application into 2 parts

  • API accessed by a user (REST/gRPC)
  • Controller(s) for SDSCluster, SDSPackageManager and SDSApplication

Breaking the application up has potential benefits:

  • Easier to replace components (increased modularity)
  • Easier to test (well defined contracts)
  • Easier to implement security (each program can have own RBAC profile)
  • Easier to implement resource management (memory, cpu, etc.)

Flexible controller namespaces

In many places we currently just default to the default namespace. Controllers should be able to listen to all namespaces, one namespace, and possibly an array of namespaces. The namespace should be configurable

Support streaming status updates

Allowing an endpoint that gives streaming updates to a cluster (or an array of clusters) would be very useful for the dashboard

Logging, tracing, charting

  • Provide prometheus data exporters
  • Investigate usage of OpenTracing / Jaeger
  • Provide a Grafana dashboard

Create unit tests

  • Each package needs to have a defined contract and tests
  • Except generated code!

Add version, build information

Similar to how kubernetes provides

Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}`

We should provide an API endpoint as well as binary --version support to indicate what version of our program is running.

Create developer documentation

  • Link to core technologies used: rest, grpc, custom resources, generators, controllers
  • Create developer flow diagrams
  • Detail packages, why they exists, names, etc
  • Create CONTRIBUTING.md
  • Explain how to run local environment, how to debug, how to test

Create user experience documentation

  • Use cases
  • User-level flow diagrams
  • How to run the program locally and in-cluster
  • How to operate the program including lifecycle management, resource allocation, security, etc
  • How to submit a support request to developers

Create end to end tests

Create the tests
Create sample data for the end to end tests
Check boundary issues
Create ability to simulate other moving parts, i.e. what cluster-controller may do, what a deploy-tiller job may do, etc.

Core information should be expressed internally through an struct

Right now code will explicitly look for a cluster object and its status.kubeconfig value for the kubeconfig.
This is tight coupling and should be removed.
What happens if KrakenCluster object isn't the object that stores the kubeconfig, but rather a secret, or the field changes, etc. What happens if we support KrakenCluster and KrakenClusterV2 objects, etc.
Instead of the tight coupling there should be a representation of the cluster and methods like GetKubeconfig() should be available.
This value should be delegated / use interfaces.

Review code and insert appropriate comments

  • Each public method should have comment documentation explaining why it exists/needed
  • Each package should have an explanation for what it is aiming to provide
  • Comment logic inside functions as well

Controller error handling

Right now controllers are oftening hoping for the happy path - that errors are few and far inbetween. Errors happen and our code needs to handle them.

Code should also be respectful that just as often as people create, people will delete and also likely modify. SDS[Cluster,PackageManager,Application] needs to implement the ability to delete and change.

Controllers should also be aware that all dependencies are not met and handle it correctly. Example: SDSApplication references non-ready SDSCluster and/or SDSPackageManager

Revisit API specification

  • Create a Beta API specification
  • Create groups so that kubectl get sds could return all sds resources
  • Create proper data model validation - dependency

Currently openapi-gen creates v2 (swagger) specifications, however CustomResources require v3 specifications in order for it to serve as a validator. We should consider contributing to https://github.com/kubernetes/code-generator/tree/master/cmd/openapi-gen

This is big task and is useful for the sig-machinery group. They want to have openapi-gen support more annotations than it currently does, as well as generate the v3 compliant specifications. Doing so will help us and help the community.

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.