[patch] fix for postgres db pvc bound issue #165
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
first available storage class (or custom storage class if provided)
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.
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.