July 8, 2021 By Budi Darmawan 3 min read

Operators in Red Hat OpenShift clusters are the de-facto standard for adding features and capabilities of a cluster.

Applications and middleware are packaged as operators and available on the OperatorHub. Although most operators can be installed within a few clicks, some more complex operators require a deeper understanding of the infrastructure. Similar to the water for a kitchen sink, most people just need to know that it is available; however, knowing the plumbing underneath the surface is necessary for problem-solving and fixing errors when things do not work as expected.

This article attempts to explain the underlying objects and processes that make up the operators and operator framework. The content in this article is divided into extending the OperatorHub and the deployment of an Operator.

Extending the OperatorHub

The OperatorHub is populated from the content in OperatorSource and CatalogSources. Most of the newer sources are now using the CatalogSource format. I will explain the difference between the CatalogSource and OperatorSource and how they work in a future article:

OperatorSource and CatalogSource.

You can view these sources from the Web console under Administration > Cluster Settings > Global Configuration > OperatorHub > Sources. The following is a screenshot of this menu:

OperatorHub sources.

The catalog source consists of a non-executable container image. The container image contains a file that acts as a catalog of PackageManifests that can be installed. When a CatalogSource is defined, OpenShift creates a Job to load the catalog image, retrieve the individual PackageManifest and create the objects in OpenShift. Each PackageManifest object is a tile that you can see in the Operators > OperatorHub menu of the OpenShift Web Console:

CatalogSource and PackageManifest.

Each of the PackageManifest objects contains a unique definition on how to implement the operators, including the following:

  • Channels: The path for installation and upgrade of an operator package.
  • Cluster Service Version: Package definition for a certain version of the operator, the CSVs allow the operator that subscribes to a channel to dynamically evolve (upgrade).
  • Custom Resource Definition: Part of the CSV that defines the structure of a Custom Resource that the Operator will be managing. 
  • Container images: Images that will be loaded when you install this CSV.

Operator deployment

When you choose to install an Operator from OperatorHub, you create a Subscription object. It is subscribing to a channel in the PackageManifest. The notion of subscribing allows an automatic update (as defined in the installPlanApproval field) when the CSV in the PackageManifest is updated:

Channel and Subscription.

The CSV from the channel is built and generates an installPlan, which contains a list of resources that should be created for this operator. Subscription also defines the Custom Resource Definition that is managed by this operator. Once the installation is successful (the CSV phase becomes Succeeded from the oc get csv command), that indicates that the Operator is installed:

Installed operator.

Once an operator is installed, you have a Deployment with a pod that runs the operator controller process. The operator controller runs a loop that monitors the Custom Resources in its namespace (or all namespaces as defined by the installation method). As a Custom Resource is created, it may perform additional tasks, such as creating more resources in the cluster.

The illustration above triggers the creation of the OpenShift Container Storage cluster based on the content of the StorageCluster custom resource.

Learn more about IBM Garage.

Was this article helpful?
YesNo

More from Cloud

IBM Tech Now: April 8, 2024

< 1 min read - ​Welcome IBM Tech Now, our video web series featuring the latest and greatest news and announcements in the world of technology. Make sure you subscribe to our YouTube channel to be notified every time a new IBM Tech Now video is published. IBM Tech Now: Episode 96 On this episode, we're covering the following topics: IBM Cloud Logs A collaboration with IBM watsonx.ai and Anaconda IBM offerings in the G2 Spring Reports Stay plugged in You can check out the…

The advantages and disadvantages of private cloud 

6 min read - The popularity of private cloud is growing, primarily driven by the need for greater data security. Across industries like education, retail and government, organizations are choosing private cloud settings to conduct business use cases involving workloads with sensitive information and to comply with data privacy and compliance needs. In a report from Technavio (link resides outside ibm.com), the private cloud services market size is estimated to grow at a CAGR of 26.71% between 2023 and 2028, and it is forecast to increase by…

Optimize observability with IBM Cloud Logs to help improve infrastructure and app performance

5 min read - There is a dilemma facing infrastructure and app performance—as workloads generate an expanding amount of observability data, it puts increased pressure on collection tool abilities to process it all. The resulting data stress becomes expensive to manage and makes it harder to obtain actionable insights from the data itself, making it harder to have fast, effective, and cost-efficient performance management. A recent IDC study found that 57% of large enterprises are either collecting too much or too little observability data.…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters