The Reconciler is a central system to reconcile Kyma clusters.
Follow these steps to run Reconciler locally:
-
Build the Reconciler binary:
make build-darwin
-
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.comWe recommend specifying your own component list by using the
componentsflag. By default, Reconciler installs all components listed in thecomponents.yamlfile../bin/mothership-darwin local --components tracing,monitoring
To execute unit tests, use the make test target:
make 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
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:
-
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 istioThe script creates a new package including the boilerplate code required to initialize a new component reconciler instance during runtime.
-
Edit the files inside the package
-
Edit the file
action.goand encapsulate your custom reconciliation logic inActionstructs. -
Edit the
$componentName.gofile:- Use the
WithPreReconcileAction(),WithReconcileAction(),WithPostReconcileAction()to inject customActioninstances into the reconciliation process.
- Use the
-
-
Re-build the CLI to add the new component reconciler to the
reconciler startcommand.The
reconciler startcommand 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 -
Add component name to the list in the Helm chart
values.yamland update the image version to the latest one after you merge your changes.