1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00
Files
installer/docs/dev/operators.md
Rohan CJ 4e491e392f docs: fix broken link to CVO/operators.md in operators.md
The link moved from the cluster-version-operator to the enhancements repo.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2021-08-10 08:59:14 +05:30

22 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# How to add a new operator to the installer?
This document describes how to provide an operator's configuration files and manifests to installer-launched clusters.
## The recommended way
Most operators should use [the Cluster Version Operator (CVO) payload mechanism][cvo-operators].
## The alternative (for exceptions only)
Creating a new asset in the installer source is only for exceptional cases where CVO cannot take all the required manifests/config files, and auto-discover is not possible or insufficient e.g. the network operator. As another example, the machine-config-operator needs TLS config.
Such operators need to be directly integrated in the installer's [`manifests` package](../../pkg/asset/manifests). Within this, there are two ways to get the manifests/config files integrated:
- A new asset for the operator
Create a new operator asset, and render the Dependencies, Name, Load and Generate functions. The Dependencies might contain InstallConfig as an example. In the Generate function, create the config files as asset contents. For the config/manifests actual structure, one can choose to vendor the operators github pkg, or, if the configuration structures are fairly simple then just copy the definitions directly and avoid the hassle of vendoring. Finally, return the entire list of configs and manifests in the Generate function.
- Template files
In the pkg/asset/manifests/content/openshift directory, place the templates golang variables. Then modify pkg/asset/manifests/openshift.go to expand the template. Expand templateData in template.go for filling up the template variables.
[cvo-operators]: https://github.com/openshift/enhancements/blob/master/dev-guide/cluster-version-operator/dev/operators.md