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

Fortressing the digital frontier: A comprehensive look at IBM Cloud network security services

6 min read - The cloud revolution has fundamentally transformed how businesses operate. Its superior scalability, agility and cost-effectiveness have made it the go-to platform for organizations of all sizes. However, this shift to the cloud has introduced a new landscape of ever-evolving security threats. Data breaches and cyberattacks continue to hit organizations, making robust cloud network security an absolute necessity. IBM®, a titan in the tech industry, recognizes this critical need, provides a comprehensive suite of tools and offers unmatched expertise to fortify…

How well do you know your hypervisor and firmware?

6 min read - IBM Cloud® Virtual Private Cloud (VPC) is designed for secured cloud computing, and several features of our platform planning, development and operations help ensure that design. However, because security in the cloud is typically a shared responsibility between the cloud service provider and the customer, it’s essential for you to fully understand the layers of security that your workloads run on here with us. That’s why here, we detail a few key security components of IBM Cloud VPC that aim…

New IBM study: How business leaders can harness the power of gen AI to drive sustainable IT transformation

3 min read - As organizations strive to balance productivity, innovation and environmental responsibility, the need for sustainable IT practices is even more pressing. A new global study from the IBM Institute for Business Value reveals that emerging technologies, particularly generative AI, can play a pivotal role in advancing sustainable IT initiatives. However, successful transformation of IT systems demands a strategic and enterprise-wide approach to sustainability. The power of generative AI in sustainable IT Generative AI is creating new opportunities to transform IT operations…

IBM Newsletters

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