Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Git-based operations (GitOps) for Operators managed by Operator Lifecycle Manager (OLM)

August 20, 2024
Ian Tewksbury
Related topics:
Automation and managementDevOpsDevSecOpsGitOpsHelmKubernetesOperators
Related products:
Red Hat OpenShift

The Operator Framework was paradigm shifting for managing infrastructure and providing services to users on Kubernetes by introducing a methodology for capturing a human operator's knowledge as a Kubernetes-native application, an Operator. The Operator Lifecycle Manager (OLM) brought systematic installation, removal, and update management for Operators. In parallel, the rise and recognition of the power and need for Git-based operations (GitOps) has brought much needed consistent, repeatable, and scalable management of not only Kubernetes and its surrounding ecosystem, but the management of the entire platform as a software product with full software development lifecycle (SLDC) for all the reasons end user applications have been refining their SDLC for all these years.

Challenge

OLM only offers two modes for operator installation and upgrade management: Manual and Automatic. In Automatic mode, the OLM will automatically update to the latest version of the given Operator as it becomes available in a subscribed channel. In Manual mode, the user must manually update the target minimal Operator version, including manually approving the installation and manually incrementing through required, phased updates. This prevents a user from moving between versions directly (ex: 1.1 to 1.5) because the user needs to move incrementally up to the target version (1.2, 1.3, and 1.4), resulting in a laborious process.

In the case of Automatic mode, you can easily capture in Git the required OLM Kubernetes custom resources in order to set the target Operator for automatic updates in a given channel. Oftentimes, an Operator maintains a latest channel as well as a channel for each major X version in semantic version (semver) format with no breaking changes in minor Y versions.

In the case of Manual mode, while you can set the startingCSV in the Subscription, you then have to manually approve the InstallPlan once it becomes available. While the Subscription can be captured in git, since the InstallPlan is automatically generated by the OLM, additional intervention is required given that the InstallPlan is not tracked. One potential option is to capture the generated InstallPlan in Git, set the approved value to true and have the resource be reconciled. However, these additional steps of manual intervention goes against the spirit of Git-based operations.

This ultimately leaves us with two options:

  • Use Git-based operations and set Operators to use the automatic update approval strategy and hope that an update doesn’t come through that doesn’t put you in a situation of untested automatic braking production updates.
    • We all recently experienced the (when, not if) eventually of this globally in late July 2024, when security software vulnerability definitions loaded at the kernel level in Microsoft Windows by a third-party tool were automatically updated with a corrupted vulnerabilities definition file, which caused infinite boot loop errors bringing down production systems and disrupting global air travel, banking, and government services among others
  • Break the flow of Git-based operations and manually control Operator versions, but benefit in avoiding unexpected production changes.

Or….

Using the operators-installer Helm chart

Luckily, in our open source software based world, if you do not like any of your options, you can create a new one.

Enter option 3, the community built and maintained operators-installer Helm chart used in production by a community of individuals who also encountered these challenges in their production operations.

This Helm chart solves the challenge of GitOps for OLM managed Operators. It accomplishes this by providing a Helm chart you can invoke directly, use as a dependent Helm chart, or as a Helm chart called by kustomize (my preferred method) which allows you to set the approval mode to Manual and specify an operator version, and then the Helm chart will take care of automatically approving the appropriate InstallPlan(s) for you, which the Helm chart would conveniently assume is what you wanted if you were incrementing the Operator version.

Additionally, the chart also handles incrementally upgrading operator versions which avoids the time consuming process of manually determining and then stepping through each required intermediate version.

And lastly, if there are any Operators that you want to place in automatic approval mode, that can be accomplished as well, which allows for a consistent way to manage operators regardless of approval method.

The result with option 3 is that you can truly achieve declarative Git-based operations with fixed Operator versions with intuitive controlled Operator updates!

Examples

The following are several examples demonstrating how the Helm chart can be used. Additional methods can also be found within the chart documentation and tests.

Helm called by kustomize

Install the external-secrets-operator using operators-installer via kustomize:

---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: operators-installer
  repo: https://redhat-cop.github.io/helm-charts
  version: 3.0.1
  valuesInLine:
    operatorGroups:
    - name: external-secrets-operator
      createNamespace: true
      targetOwnNamespace: false
    operators:
    - channel: stable
      installPlanApproval: Manual
      name: external-secrets-operator
      source: community-operators
      sourceNamespace: olm
      csv: external-secrets-operator.v0.8.1
      namespace: external-secrets-operator

As a Helm subchart

Instal the external-secrets-operator using operators-installer via Helm.

Chart.yaml:

---
apiVersion: v2
name: example-my-org-ops
description: example declarative install of operator
type: application
version: 1.0.0
dependencies:
- name: operators-installer
  version: "3.0.1"
  repository: "https://redhat-cop.github.io/helm-charts"

operator-installtions-values.yaml:

---
operators-installer:
  operatorGroups:
  - name: external-secrets-operator-2
    createNamespace: true
    targetOwnNamespace: false
  operators:
  - channel: stable
    installPlanApproval: Manual
    name: external-secrets-operator
    source: community-operators
    sourceNamespace: olm
    csv: external-secrets-operator.v0.8.1
    namespace: external-secrets-operator-2
    installPlanVerifierActiveDeadlineSeconds: 1200

Direct from Helm

CLI:

helm upgrade -i --repo=https://redhat-cop.github.io/helm-charts operators-installer -f operator-installtions-values.yaml

Caveats

  • The operators-installer Helm chart is community maintained and not supported by Red Hat.
  • While the operators-installer Helm chart can automatically increment through Operator versions, support is not currently available to verify whether an Operator upgrade causes issues other than verifying the installation of the new Operator version was successful. The end user should test and verify any operator upgrades in lower environments to ensure no issues occur, such as API changes.
  • As the Operator Framework does not support the ability to perform rollbacks, the operators-installer Helm chart does not either.

Getting help

If you are excited about this solution to solve your current problems, reach out to the community for free (as in pizza) help by opening a Git issue.

Future

There are currently two features in Tech Preview status in Red Hat products that are intended to address the root challenge of declarative Git-based operations for upgrading operators managed by OLM.

OLM v1.0 is designed to solve many of these problems and as of Red Hat OpenShift 4.16 is in Tech Preview. This is done by deprecating the pre 1.0 OLM custom resource definitions and introducing ClusterExtension which, among other things, replaces the old Automatic and Manual modes and startingCSV in the Subscription with a version parameter which supports declaring ranges.

Additionally, Red Hat Advanced Cluster Manager has a new OperatorPolicy custom resource in Tech Preview that takes a similar approach to the operators-installer Helm chart which could be a great supported alternative if you are a user of Advanced Cluster Management, once it leaves Teach Preview status.

In the meantime, we have the operators-installer.

Related Posts

  • Deploying Kubernetes Operators with Operator Lifecycle Manager bundles

  • Operator integration testing for Operator Lifecycle Manager

  • Introduction to the Kubernetes Operator Framework

  • Why should developers care about GitOps?

  • GitOps: Stop, collaborate and deploy

Recent Posts

  • Every layer counts: Defense in depth for AI agents with Red Hat AI

  • Fun in the RUN instruction: Why container builds with distroless images can surprise you

  • Trusted software factory: Building trust in the agentic AI era

  • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

  • Red Hat Hardened Images: Top 5 benefits for software developers

What’s up next?

GitOps has become a standard in deploying applications to Kubernetes, and many companies are adopting the methodology for their DevOps and cloud-native strategy. Download the GitOps Cookbook for useful recipes and examples for successful hands-on applications development and deployment with GitOps.

Get the e-book
Red Hat Developers logo LinkedIn YouTube Twitter Facebook

Platforms

  • Red Hat AI
  • Red Hat Enterprise Linux
  • Red Hat OpenShift
  • Red Hat Ansible Automation Platform
  • See all products

Build

  • Developer Sandbox
  • Developer tools
  • Interactive tutorials
  • API catalog

Quicklinks

  • Learning resources
  • E-books
  • Cheat sheets
  • Blog
  • Events
  • Newsletter

Communicate

  • About us
  • Contact sales
  • Find a partner
  • Report a website issue
  • Site status dashboard
  • Report a security problem

RED HAT DEVELOPER

Build here. Go anywhere.

We serve the builders. The problem solvers who create careers with code.

Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

Sign me up

Red Hat legal and privacy links

  • About Red Hat
  • Jobs
  • Events
  • Locations
  • Contact Red Hat
  • Red Hat Blog
  • Inclusion at Red Hat
  • Cool Stuff Store
  • Red Hat Summit
© 2026 Red Hat

Red Hat legal and privacy links

  • Privacy statement
  • Terms of use
  • All policies and guidelines
  • Digital accessibility

Chat Support

Please log in with your Red Hat account to access chat support.