Skip to content

Conversation

@akashbogam
Copy link
Contributor

@akashbogam akashbogam commented Jan 5, 2026

Problem:
In clusters without a default storage class, the OpenShift Pipelines installation
gets stuck waiting for the postgredb-tekton-results-postgres-0 PVC to bind. The
PVC remains in Pending state because it has no storageClassName specified, and
the current logic waits up to 42.5 minutes before attempting to patch it with an
available storage class. This causes significant delays and potential timeouts
during pipeline installations.

Solution:
Modified installOpenShiftPipelines() to check PVC status immediately after creation
and patch it proactively if needed:

  1. Wait briefly (max 30 seconds) for the PVC to be created
  2. If PVC is already Bound, return success immediately
  3. If PVC is Pending without a storageClassName, patch it immediately with the
    first available storage class (or custom storage class if provided)
  4. If PVC has a storageClassName but isn't bound yet, wait for it using waitForPVC()

This reduces the wait time from 42.5 minutes to ~30 seconds before patching,
ensuring faster resolution of the Pending PVC issue in clusters without a
default storage class.

find the below evidence
Fixes: ibm-mas/cli#1674
before fix: the pvc will be stuck in the pending state if there's no default storageclass.

image

after applying fix the pvc will fetch the all storageclasses in the cluster and pick the first one[0th index] and patch the pvc with that storageclass.

image

@akashbogam akashbogam requested a review from a team as a code owner January 5, 2026 10:21
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, however you need to address the styling issues. See here. If you don't have pre-commit installed in your local machine, ping me on Slack and I'll help set up tomorrow.

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

@terc1997 terc1997 added this pull request to the merge queue Jan 6, 2026
Merged via the queue into stable with commit ae566c5 Jan 6, 2026
3 checks passed
@terc1997 terc1997 deleted the postgresdb-pvc-fix branch January 6, 2026 12:59
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.

Empty storage class in OpenShift Pipeline installtion

2 participants