Skip to content

Conversation

@jainyjoseph
Copy link
Contributor

Description

This PR adds support for a new catalog-controlled variable, db2_channel_default, to determine the Db2 operator channel/version used during installation.

Previously, the Db2 operator version was implicitly selected, with fallback behavior hardcoded in the CLI. With this change, the default Db2 channel can now be explicitly defined in the operator catalog metadata, enabling better control over Db2 version selection across releases.

Story

Jira 11097

What's New

  • Introduced new variable db2_channel_default sourced from catalog metadata
  • CLI now:
    • Reads db2_channel_default from the catalog
    • Uses it as the default Db2 channel when no explicit db2_channel is provided by the user
    • Removes dependency on hardcoded Db2 version defaults in the CLI

Db2 channel resolution order:

  1. User-provided db2_channel (CLI input)
  2. db2_channel_default from catalog metadata
  3. Fallback to v11 (backward compatibility)

Benefits

  • Enables catalog-driven control of Db2 operator versions
  • Decouples Db2 version selection from hardcoded CLI logic
  • Simplifies Db2 version management per catalog release
  • Backward compatible with existing workflows

Testing Performed

  • Verified CLI picks user-provided db2_channel in dev mode, when specified
  • Verified fallback to db2_channel_default from catalog metadata
  • Verified fallback to v11 when db2_channel_default in catalog metadata is not set
  • Logs and evidence attached in JIRA 11097

NB:

  • No behavior change for users
  • Non-dev and dev workflows remain consistent with previous behavior unless catalog metadata is configured

@jainyjoseph jainyjoseph requested a review from a team as a code owner January 16, 2026 13:49
Copy link
Contributor

@terc1997 terc1997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @anilprajapatiibm can you take a look at this too ?

@anilprajapatiibm
Copy link
Contributor

@jainyjoseph without CLI also, default channel value is coming from the catalog,
by introducing this new variable what extra control we will have?

@jainyjoseph
Copy link
Contributor Author

jainyjoseph commented Jan 17, 2026

@jainyjoseph without CLI also, default channel value is coming from the catalog, by introducing this new variable what extra control we will have?

The metadata in there today controls the db2u operator version:

db2u_version: 7.3.1+20250821.161005.16793 # Operator version 110509.0.6 to find the version 7.3.1+20250821.161005.16793, search db2u-operator digest on repo (https://github.com/IBM/cloud-pak/tree/master/repo/case/ibm-db2uoperator)

But we don't have anything in there controlling the db2 operand release that will be used. Everything is hardcoded for v11 throughout the ansible collection.

For this reason David asked to introduce new variable to control version v11 and v12 through catalog and replicate in same way as we do for mongo_default_version.
ibm-mas/cli#2008
ibm-mas/ansible-devops#2064
Above PRs now will help with db2_channel_default control from catalog

@anilprajapatiibm
Copy link
Contributor

Controlling db2u version from catalog metadata is good use case

@anilprajapatiibm anilprajapatiibm merged commit e924ed2 into update-260129 Jan 19, 2026
3 checks passed
@anilprajapatiibm anilprajapatiibm deleted the mc-11097pyt branch January 19, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants