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

componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) #484

Merged
merged 1 commit into from
Aug 10, 2021
Merged

componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) #484

merged 1 commit into from
Aug 10, 2021

Conversation

ricardomaraschini
Copy link
Contributor

@ricardomaraschini ricardomaraschini commented Jul 6, 2021

Reporting faulty condition for component's objects. Each component faulty conditions are reported in a separate index inside the same status property.

@ricardomaraschini ricardomaraschini changed the title componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) WIP - componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) Jul 6, 2021
componentConditions:
description: Component Conditions shows the conditions in a per component basis
type: object
additionalProperties:
Copy link
Collaborator

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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(
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@ricardomaraschini ricardomaraschini changed the title WIP - componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) componentstatus: Reporting faulty condition for quay components (PROJQUAY-1609) Jul 9, 2021
jonathankingfc
jonathankingfc previously approved these changes Aug 2, 2021
Copy link
Collaborator

@jonathankingfc jonathankingfc left a 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

@ricardomaraschini ricardomaraschini merged commit 1ae4e3e into quay:master Aug 10, 2021
@ricardomaraschini ricardomaraschini deleted the component-statuses branch August 10, 2021 12:41
ricardomaraschini added a commit that referenced this pull request Aug 10, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants