-
Notifications
You must be signed in to change notification settings - Fork 83
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
componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) #484
componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) #484
Conversation
componentConditions: | ||
description: Component Conditions shows the conditions in a per component basis | ||
type: object | ||
additionalProperties: |
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 we define this as a schema instead? Then we can use the "properties" keyword to define exactly which keys we allow.
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, we could. Here the component name would be the index and as the list of components is a slice I opted to leave this as is. If we go that way then it would make sense to also change the way we set components to managed or not and use a schema there as well. WDYT?
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.
Regardless of what we are going to do with Spec.Components
I adjusted the status to have a schema. PTAL.
|
||
// Reconcile is called for reconcile status for a given QuayRegistry components. This function | ||
// always rescheduled the same event on return, that makes this to run from time to time. | ||
func (q *QuayRegistryStatusReconciler) Reconcile( |
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 a common practice in operators to create a controller to report status of watched resources? Is there no way to have the QuayRegistry controller watch over its owned resources instead of just its own CR?
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.
No, it is not a common practice (this is more of a bad practice). The QuayRegistry controller acts only when something changed in a QuayRegistry object and it does a few things that I still don't fully understand (I have been informed that it creates pods for running database upgrades, for instance). To have the QuayRegistry reconcile to happen more frequently might cause other issues and I don't feel comfortable in making such a call this close to feature freeze, hence this hacky approach to the problem. i.e. we need to review the QuayRegistry reconciliation logic before using it more frequently.
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 have been looking into this and, for example, every time the Reconcile loop of the QuayRegistry controller runs a new Secret is created (named registry-quay-config-secret-*
) and this secret is then mounted inside a pod causing a full blown redeploy (the old secret stays there, for whatever reason it is not deleted). I imagine how many other surprises we gonna find out if we decide to run this Reconcile loop frequently.
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 once commit message is fixed
* quay-operator: add resource requests and limits (PROJQUAY-2011) Signed-off-by: Daniel Messer <dmesser@redhat.com> * reconcile: Prevent unnecessary component enabling/disabling (PROJQUAY-2198) - Prevent HPA, Route, and Monitoring components from being enabled/disabled based on received config. - Block rollout on missing config fields * mirrorprobes: removing mirror pod probes (PROJQUAY-2226) (#485) Following feedback there is now ay of getting the health of the mirror component. This PR removes the checks, essentially rolling back a change made by #427. As soon as we have a proper way of checking for the mirror health we will need to re-enable these. * componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) (#484) Co-authored-by: dmesser <dmesser@redhat.com> Co-authored-by: Jonathan King <jonathankingfc@gmail.com>
Reporting faulty condition for component's objects. Each component faulty conditions are reported in a separate index inside the same status property.