-
Notifications
You must be signed in to change notification settings - Fork 98
MULTIARCH-4557: Sync import mode image config status field in the observed config #582
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
MULTIARCH-4557: Sync import mode image config status field in the observed config #582
Conversation
|
@Prashanth684: This pull request references MULTIARCH-4557 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
80311e9 to
36a5f27
Compare
36a5f27 to
4bf8d3e
Compare
|
@Prashanth684: This pull request references MULTIARCH-4557 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
dinhxuanvu
left a comment
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.
Overall, looks good to me.
946f24b to
ec69e2b
Compare
|
/test e2e-aws-ovn |
dinhxuanvu
left a comment
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
|
@tkashem @p0lyn0mial For final revie and approval. |
|
/test e2e-aws-ovn |
0f0e3a7 to
3bfa20f
Compare
tkashem
left a comment
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.
Have a few minor comments
/approve
Thanks
| } | ||
|
|
||
| func ObserveImagestreamImportMode(genericListers configobserver.Listers, recorder events.Recorder, existingConfig map[string]interface{}) (map[string]interface{}, []error) { | ||
| listers := genericListers.(configobservation.Listers) |
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.
is it possible to use lister := configobserver.ImageConfigLister directly?
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.
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.
@tkashem is my observation correct, or is there another way to do it?
| configImage, err := listers.ImageConfigLister.Get("cluster") | ||
| if errors.IsNotFound(err) { | ||
| klog.Warningf("image.config.openshift.io/cluster: not found") | ||
| return observedConfig, errs |
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.
can you please, perhaps with a comment, clarify why we have to special case NotFound here, and return observedConfig (empty) instead of prevObservedConfig?
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.
honestly, i followed the pattern of the other observer functions in this file. Going back, it looks like #57 introduced it. That is a good question but I don't know what the motivation for that was.
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.
maybe because if the object is not found, it has been potentially removed and in that case we want it to be empty?
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.
probably yes, @sanchezl if the cluster object (the thing we are observing for config) is missing, is it an error, or the operator does its best to continue with the old configuration?
3bfa20f to
b379f0d
Compare
0a2c4aa to
b283df7
Compare
…erved config As per openshift/enhancements#1605, there was a new field introduced in the image config spec and status which reflects the global value to be set for imagestream import mode which is behind a featuregate. This PR reads the image config status, checks if the importmode string is present and syncs that value in the imagepolicyconfig of the observed config to be used by the apiserver.
|
@Prashanth684: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
|
/test e2e-upgrade |
|
/lgtm |
|
/lgtm /hold |
|
/hold cancel |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aleskandro, dinhxuanvu, Prashanth684, tkashem The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[ART PR BUILD NOTIFIER] Distgit: ose-cluster-openshift-apiserver-operator |
As per openshift/enhancements#1605, there was a
new field introduced in the image config spec and status which reflects
the global value to be set for imagestream import mode which is behind a
featuregate. This PR reads the image config status, checks if the importmode
string is present and syncs that value in the imagepolicyconfig of the
observed config to be used by the apiserver.
API changes: openshift/api#1928
openshift-apiserver changes: openshift/openshift-apiserver#443
image-registry-operator changes: openshift/cluster-image-registry-operator#1090