You arrive on Monday morning and your Pipelines operator is two minor versions ahead of what you validated. Nobody ran oc apply. No change ticket exists. The CSV just rolled forward because a catalog image was refreshed overnight and your Subscription was set to Automatic.

This is not a bug. It is exactly what Operator Lifecycle Manager (OLM) is designed to do when you let it. The good news: OLM gives you precise control knobs — CatalogSource, Subscription, InstallPlan, channels, and pinned catalog digests. The bad news: the defaults in the OpenShift web console push you straight into automatic upgrades, and most clusters never get revisited.

This article walks through how OLM actually decides to upgrade an operator, how to freeze versions, how to approve upgrades deliberately, and how to test them before they reach production.

Context: why operators upgrade behind your back

OLM v1 (the operators.coreos.com/v1alpha1 API shipped in OpenShift 4.x) resolves operator versions from four objects:

  • CatalogSource — a gRPC pod serving a catalog index image (redhat-operator-index, certified-operator-index, etc.). It is polled on an interval and the image tag is mutable.
  • PackageManifest — a read-only, virtual resource exposing packages and channels from the catalogs.
  • Subscription — your intent: this package, this channel, from this catalog, with this approval mode.
  • InstallPlan — the concrete upgrade transaction: a list of CSVs and RBAC objects to apply.
  • ClusterServiceVersion (CSV) — the installed operator version.

The surprise upgrade chain is simple: redhat-operators points to registry.redhat.io/redhat/redhat-operator-index:v4.16, a floating tag. The catalog pod re-pulls it every 10 minutes by default. Red Hat publishes a new bundle into channel stable. Your Subscription on stable with installPlanApproval: Automatic sees a new channel head, OLM generates an InstallPlan, auto-approves it, the old CSV is replaced, and the operator deployment rolls. Any CRD conversion, webhook change, or defaulting behaviour change lands in production at the same moment.

For cluster-scoped operators (service mesh, storage, pipelines, GitOps), that blast radius is the whole cluster.

Auditing what you actually run today

Start with a cluster-wide inventory. This single command tells you which subscriptions are armed to self-upgrade:

oc get subscription -A -o custom-columns=\ NS:.metadata.namespace,\ NAME:.metadata.name,\ PACKAGE:.spec.name,\ CHANNEL:.spec.channel,\ APPROVAL:.spec.installPlanApproval,\ SOURCE:.spec.source,\ INSTALLED:.status.installedCSV,\ CURRENT:.status.currentCSV 

An empty APPROVAL column means Automatic — the field defaults to it when omitted.

Then check the installed CSVs and their health:

# All operator versions, cluster-wide oc get csv -A -o custom-columns=NS:.metadata.namespace,NAME:.metadata.name,VERSION:.spec.version,PHASE:.status.phase # Anything not healthy oc get csv -A | grep -v Succeeded 

Finally, look at the catalogs feeding those subscriptions:

oc get catalogsource -n openshift-marketplace -o custom-columns=\ NAME:.metadata.name,\ IMAGE:.spec.image,\ POLL:.spec.updateStrategy.registryPoll.interval,\ STATE:.status.connectionState.lastObservedState 

If IMAGE ends in a tag like :v4.16 and POLL is 10m, your cluster re-evaluates upstream content 144 times a day.

Understanding channels before you change them

A channel is an upgrade stream, not a version. stable on one operator means "latest and greatest"; on another it means a specific maintenance line. Always enumerate channels from the PackageManifest rather than guessing:

oc get packagemanifest openshift-pipelines-operator-rh -n openshift-marketplace \ -o jsonpath='{.status.defaultChannel}{"\n"}' oc get packagemanifest openshift-pipelines-operator-rh -n openshift-marketplace \ -o jsonpath='{range .status.channels[*]}{.name}{"\t"}{.currentCSV}{"\n"}{end}' 

Typical output shows version-pinned channels (pipelines-1.15, pipelines-1.16) alongside a rolling one (latest). Prefer a version-pinned channel in production. A channel like pipelines-1.15 only ever receives patch releases of that minor line; moving to 1.16 becomes an explicit, reviewable edit to the Subscription.

You can also inspect what a specific bundle declares, including skipRange — a field that lets a bundle replace a whole range of older versions in one jump:

oc get packagemanifest openshift-pipelines-operator-rh -n openshift-marketplace \ -o jsonpath='{range .status.channels[*]}{.name}{": "}{.currentCSVDesc.annotations.olm\.skipRange}{"\n"}{end}' 

skipRange: '>=1.14.0 <1.15.3' means approving one InstallPlan can move you from 1.14.0 directly to 1.15.3. Manual approval is what gives you the chance to notice.

Switching to manual approval

The core change is a single field. Declaratively, your Subscription should look like this:

apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: openshift-pipelines-operator-rh namespace: openshift-operators spec: channel: pipelines-1.15 name: openshift-pipelines-operator-rh source: redhat-operators sourceNamespace: openshift-marketplace installPlanApproval: Manual startingCSV: openshift-pipelines-operator-rh.v1.15.2 config: resources: requests: cpu: 100m memory: 256Mi nodeSelector: node-role.kubernetes.io/infra: "" tolerations: - key: node-role.kubernetes.io/infra operator: Exists effect: NoSchedule 

Two things to know about startingCSV:

  • It only applies at initial install. Adding it to an existing Subscription does nothing and will not downgrade anything.
  • Combined with installPlanApproval: Manual, it makes a fresh install fully deterministic: OLM creates an InstallPlan for exactly that CSV and waits.

To flip an existing subscription without rewriting the manifest:

oc patch subscription openshift-pipelines-operator-rh \ -n openshift-operators \ --type merge \ -p '{"spec":{"installPlanApproval":"Manual"}}' 

Do this everywhere in one pass, carefully, after reviewing the list:

for ns in $(oc get subscription -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\n"}{end}'); do echo "patching ${ns}" oc patch subscription "${ns#*/}" -n "${ns%/*}" --type merge \ -p '{"spec":{"installPlanApproval":"Manual"}}' done 

The manual-approval trap

Manual approval does not stop OLM from computing upgrades. It stops it from applying them. When a new channel head appears, OLM still creates an InstallPlan with spec.approved: false, and your Subscription enters UpgradePending. If nobody approves, the operator stays on the current version indefinitely — which is correct, but silent. Monitor for it (see below).

Reviewing and approving an InstallPlan

When an upgrade is waiting:

oc get installplan -A -o custom-columns=\ NS:.metadata.namespace,\ NAME:.metadata.name,\ CSV:.spec.clusterServiceVersionNames,\ APPROVAL:.spec.approval,\ APPROVED:.spec.approved,\ PHASE:.status.phase 

Before approving, inspect what the plan will actually do. This is the step most teams skip:

IP=$(oc get installplan -n openshift-operators \ -o jsonpath='{.items[?(@.spec.approved==false)].metadata.name}') # Target version(s) oc get installplan "$IP" -n openshift-operators -o jsonpath='{.spec.clusterServiceVersionNames}{"\n"}' # Every resource the plan will create or update (CRDs, RBAC, webhooks) oc get installplan "$IP" -n openshift-operators \ -o jsonpath='{range .status.plan[*]}{.resource.kind}{"/"}{.resource.name}{" -> "}{.status}{"\n"}{end}' 

Pay attention to CustomResourceDefinition entries: a CRD update is the irreversible part of an operator upgrade. Check whether the new CSV requests broader cluster permissions than the old one:

oc get csv openshift-pipelines-operator-rh.v1.15.3 -n openshift-operators \ -o jsonpath='{.spec.install.spec.clusterPermissions[*].rules}' | python3 -m json.tool 

Approve explicitly:

oc patch installplan "$IP" -n openshift-operators \ --type merge -p '{"spec":{"approved":true}}' # Watch the replacement happen oc get csv -n openshift-operators -w 

If you decide not to upgrade, delete the InstallPlan. OLM will recreate it, so the durable fix is to move the Subscription to a channel that does not contain that version.

Freezing the catalog itself

Manual approval protects the apply step. Pinning the catalog protects the resolution step — it keeps the cluster's view of available versions stable, which matters for reproducible installs and disconnected environments.

Resolve the current digest of the index image and pin it:

oc image info registry.redhat.io/redhat/redhat-operator-index:v4.16 \ --filter-by-os linux/amd64 | grep Digest 
apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: redhat-operators-pinned namespace: openshift-marketplace spec: sourceType: grpc image: registry.redhat.io/redhat/redhat-operator-index@sha256:0000000000000000000000000000000000000000000000000000000000000000 displayName: Red Hat Operators (pinned) publisher: Red Hat # No registryPoll: a digest is immutable, polling only wastes pulls.  grpcPodConfig: securityContextConfig: restricted nodeSelector: node-role.kubernetes.io/infra: "" 

Then disable the mutable default sources so nobody subscribes to them by accident:

apiVersion: config.openshift.io/v1 kind: OperatorHub metadata: name: cluster spec: sources: - name: redhat-operators disabled: true - name: certified-operators disabled: true - name: community-operators disabled: true - name: redhat-marketplace disabled: true 
oc apply -f operatorhub-cluster.yaml oc get catalogsource -n openshift-marketplace 

Point your Subscriptions at source: redhat-operators-pinned. Promoting a new catalog digest now becomes a reviewable Git commit.

Testing upgrades before production

The repeatable pattern is: build a filtered catalog containing only the versions you intend to allow, publish it to your registry, and promote it through environments.

With oc-mirror, an ImageSetConfiguration restricts both channel and version range:

kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v2alpha1 mirror: operators: - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.16 packages: - name: openshift-pipelines-operator-rh channels: - name: pipelines-1.15 minVersion: 1.15.2 maxVersion: 1.15.4 - name: openshift-gitops-operator channels: - name: gitops-1.13 
oc-mirror --config imageset-config.yaml \ --workspace file://./workspace \ docker://registry.internal.example.com/olm-mirror \ --v2 

The resulting catalog physically cannot offer 1.16.x. Your staging cluster consumes the new digest first, you approve the InstallPlan there, run your conformance tests against the operator's CRs, then promote the same digest to production.

Alerting on pending upgrades

Manual approval creates a new failure mode: forgotten upgrades. A simple cluster-wide check works well in a CI cron job:

oc get installplan -A \ -o jsonpath='{range .items[?(@.spec.approved==false)]}{.metadata.namespace}{"\t"}{.spec.clusterServiceVersionNames}{"\n"}{end}' 

OLM also exposes csv_abnormal and csv_succeeded in Prometheus; alert on CSVs stuck outside Succeeded for more than a few minutes, which catches upgrades that were approved but failed halfway.

Security best practices

  • Pin by digest, never by tag. A floating tag on a CatalogSource is an unsigned, unreviewed supply-chain input running as a pod in your cluster.
  • Disable the default catalogs you do not use, especially community-operators, which has no Red Hat support or security commitment.
  • Scope OperatorGroups. Avoid openshift-operators (all-namespaces) for anything that does not need it. A namespaced OperatorGroup limits the RBAC the CSV can obtain:
apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: team-a-og namespace: team-a-operators spec: targetNamespaces: - team-a-operators 
  • Gate who can approve. Approving an InstallPlan grants cluster-wide RBAC to the operator. Keep that permission out of developer roles:
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: olm-installplan-approver rules: - apiGroups: ["operators.coreos.com"] resources: ["installplans"] verbs: ["get", "list", "watch", "patch", "update"] - apiGroups: ["operators.coreos.com"] resources: ["subscriptions", "clusterserviceversions"] verbs: ["get", "list", "watch"] 
  • Diff clusterPermissions between CSV versions before approving. A patch release that suddenly asks for secrets: ["*"] cluster-wide deserves a conversation.
  • Run catalog pods restricted. Set grpcPodConfig.securityContextConfig: restricted so the catalog pod runs under the restricted-v2 SCC.
  • Keep Subscriptions in Git. Approval mode, channel, source, and catalog digest are security-relevant configuration; drift there is invisible otherwise.

Key takeaways

  • installPlanApproval defaults to Automatic. Audit every Subscription in your fleet today — the one-liner above takes thirty seconds.
  • Channels are upgrade streams. Pick a version-pinned channel (pipelines-1.15) over a rolling one (latest) in production, and check olm.skipRange to know how far a single approval can jump you.
  • startingCSV only affects initial installs; it is not a rollback mechanism. Downgrades generally mean deleting the Subscription and CSV, then reinstalling at a known version.
  • Pin CatalogSources by digest and disable the mutable default sources. This is the difference between "my cluster resolves whatever the internet published this morning" and "my cluster resolves what I committed".
  • Read status.plan on the InstallPlan before approving. CRD changes and new cluster permissions are the parts you cannot easily undo.
  • Manual approval shifts risk from unplanned upgrades to forgotten ones. Monitor unapproved InstallPlans and abnormal CSVs so operators do not silently rot several versions behind.

Note that OLM v1 (ClusterExtension, ClusterCatalog) is progressively replacing these APIs in recent OpenShift releases, with a different version-pinning model based on semver ranges. The discipline is identical: declare the version range you accept, pin your catalog, and make every upgrade an explicit, reviewed action.