-
Notifications
You must be signed in to change notification settings - Fork 763
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
Check API registration if API is not available #1482
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anandf
force-pushed
the
fix_route_api_1.12
branch
from
August 1, 2024 04:50
ffa7d27
to
539c108
Compare
svghadi
reviewed
Aug 1, 2024
svghadi
approved these changes
Aug 1, 2024
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. Thanks.
anandf
force-pushed
the
fix_route_api_1.12
branch
from
August 6, 2024 03:57
dd73e03
to
159abba
Compare
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
anandf
force-pushed
the
fix_route_api_1.12
branch
from
August 7, 2024 12:32
8b21a3c
to
993dbf1
Compare
svghadi
approved these changes
Aug 8, 2024
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.
Looks good. Thanks.
anandf
added a commit
to anandf/argocd-operator
that referenced
this pull request
Aug 16, 2024
* Fix for checking route api availability for getting the server URL Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added check for api registration, if its not available Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added another option to check API registration directly Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added more logs and removed commented code Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Updated the condition to check only route enabled Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added permission to get and list apiservices for argocd controller Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added rbac role to manifests Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Fix for adding rbac policies for api registration service Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> --------- Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
This was referenced Aug 16, 2024
anandf
added a commit
that referenced
this pull request
Aug 19, 2024
* Check API registration if API is not available (#1482) * Fix for checking route api availability for getting the server URL Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added check for api registration, if its not available Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added another option to check API registration directly Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added more logs and removed commented code Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Updated the condition to check only route enabled Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added permission to get and list apiservices for argocd controller Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Added rbac role to manifests Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Fix for adding rbac policies for api registration service Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> --------- Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> * Updated argocd operator version Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com> --------- Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
What does this PR do / why we need it:
When there is an issue with the API server pods, or the API server pods are just coming up after a restart, the current check for API availability done with a discovery client will fail. This makes the operator code to assume that the server does not support the Route API. To fix this, whenever the API availability check fails, the operator checks if the API is registered. If registered, then the operator assumes that the Route API is supported in the cluster and would eventually become available.
Have you updated the necessary documentation?
NA
Which issue(s) this PR fixes:
Fixes https://issues.redhat.com/browse/GITOPS-4358
How to test changes / Special notes to the reviewer:
Steps to reproduce the problem in OCP cluster.
gitops-operator
pod