1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +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

1.7 KiB
Raw Blame History

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.

Most operators should use the Cluster Version Operator (CVO) payload mechanism.

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. 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.