-
Notifications
You must be signed in to change notification settings - Fork 143
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
feat: initial move of kserve to new structure #1347
base: feature-operator-refactor
Are you sure you want to change the base?
feat: initial move of kserve to new structure #1347
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2f4dd28
to
381f775
Compare
381f775
to
bddf178
Compare
bundle/manifests/opendatahub-operator.clusterserviceversion.yaml
Outdated
Show resolved
Hide resolved
bddf178
to
d8bdb45
Compare
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.
Self-review to highlight some new things, and questions
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature-operator-refactor #1347 +/- ##
============================================================
Coverage ? 26.84%
============================================================
Files ? 60
Lines ? 4783
Branches ? 0
============================================================
Hits ? 1284
Misses ? 3350
Partials ? 149 ☔ View full report in Codecov by Sentry. |
d8bdb45
to
516aca7
Compare
516aca7
to
217ca78
Compare
94f4211
to
ac19c0e
Compare
/retest |
df27878
to
270d2f0
Compare
270d2f0
to
6fbbbef
Compare
6fbbbef
to
4657ae6
Compare
|
||
// clusterRoleAggregationRulePredicate is a watch predicate that can be used with | ||
// ClusterRoles to ignore the rules field on update if aggregationRule is set. | ||
var clusterRoleAggregationRulePredicate = predicate.Funcs{ |
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.
i am not sure i understand this part: in which example case, this should be return false as not trigger reconcile?
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.
I've changed it now to reflect what Luca suggested (and also I've moved it to pkg/controller/predicates/clusterrole/clusterrole.go
), so it might make more sense now?
If not: essentially, if aggregationRule is set, then even though the resource we apply has an empty ruleset, k8s will populate it with the rules from the other ClusterRoles that are selected by the aggregationRule section. If we reconcile back to an empty rule set, then it will just be flip-flopping continuously between empty and aggregated, so this predicate will return false when aggregateRule
is set AND the change is only to the rules
, since the rules
are more managed by k8s rather than the operator.
Does that make sense?
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.
It does make sense to me.
As a follow up improvement, we can try to remove the rules
field before the resource gets applied in case it is an aggregation and the rules is empty. But it requires some small experiments and does not need to be done in this pr.
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.
so in short, this predicate is to return false:
if old .spec.aggregationRule
block and the new .spec.aggregationRule
block are the same.
(regardless, old has .spec.rules or new has .spec.rules or if both's .spec.rules are the same/or not) ?
but, why this did not happen on "incubation"? the old modelMeshRolePredicates does not catch kserve-admin
which is the only one uses aggregationRule
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.
but, why this did not happen on "incubation"
I think this depends on the SSA vs Merge Patch semantic so it may have happened that the object were left untouched.
4657ae6
to
bd53568
Compare
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.
bd53568
to
8aed8fe
Compare
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.
@lburgazzoli @zdtsw thanks for your reviews & feedback! I think I've addressed everything so far, but I'm calling out a couple of additional things here that have changed since last time, to make sure you see them. Thanks!
I don't currently plan on making any more changes to this pull request, unless there are more requests to change things by reviewers. There's one open discussion at #1347 (comment), which could be considered non-blocking for merge IMHO (it's not a breaking bug, and any fix could be done async in a follow-up PR). |
LGDM, @zdtsw ? |
Description
This change moves responsibility of reconciling KServe to the kserve controller, which reacts to a Kserve CR.
JIRA: https://issues.redhat.com/browse/RHOAIENG-13179
How Has This Been Tested?
Screenshot or short clip
Merge criteria