-
Notifications
You must be signed in to change notification settings - Fork 475
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
[OCPNODE-747] New CRD ImageDigestMirrorSet and ImageTagMirrorSet to support AllowMirrByTags #929
[OCPNODE-747] New CRD ImageDigestMirrorSet and ImageTagMirrorSet to support AllowMirrByTags #929
Conversation
e86c4dd
to
13729d0
Compare
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
@mtrmac @smarterclayton PTAL |
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
13729d0
to
45efed5
Compare
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
45efed5
to
b7ea2c4
Compare
@mtrmac PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Various questions from my previous review seem to remain outstanding.)
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
// https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table | ||
// +required | ||
// +kubebuilder:validation:Required | ||
// +kubebuilder:validation:Pattern=`(^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$)|(^(([a-zA-Z\*]|[a-zA-Z\*][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)?(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems incorrect, in that it allows *a.
; wildcards are supported only with the exact *.
prefix.
Even with the explanation, validating the regex feels like too much work (which I didn’t do now). Does the API annotation have any mechanisms that could help?
If not, building the regex from components somehow would be nice. Maybe something similar to the way https://github.com/containers/image/blob/main/docker/reference/regexp.go does it — that’s admittedly extreme in being literal, but it does have the nice property that it results in a Go program that can be reviewed in small pieces, and then run with a value.String()
to get a pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the kubebuilder doc has a mechanism helper for regex. I can use some containers/image helpers in goplayground here to define the pattern https://play.golang.org/p/NO9_2LmqPiu
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
a0cc302
to
ecb2599
Compare
@mtrmac could you have another round of review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QiWang19 I think it makes sense to update this enhancement at some point to pick up the new template changes (8d07520) involving API extensions since this will be adding a new CRD
Template link for ref: https://github.com/openshift/enhancements/blob/master/guidelines/enhancement_template.md
e030049
to
f325e8b
Compare
@mtrmac Could you review? Updated:
|
f325e8b
to
70f41ac
Compare
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
enhancements/api-review/add-new-CRD-ImageContentPolicy(ICP)-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
1e36840
to
bec341f
Compare
555a3de
to
37f4713
Compare
2738eed
to
abf342e
Compare
@umohnani8 @mrunalp @mtrmac PTAL. |
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Show resolved
Hide resolved
abf342e
to
62b98af
Compare
Add CRD ImageDigestMirrorSet and ImageTagMirrorSet to have API for epics: - https://issues.redhat.com/browse/OCPNODE-521: different API for two saprate lists for digest image pull and tag image pull using mirrors. - https://issues.redhat.com/browse/OCPNODE-810: add an option for user to choose if the source of the mirror should be denied if the mirrors pull failed. Enhancement: openshift/enhancements#929 Signed-off-by: Qi Wang <qiwan@redhat.com>
Add CRD ImageDigestMirrorSet and ImageTagMirrorSet to have API for epics: - https://issues.redhat.com/browse/OCPNODE-521: different API for two saprate lists for digest image pull and tag image pull using mirrors. - https://issues.redhat.com/browse/OCPNODE-810: add an option for user to choose if the source of the mirror should be denied if the mirrors pull failed. Enhancement: openshift/enhancements#929 Signed-off-by: Qi Wang <qiwan@redhat.com>
@umohnani8 @mrunalp PTAL |
Proposal around neverContactSource LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, mostly trivial typos.
(Noting that more discussion is happening in openshift/api#1126 .)
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
.../api-review/add-new-CRD-ImageDigestMirrorSet-and-ImageTagMirrorSet-to-config.openshift.io.md
Outdated
Show resolved
Hide resolved
…AllowMirrByTags Update the enhancement to describe the work has been done based on the previous discussions for Epic https://issues.redhat.com/browse/OCPNODE-521 We can continue the discussions from the current design. Signed-off-by: Qi Wang <qiwan@redhat.com>
New CRD ImageSourceDigestPolicy and ImageSourceTagPolicy to support AllowMirrByTags Signed-off-by: Qi Wang <qiwan@redhat.com>
62b98af
to
c0504c9
Compare
New CRD ImageDigestMirrorSet and ImageTagMirrorSet to support AllowMirrByTags Signed-off-by: Qi Wang <qiwan@redhat.com>
c0504c9
to
cc9b39e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for all the updates!
/lgtm Awesome Job! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mrunalp 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 |
@QiWang19: 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. |
- [Cluster-config-operator](https://github.com/openshift/cluster-config-operator) | ||
- [Openshift-api-server](https://github.com/openshift/openshift-apiserver/blob/98786f917ffc7d3dc3b05893f405970b87a419b9/pkg/image/apiserver/registries/registries.go) | ||
- [Runtime utils](https://github.com/openshift/runtime-utils/blob/8b8348d80d1d1e7b6cf06fb009d5965e0b55baa2/pkg/registries/registries.go#L50) | ||
- [Openshift-controller-manager](https://github.com/openshift/openshift-controller-manager/blob/2a11f145ad7fcf3e92460800de1d13ba7fbb90b0/pkg/build/controller/build/build_controller.go#L20943) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rphillips @QiWang19 oc and oc-mirror is missing here, and both of those tools heavily rely on the current ICSP implementation for all of image mirroring, this also includes our docs. Based on below note I can assume that the node team will also handle all the appropriate changes for oc and oc-mirror, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I will handle the related changes.
We can continue the discussions from the current design.
Signed-off-by: Qi Wang qiwan@redhat.com