Kahibaro
Discord Login Register

Operator Lifecycle Manager

What the Operator Lifecycle Manager (OLM) Does

Operator Lifecycle Manager (OLM) is the subsystem in OpenShift that manages the entire lifecycle of Operators and their associated services. Concretely, OLM:

Think of OLM as the package manager for Operators, with safety checks and upgrade orchestration built in.

Core OLM Concepts and Resources

OLM is implemented through a set of Kubernetes-style APIs (CustomResourceDefinitions). The most important resources you’ll encounter are:

CatalogSource

CatalogSource defines where OLM discovers available Operators.

Typical types:

Key characteristics:

Example use cases:

OperatorGroup

OperatorGroup defines the target namespaces that Operators in a given namespace will watch and manage.

Roles of an OperatorGroup:

Common patterns:

Subscription

Subscription describes the desired Operator, its channel, and how it should be kept up to date.

A Subscription:

Key aspects:

InstallPlan

InstallPlan is the detailed plan OLM creates to execute an install or upgrade.

Characteristics:

Why InstallPlans matter:

ClusterServiceVersion (CSV)

ClusterServiceVersion is the manifest that describes a specific released version of an Operator from the catalog’s perspective.

A CSV includes:

Lifecycle:

How OLM Installs Operators

At a high level, installing an Operator via OLM follows this sequence:

  1. Catalog discovery
    • OLM reads CatalogSources to know which Operators, versions, and channels exist.
  2. Scope definition
    • An OperatorGroup defines the namespaces the Operator will target.
  3. Subscription creation
    • A Subscription specifies:
      • The Operator package name
      • The channel (stable, fast, etc.)
      • Source catalog
      • Approval strategy for InstallPlans
  4. InstallPlan generation
    • OLM compares current state with desired state and creates an InstallPlan:
      • CRDs to create/update
      • RBAC definitions
      • Deployments/Pods for the Operator
  5. Approval and execution
    • If automatic: OLM immediately executes the InstallPlan
    • If manual: an admin inspects and approves before execution
  6. CSV deployment
    • OLM creates the ClusterServiceVersion for the selected Operator version
    • The Operator is deployed and begins managing its CRDs in the target scope

Upgrades and Channels

OLM provides a structured way to manage Operator upgrades.

Channels

A channel is a named upgrade stream for an Operator, such as:

Characteristics:

Upgrade Strategies

With a Subscription, you control:

Upgrade flow:

  1. New version appears in catalog in the same channel
  2. Subscription notices a newer CSV matching its constraints
  3. OLM creates a new InstallPlan
  4. Based on approval mode:
    • Automatic: InstallPlan is executed
    • Manual: Waits for administrator approval
  5. OLM updates CSV and Operator deployment

Dependency Management and Constraints

OLM understands relationships between Operators and their APIs:

OLM uses this information to:

Practical implications:

Namespaces, Scope, and Multi-Tenancy

How OLM handles multi-tenancy and scope is primarily determined by OperatorGroup and Subscription placement.

Patterns:

Implications:

Using the Web Console vs CLI with OLM

While the underlying resources are the same, the experience differs:

Web Console Experience

The OpenShift web console integrates tightly with OLM:

This is often the simplest path for beginners.

CLI / YAML Workflows

For scripted and GitOps workflows:

Benefits:

Common Operational Considerations

Version Pinning and Stability

You can manage risk by:

This allows you to:

Catalog Updates

CatalogSources themselves can be updated:

Monitoring:

Troubleshooting OLM-Managed Operators

Common places to look:

When issues arise, you typically follow this order:

  1. Check Subscription conditions
  2. Inspect latest InstallPlan
  3. Review CSV status and associated Operator pods/deployments

Best Practices for Working with OLM

By understanding and using OLM effectively, you gain a structured, repeatable, and governed way to introduce powerful platform capabilities into your OpenShift clusters without manually managing the underlying Kubernetes objects.

Views: 12

Comments

Please login to add a comment.

Don't have an account? Register now!