-
Notifications
You must be signed in to change notification settings - Fork 330
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
Fix image registry reconcile loop #1794
Fix image registry reconcile loop #1794
Conversation
Thanks! @davidvossel the specs above in the PR desc seems identical, am I missing anything? @sjenning shouldn't loopDetector have captured this? |
@@ -25,7 +25,7 @@ func ReconcileRegistryConfig(cfg *imageregistryv1.Config, platform hyperv1.Platf | |||
if cfg.Spec.HTTPSecret == "" { | |||
cfg.Spec.HTTPSecret = generateImageRegistrySecret() | |||
} | |||
if platform == hyperv1.KubevirtPlatform || platform == hyperv1.NonePlatform { | |||
if platform == hyperv1.KubevirtPlatform || platform == hyperv1.NonePlatform && cfg.Spec.Storage.EmptyDir == nil { |
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.
did you mean
(platform == hyperv1.KubevirtPlatform || platform == hyperv1.NonePlatform) && cfg.Spec.Storage.EmptyDir == nil
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.
ouch. yes i did
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.
okay, fixed!
@enxebre we only have loop detector on clients to the management KAS, not the guest KAS |
actually I'm wrong, we do have loop detector on the HCCO guest cluster connection too |
Signed-off-by: David Vossel <[email protected]>
17275c7
to
8b42849
Compare
nope, that was a copy paste error. I was trying to show that the |
Thanks David!
For @sjenning to have the chance to have another a look |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidvossel, enxebre 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 |
lgtm |
/retest-required |
@davidvossel: The following tests failed, say
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. |
When setting the image registry storage to EmptyDir{}, a reconcile loop is occurring for the KubeVirt and None platforms.
The issue is that the the
imageregistry.spec.storage
struct has amanagementState
field that now receives an default value, but our HCCO reconcile loop clobbers that default value over and over again.Example. HCCO sets
Then the image registry gets the
spec.storage.managementState: Managed
field defaulted.After that, the HCCO then clobbers that storage field again and removes the managementState default, then the default gets added back, then HCCO clobbers it, etc... reconcile loop.
To fix this, we should only cobber the storage field if the EmptyDir{} storage type isn't already in use.