Giter Site home page Giter Site logo

reconciler's Introduction

Reconciler

Overview

The Reconciler is a central system to reconcile Kyma clusters.

Run Reconciler locally (Mac OS)

Follow these steps to run Reconciler locally:

  1. Build the Reconciler binary:

    make build-darwin 
  2. Run Reconciler.

    CAUTION: At the moment, reconciliation with default values will fail. You must specify additional parameters:

    ./bin/mothership-darwin local --value global.ingress.domainName=example.com,global.domainName=example.com

    We recommend specifying your own component list by using the components flag. By default, Reconciler installs all components listed in the components.yaml file.

     ./bin/mothership-darwin local --components tracing,monitoring

Testing

Unit tests

To execute unit tests, use the make test target:

  make test

Integration test

Integration tests have a higher resource consumption compared to unit tests. You must define the environment variable KUBECONFIG that points to a test Kubernetes cluster.

Be aware that the integration test suite installs and deletes Kubernetes resources during the test run.

To execute the integration tests, execute the make test-all target:

 make test-all

Adding a new component reconciler

If a custom logic must be executed before, during, or after the reconciliation of a component, component reconcilers are required.

The reconciler supports component reconcilers, which handle component-specific reconciliation runs.

To add another component reconciler, execute the following steps:

  1. Create a component reconciler by executing the script pkg/reconciler/instances/reconcilerctl.sh.

    Provide the name of the component as parameter, for example:

    pkg/reconciler/instances/reconcilerctl.sh add istio
    

    The script creates a new package including the boilerplate code required to initialize a new component reconciler instance during runtime.

  2. Edit the files inside the package

    • Edit the file action.go and encapsulate your custom reconciliation logic in Action structs.

    • Edit the $componentName.go file:

      • Use the WithPreReconcileAction(), WithReconcileAction(), WithPostReconcileAction() to inject custom Action instances into the reconciliation process.
  3. Re-build the CLI to add the new component reconciler to the reconciler start command.

    The reconciler start command is a convenient way to run a component reconciler as standalone server.

    Example:

     # Build CLI
     cd $GOPATH/src/github.com/kyma-incubator/reconciler/
     make build-darwin
     
     # Start the component reconciler (for example, 'istio') as standalone service
     ./bin/reconciler-darwin start istio
     
     # To get a list of all configuration options for the component reconciler, call: 
     ./bin/reconciler-darwin start istio --help
    
  4. Add component name to the list in the Helm chart values.yaml and update the image version to the latest one after you merge your changes.

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.