Metacontroller is one way to write a Kubernetes controller in any language. It is a Kubernetes controller administration that runs in cluster scope and manages your controllers. It works like the pub-sub model. For your every controller you need to write a controller spec. Once you apply that spec your controller is subscribed to the metacontroller. According to controller spec, the metacontroller triggers sync
and finalize
hooks.
You can write your controller logic in any language. Once you subscribe to metacontroller, it makes POST requests with the current state. Your controller needs to respond with the desired state. The metacontroller server then executes a control loop on behalf of your controller and calls sync
and finalize
hook functions whenever necessary.
- Install metacontroller.
- Create basic controller in different languages and run them locally.
- Create basic controller in different languages and run them in Kubernetes environment.
- Composite controller
- Example of sync-finalize-hook.
- Example of resync-period.
- Example of generate-selector.
- Example of spec-selector.
- Example of target-status.
- Example of update-strategy-inplace.
- Example of update-strategy-ondelete.
- Example of update-strategy-recreate.
- Example of update-strategy-rolling-recreate.
- Example of update-strategy-rolling-inplace.
- Decorator controller
- Example of sync-finalize-hook.
- Example of resync-period.
- Example of target-status.
- Example of target-labels.
- Example of target-annotations.
- Example of annotation-selector.
- Example of label-selector.
- Example of update-strategy-inplace.
- Example of update-strategy-ondelete.
- Example of update-strategy-recreate.