opendatahub-io / opendatahub-operator

Open Data Hub operator to manage ODH component integrations
https://opendatahub.io
Apache License 2.0
60 stars 139 forks source link

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

Closed bartoszmajsak closed 3 months ago

bartoszmajsak commented 3 months ago

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?

Screenshot or short clip

Merge criteria

openshift-ci[bot] commented 3 months ago

[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: - ~~[OWNERS](https://github.com/opendatahub-io/opendatahub-operator/blob/incubation/OWNERS)~~ [zdtsw] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
zdtsw commented 3 months ago

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