-
Notifications
You must be signed in to change notification settings - Fork 20
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 retrieving OAuthClient Resource #165
Conversation
/retest |
@VaishnaviHire: 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. |
/retest |
@VaishnaviHire: The
The following commands are available to trigger optional jobs:
Use In response to this:
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. |
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
I confirm the oauthclient is removed after the dashboard KfDef is removed:
# OAuthClient exists
$ oc get oauthclient/dashboard-oauth-client
NAME SECRET WWW-CHALLENGE TOKEN-MAX-AGE REDIRECT URIS
dashboard-oauth-client es8XWimVObrTMwFJS6px0LOz8GNlHW32 false default https://rhods-dashboard-redhat-ods-applications.apps.samuvl.dev.datahub.redhat.com
# Delete KfDef
$ oc delete kfdef rhods-dashboard -n redhat-ods-applications
kfdef.kfdef.apps.kubeflow.org "rhods-dashboard" deleted
# OAuthClient is removed
$ oc get oauthclient/dashboard-oauth-client
Error from server (NotFound): oauthclients.oauth.openshift.io "dashboard-oauth-client" not found
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jooho, samuelvl, VaishnaviHire 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 |
* sync: from main to rhoai-2.6 (red-hat-data-services#163) * Add recording and alerting rules for TrustyAI Update SOP url, RHODS to RHOAI Fix trustyai-alerting.rules indentation * fix(kserve): check on multiple depends operators if all pre-installed (opendatahub-io#744) Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update: rewrite func to check operator (opendatahub-io#745) creds to: @bartoszmajsak Signed-off-by: Wen Zhou <wenzhou@redhat.com> * fix(cleanup): cleans up dependant resources (opendatahub-io#748) * feat: implements failing test for deletion using configmap * fix(cleanup): cleans up dependant resources The code responsible for cleaning up resources on cfg map presence was failing early due to operations on nil list instance of KfDef resources, leading to panic and restart of the pod making an impression that cleanup takes forever * fix(reconcile): requeue only when actual error happens Original code was always causing requeue as even if upgrade.OperatorUninstall(r.Client, r.RestConfig) resulted in nil error (success), it was wrapped in error with message error while operator uninstall: <nil> * fix: reverts img placeholder in kustomize * fix: removes commented out code * fix(features): makes rest config loader more flexible (opendatahub-io#760) * add table of contents to readme (opendatahub-io#769) * Makefile: add clean target (opendatahub-io#733) Add `make clean` which removes build artefacts. At the moment it's ./bin, ./odh-manifests/* and cover.out from test target. Do not remove odh-manifests directory since it is commited to VCS. In the recipe chown of $(LOCALBIN) since setup-envtest makes its dir RO for some reason [1]. Related: opendatahub-io#696 [1] https://github.com/kubernetes-sigs/controller-runtime/blob/main/tools/setup-envtest/store/store.go#L191 Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> * chore: cleanup owns on RS,Pod, daemonset, CRD (opendatahub-io#777) * chore: cleanup owns on RS,Pod, daemonset, CRD * cleanup: remove developmentconfig not in use * chore: move rbac into one file and remove duplicated one --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update(kserve): add monitoring logic (opendatahub-io#782) Signed-off-by: Wen Zhou <wenzhou@redhat.com> * chore(mesh): Use third party service account tokens (opendatahub-io#767) This should allow Service Mesh to run on any OpenShift flavor. Fixes opendatahub-io/kserve#138 Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com> * chore: change log info for monitoring patch namespace (opendatahub-io#787) Signed-off-by: Wen Zhou <wenzhou@redhat.com> * fix devflags empty object (opendatahub-io#659) - change DefFlags to pointer type , see reason from example: https://www.sohamkamani.com/golang/omitempty/ - change both in DSC and DSCI * feature: add support for unmanaged and remove for servicemesh and serverless (opendatahub-io#781) * feature: add support for unmanaged and remove for servicemesh and serverless Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Update components/kserve/kserve.go Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> * fix(nilpointer): when more than one DSCI CR in cluster (opendatahub-io#756) * fix(nilpointer): when more than one DSCI CR in cluster - use the one with ealiest timestamp as the default one - suggest user to delete other CR but only use default one - only set the extra/wrong DSCI in Error status Signed-off-by: Wen Zhou <wenzhou@redhat.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> * chore: change label name (opendatahub-io#790) - use a more generaic label than bind to namespace name Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Remove lavlas from OWNERS (opendatahub-io#791) * fix(builder): initializes rest config before invoking any partial builder (opendatahub-io#792) This way we can obtain interact with the cluster from partial builders instead of defering it to Apply phase. * chore: shifts FeatureTracker creation to Feature's Apply phase (opendatahub-io#795) * fix(mesh): disables default network policy management (opendatahub-io#798) * fix: disables default network policy management * fix: returns correct error Co-authored-by: Wen Zhou <wenzhou@redhat.com> --------- Co-authored-by: Wen Zhou <wenzhou@redhat.com> * feat(linters): Enable all linters by default. (opendatahub-io#692) --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com> Co-authored-by: Rui Vieira <ruidevieira@googlemail.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com> Co-authored-by: Yauheni Kaliuta <ykaliuta@redhat.com> Co-authored-by: Edgar Hernández <ehernand@redhat.com> Co-authored-by: Landon LaSmith <2432396+LaVLaS@users.noreply.github.com> * update: rebranding for rhoai from rhods (red-hat-data-services#160) * update: rebranding for rhoai from rhods Signed-off-by: Wen Zhou <wenzhou@redhat.com> * Update: new icon data and link to dashboard icon Signed-off-by: Wen Zhou <wenzhou@redhat.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> * fix: couple of changes (red-hat-data-services#164) * fix: couple of changes - change from 2.5 missing on 2.6 - version/branch from components - generated bundle with rbac - linter Signed-off-by: Wen Zhou <wenzhou@redhat.com> * [cherry-pick]: odh opendatahub-io#809 Signed-off-by: Wen Zhou <wenzhou@redhat.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> * update(trustyai): set component by default as Managed as GA in 2.6 Signed-off-by: Wen Zhou <wenzhou@redhat.com> --------- Signed-off-by: Wen Zhou <wenzhou@redhat.com> Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com> Signed-off-by: Edgar Hernández <23639005+israel-hdez@users.noreply.github.com> Co-authored-by: Rui Vieira <ruidevieira@googlemail.com> Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com> Co-authored-by: Ajay Jaganathan <36824134+AjayJagan@users.noreply.github.com> Co-authored-by: Yauheni Kaliuta <ykaliuta@redhat.com> Co-authored-by: Edgar Hernández <ehernand@redhat.com> Co-authored-by: Landon LaSmith <2432396+LaVLaS@users.noreply.github.com>
This PR fixes the OAuthClient deletion issue. Note that this only happens in downstream Operator
Root Cause
Get
calls forClusterScoped
resources, if only limited namespaces are being watched by the controller. (Multi Namespace Cache doesn't support Get for cluster scoped resources kubernetes-sigs/controller-runtime#934)Fix
Get
calls for OAuthClient toList
Testing Steps
This can be tested without Uninstallation as follows -
rhods-dashboard
KfDef. Thedashboard-oauth-client
resource should be updated with latest secret.Merge criteria:
[UPSTREAM]
has been prepended to the commit message.