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

Enhance your data security posture with a no-code approach to application-level encryption

4 min read - Data is the lifeblood of every organization. As your organization’s data footprint expands across the clouds and between your own business lines to drive value, it is essential to secure data at all stages of the cloud adoption and throughout the data lifecycle. While there are different mechanisms available to encrypt data throughout its lifecycle (in transit, at rest and in use), application-level encryption (ALE) provides an additional layer of protection by encrypting data at its source. ALE can enhance…

Attention new clients: exciting financial incentives for VMware Cloud Foundation on IBM Cloud

4 min read - New client specials: Get up to 50% off when you commit to a 1- or 3-year term contract on new VCF-as-a-Service offerings, plus an additional value of up to USD 200K in credits through 30 June 2025 when you migrate your VMware workloads to IBM Cloud®.1 Low starting prices: On-demand VCF-as-a-Service deployments begin under USD 200 per month.2 The IBM Cloud benefit: See the potential for a 201%3 return on investment (ROI) over 3 years with reduced downtime, cost and…

The history of the central processing unit (CPU)

10 min read - The central processing unit (CPU) is the computer’s brain. It handles the assignment and processing of tasks, in addition to functions that make a computer run. There’s no way to overstate the importance of the CPU to computing. Virtually all computer systems contain, at the least, some type of basic CPU. Regardless of whether they’re used in personal computers (PCs), laptops, tablets, smartphones or even in supercomputers whose output is so strong it must be measured in floating-point operations per…

IBM Newsletters

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