Skip to content

Commit

Permalink
chore: templatize provider in AuthorizationPolicy
Browse files Browse the repository at this point in the history
With the old value, opendatahub-odh-auth-provider, the value would be
set, then almost immediately be reset to the value of
{{.AuthExtensionName}} (which appears to be equivalent to
<dsci.ApplicationNamespace>-auth-provider), via the separate manifest
specified in the following file, which gets applied by the same list
of resources in the feature:

z-migrations/kserve-predictor-authorizationpolicy.patch.tmpl.yaml

This causes a complication when watching the AuthorizationPolicy,
because it causes it to continuously update, flip-flopping between the
two values.

It seems to make more sense to just set the value to the expected
value from the outset, so that's what this change attempts to do.
  • Loading branch information
grdryn committed Nov 24, 2024
1 parent e55754c commit 8aed8fe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion controllers/components/kserve/kserve_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ func defineServiceMeshFeatures(ctx context.Context, cli client.Client, dscispec
path.Join(Resources.ServiceMeshDir, "activator-envoyfilter.tmpl.yaml"),
path.Join(Resources.ServiceMeshDir, "envoy-oauth-temp-fix.tmpl.yaml"),
path.Join(Resources.ServiceMeshDir, "kserve-predictor-authorizationpolicy.tmpl.yaml"),
path.Join(Resources.ServiceMeshDir, "z-migrations"),
),
).
Managed().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
action: CUSTOM
provider:
name: opendatahub-odh-auth-provider
name: {{ .AuthExtensionName }}
rules:
- to:
- operation:
Expand Down

This file was deleted.

0 comments on commit 8aed8fe

Please sign in to comment.