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

Update API discovery cache even when incomplete #132

Conversation

JustinKuli
Copy link
Member

Previously, if there were any APIs having issues on the cluster, no new API information could be used by the controller. Now, partial results can still be updated. Additionally, API discovery errors during startup will not prevent the controller from functioning at all.

Refs:

@JustinKuli
Copy link
Member Author

I was considering reporting the controller as unhealthy if the API discovery was having an error, but I realized that restarting the container (which is what kubernetes will do when it's unhealthy) won't be likely to fix anything. It would be easy to add that in though, see https://github.com/JustinKuli/config-policy-controller-1/tree/5491-incomplete-server-apis.

Additionally, @mprahl suggested that we take a more similar approach to the API discovery as in the dependency-watches library: stolostron/kubernetes-dependency-watches#8. I think that is a good longer-term solution, but this controller shares the API information with the templates library, and I would rather have a smaller fix in sooner, rather than a bigger one in multiple places that could be tricky to coordinate.

@JustinKuli JustinKuli force-pushed the 5491-use-incomplete-api-info branch from dcf9ac4 to f1eae43 Compare May 17, 2023 14:53
@JustinKuli JustinKuli requested a review from mprahl May 18, 2023 14:07
Previously, if there were any APIs having issues on the cluster, no new
API information could be used by the controller. Now, partial results
can still be updated. Additionally, API discovery errors during startup
will not prevent the controller from functioning at all.

Refs:
 - https://issues.redhat.com/browse/ACM-5491

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
@JustinKuli JustinKuli force-pushed the 5491-use-incomplete-api-info branch from f1eae43 to da127d8 Compare May 18, 2023 16:56
@JustinKuli JustinKuli requested a review from mprahl May 18, 2023 16:57
@openshift-ci
Copy link

openshift-ci bot commented May 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, mprahl

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants