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

fix: authz patch injection feature precondition uses correct namespace value #1135

Merged

Conversation

bartoszmajsak
Copy link
Contributor

@bartoszmajsak bartoszmajsak commented Jul 23, 2024

Description

If the authorization provider namespace is not specified in the DSCI the default is constructed to be application-namespace-auth-provider, e.g. opendatahub-auth-provider.

With the #1052 refactoring, the regression has been introduced where the value is directly read from the spec instead of being dynamically constructed based on the rule described above.

This is manifested with the following error, as the feature mistakenly waits for pods across all namespaces (because of list option for namespace being corev1.NamespaceAll == ""). This obviously rarely is true, especially for large clusters.

Failed applying [enable-proxy-injection-in-authorino-deployment]: 1 error occurred:
* client rate limiter Wait returned an error: context deadline exceeded

leading to failure of reconciling this feature.

The fix is to read the namespace from FeatureData instead, where the defaulting logic is defined.

Fixes https://issues.redhat.com/browse/RHOAIENG-10268

How Has This Been Tested?

  • create DSCI with service mesh enabled
  • see all features applied correctly instead of erroring

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

If the authorization provider namespace is not specified in the DSCI the
default is constructed to be `application-namespace-auth-provider`, e.g.
`opendatahub-auth-provider`.

With the opendatahub-io#1052 refactoring, the regression has been introduced where the value is
directly read from the spec instead of being dynamically constructed
based on the rule described above.

This is manifested with the following error, as the feature mistakenly
waits for pods across all namespaces (because of list option for
namespace being `corev1.NamespaceAll == ""`). This obviously rarely is
true, especially for large clusters.

```json
Failed applying [enable-proxy-injection-in-authorino-deployment]: 1 error occurred:
* client rate limiter Wait returned an error: context deadline exceeded
```

leading to failure of reconciling this feature.

The fix is to read the namespace from `FeatureData` instead, where the defaulting
logic is defined.

Fixes https://issues.redhat.com/browse/RHOAIENG-10268
@bartoszmajsak bartoszmajsak requested a review from zdtsw July 23, 2024 16:21
@openshift-ci openshift-ci bot requested review from jackdelahunt and LaVLaS July 23, 2024 16:21
@zdtsw zdtsw requested review from VaishnaviHire and removed request for LaVLaS and jackdelahunt July 23, 2024 16:22
Copy link

openshift-ci bot commented Jul 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

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

@zdtsw
Copy link
Member

zdtsw commented Jul 23, 2024

test with local build quay.io/wenzhou/opendatahub-operator-catalog:v2.7.23

@openshift-merge-bot openshift-merge-bot bot merged commit 7034768 into opendatahub-io:incubation Jul 23, 2024
8 checks passed
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jul 24, 2024
…e value (opendatahub-io#1135)

* fix: fixes authz patch injection feature precondition

If the authorization provider namespace is not specified in the DSCI the
default is constructed to be `application-namespace-auth-provider`, e.g.
`opendatahub-auth-provider`.

With the opendatahub-io#1052 refactoring, the regression has been introduced where the value is
directly read from the spec instead of being dynamically constructed
based on the rule described above.

This is manifested with the following error, as the feature mistakenly
waits for pods across all namespaces (because of list option for
namespace being `corev1.NamespaceAll == ""`). This obviously rarely is
true, especially for large clusters.

```json
Failed applying [enable-proxy-injection-in-authorino-deployment]: 1 error occurred:
* client rate limiter Wait returned an error: context deadline exceeded
```

leading to failure of reconciling this feature.

The fix is to read the namespace from `FeatureData` instead, where the defaulting
logic is defined.

Fixes https://issues.redhat.com/browse/RHOAIENG-10268

* Update controllers/dscinitialization/servicemesh_setup.go

Co-authored-by: Wen Zhou <[email protected]>

---------

Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit 7034768)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jul 24, 2024
…e value (opendatahub-io#1135)

* fix: fixes authz patch injection feature precondition

If the authorization provider namespace is not specified in the DSCI the
default is constructed to be `application-namespace-auth-provider`, e.g.
`opendatahub-auth-provider`.

With the opendatahub-io#1052 refactoring, the regression has been introduced where the value is
directly read from the spec instead of being dynamically constructed
based on the rule described above.

This is manifested with the following error, as the feature mistakenly
waits for pods across all namespaces (because of list option for
namespace being `corev1.NamespaceAll == ""`). This obviously rarely is
true, especially for large clusters.

```json
Failed applying [enable-proxy-injection-in-authorino-deployment]: 1 error occurred:
* client rate limiter Wait returned an error: context deadline exceeded
```

leading to failure of reconciling this feature.

The fix is to read the namespace from `FeatureData` instead, where the defaulting
logic is defined.

Fixes https://issues.redhat.com/browse/RHOAIENG-10268

* Update controllers/dscinitialization/servicemesh_setup.go

Co-authored-by: Wen Zhou <[email protected]>

---------

Co-authored-by: Wen Zhou <[email protected]>
(cherry picked from commit 7034768)
MarianMacik pushed a commit to MarianMacik/opendatahub-operator that referenced this pull request Jan 22, 2025
…flux/component-updates/odh-dashboard-v2-17

chore(deps): update odh-dashboard-v2-17 to 0ea1a6d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants