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

[bug-1574]: Fix offline bundle registry references #774

Merged
merged 14 commits into from
Nov 12, 2024

Conversation

atye
Copy link
Contributor

@atye atye commented Nov 8, 2024

Description

The images.manifest file prior to 1.7.0, used to update the bundle with the private registry when preparing the bundle, contains references with and without docker.io for some images:

# grep isilon scripts/images.manifest
dellemc/csi-isilon:v2.11.0
docker.io/dellemc/csi-isilon:v2.11.0

If a file contains docker.io/dellemc/csi-isilon:v2.11.0, preparing the bundle will replace dellemc/csi-isilon:v2.11.0 with the private registry: docker.io/private-registry.com/csi-isilon:v2.11.0. Then, docker.io/dellemc/csi-isilon:v2.11.0 is replaced with the private registry but now that string has no matches and the file is left with the faulty registry.

This fix is having all image references specify the registry.

https://github.com/dell/csm-operator/blob/main/bundle/manifests/dell-csm-operator.clusterserviceversion.yaml and https://github.com/dell/csm-operator/blob/main/operatorconfig/driverconfig/common/default.yaml, used to gather image names when building the bundle, are updated to reference all images with the public registry. Since 1.7.0, all of our images now reference quay.io except sdc, otel-collector, and nginx. These are updated to reference docker.io.

The sample files are updated to reference the registry to be consistent with the images.manifest file.

Made csm-offline-bundle.sh executable.

Adds a new unit test for code coverage improvement for PR check.

Caveats:

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1574

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

Built and prepared the bundle verifying that the private registry is correctly put in place in the yaml files that the user will use.
Built and installed the Operator via offline bundle.

@atye atye force-pushed the usr/atye/offline-bundle-registry branch from c157baa to c1d107e Compare November 8, 2024 17:31
@donatwork donatwork self-requested a review November 12, 2024 14:03
donatwork
donatwork previously approved these changes Nov 12, 2024
alexemc
alexemc previously approved these changes Nov 12, 2024
donatwork
donatwork previously approved these changes Nov 12, 2024
@atye atye dismissed stale reviews from donatwork and alexemc via 9c76755 November 12, 2024 17:19
Copy link
Contributor

@jooseppi-luna jooseppi-luna left a comment

Choose a reason for hiding this comment

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

have you tried installing with the bundle? how have we verified that it works other than looking through it?

@atye
Copy link
Contributor Author

atye commented Nov 12, 2024

have you tried installing with the bundle? how have we verified that it works other than looking through it?

@jooseppi-luna Yes, this works. The issue that the customer observed with the RELATED_IMAGES environment variables is resolved and installation is successful, with relevant files updated with the registry.

@atye atye merged commit b3d0f22 into main Nov 12, 2024
7 checks passed
@atye atye deleted the usr/atye/offline-bundle-registry branch November 12, 2024 19:20
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.

7 participants