Create an operator

Basic functionality

Each Yaook operator is built on top of the Operator framework which is responsible for creating the operator state graph, rendering the templates and managing K8s objects with the K8s API. You can find more details about this process under Resources, State Graph and the Yaook Operator.

K8s custom resources are created inside the operators by adding classes inheriting sm.ReleaseAwareCustomResource [1] or sm.CustomResource. These classes contain declarative descriptors as members which represent Kubernetes object(s) and are managed by Yaook. There, we can assign jinja templates to the components to dynamically render K8s manifests, and declare dependency relationships between components to ensure they are reconciled in the desired order.

Guide

Here, we will cover in detail how to add a new operator which will serve as a custom controller for new custom resources. The guide is split into the following parts:

The guide Evaluate requirements is more targeted towards those who still view the Yaook source code as unknown territory, while the other guides can always be used by developers and reviewers to ensure all requirements were included during the process.