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

CFE-904: Create AdditionalImage Collector implem. based on registry as localStore #666

Merged
merged 2 commits into from Jul 31, 2023

Conversation

sherine-k
Copy link
Contributor

Description

This PR initializes a local registry at initialization of the executor.
The local registry is based on github.com/distribution/distribution.
The registry starts on HTTP port 5000, and uses a filesystem driver as storage.
Its storage root directory depends on the mirroring workflow that is picked up from the command line.

  • For Mirror to Disk workflow :
    • The command will be like : build/mirror --config isc.yaml file:///tmp/the-store
    • And the storage root directory will be /tmp/the-store
  • For Disk to Mirror workflow:
    • The command will be like : build/mirror --config isc.yaml --from file:///tmp/the-store docker://localhost:6000/test2 --dest-tls-verify=false --src-tls-verify=false
    • And the storage root directory will be /tmp/the-store

Fixes # CFE-904

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Using the following imageSetConfig, we performed:

  • MirrorToDisk workflow
build/mirror --config isc.yaml file:///tmp/the-store
  • DiskToMirror workflow
build/mirror --config isc.yaml --from file:///tmp/the-store docker://localhost:6000/test2 --dest-tls-verify=false --src-tls-verify=false

Test Configuration:

  • ImageSetConfig (isc.yaml):
# This config demonstrates how to mirror a version range
# in the specified channel for an OpenShift release.
---
apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
  additionalImages: 
    - name: registry.redhat.io/ubi8/ubi:latest
    - name: registry.redhat.io/ubi9/ubi:latest

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 31, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 31, 2023

@sherine-k: This pull request references CFE-904 which is a valid jira issue.

In response to this:

Description

This PR initializes a local registry at initialization of the executor.
The local registry is based on github.com/distribution/distribution.
The registry starts on HTTP port 5000, and uses a filesystem driver as storage.
Its storage root directory depends on the mirroring workflow that is picked up from the command line.

  • For Mirror to Disk workflow :
    • The command will be like : build/mirror --config isc.yaml file:///tmp/the-store
    • And the storage root directory will be /tmp/the-store
  • For Disk to Mirror workflow:
    • The command will be like : build/mirror --config isc.yaml --from file:///tmp/the-store docker://localhost:6000/test2 --dest-tls-verify=false --src-tls-verify=false
    • And the storage root directory will be /tmp/the-store

Fixes # CFE-904

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Using the following imageSetConfig, we performed:

  • MirrorToDisk workflow
build/mirror --config isc.yaml file:///tmp/the-store
  • DiskToMirror workflow
build/mirror --config isc.yaml --from file:///tmp/the-store docker://localhost:6000/test2 --dest-tls-verify=false --src-tls-verify=false

Test Configuration:

  • ImageSetConfig (isc.yaml):
# This config demonstrates how to mirror a version range
# in the specified channel for an OpenShift release.
---
apiVersion: mirror.openshift.io/v1alpha2
kind: ImageSetConfiguration
mirror:
 additionalImages: 
   - name: registry.redhat.io/ubi8/ubi:latest
   - name: registry.redhat.io/ubi9/ubi:latest

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Jul 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sherine-k

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2023
Copy link
Contributor

@lmzuccarelli lmzuccarelli left a comment

Choose a reason for hiding this comment

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

other than this looks good to me

v2/pkg/cli/executor.go Outdated Show resolved Hide resolved
@sherine-k
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 31, 2023
Copy link
Contributor

@aguidirh aguidirh left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2023
@aguidirh
Copy link
Contributor

/lgtm

@sherine-k
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 31, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 31, 2023

@sherine-k: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@aguidirh
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2023
@sherine-k
Copy link
Contributor Author

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Jul 31, 2023

@sherine-k: you cannot LGTM your own PR.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit 10612b6 into openshift:main Jul 31, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants