Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete storageclass from cs cr #2334

Open
wants to merge 3 commits into
base: scripts-dev
Choose a base branch
from
Open

delete storageclass from cs cr #2334

wants to merge 3 commits into from

Conversation

qpdpQ
Copy link
Contributor

@qpdpQ qpdpQ commented Dec 11, 2024

What this PR does / why we need it:
preload_data script should delete storageclass from cs cr
Which issue(s) this PR fixes:
Fixes # https://github.ibm.com/IBMPrivateCloud/roadmap/issues/65562

@ibm-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qpdpQ

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

' | \
$OC apply -n $TO_NAMESPACE -f - || error "Failed to copy over $resourceType $resourceName."

if [[ $resourceType == "commonservice" && $storageClass_exist == "true"]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @qpdpQ
I am wondering if this could be optimized to reduce the duplicated code?
For example, all the resources will have same steps for removing certain fields firstly, then an additional to remove .spec.storageClass if it is CommonService CR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's a good idea

@ibm-ci-bot ibm-ci-bot added size/S and removed size/M labels Dec 11, 2024
Signed-off-by: Allen Li <[email protected]>
@qpdpQ qpdpQ requested a review from Daniel-Fan December 11, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants