-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add component reconciliation pipeline framework #1320
Add component reconciliation pipeline framework #1320
Conversation
Signed-off-by: Luca Burgazzoli <lburgazzoli@gmail.com>
/test opendatahub-operator-e2e |
1 similar comment
/test opendatahub-operator-e2e |
May be we do not need e2e mandatory for the branch? |
I'd like to get this one successfully running as in one of the run, the error was quite strange and I'd like to be sure we are not ignoring anything relevant. Not it seems there are some issues setting up the environment |
/test opendatahub-operator-e2e |
4 similar comments
/test opendatahub-operator-e2e |
/test opendatahub-operator-e2e |
/test opendatahub-operator-e2e |
/test opendatahub-operator-e2e |
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 haven't gotten completely through this yet, but leaving some questions to try to round out my own understanding 🙂
func updatePodSecurityRolebinding(ctx context.Context, rr *odhtypes.ReconciliationRequest) error { | ||
switch rr.Release.Name { | ||
case cluster.SelfManagedRhods, cluster.ManagedRhods: | ||
if err := cluster.UpdatePodSecurityRolebinding(ctx, rr.Client, rr.DSCI.Spec.ApplicationsNamespace, "rhods-dashboard"); err != nil { |
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 see the string "rhods-dashboard" is defined as a constant, ComponentNameDownstream
, in dashboard_support.go
. Shoudl that constant be used here rather than the hardcoded value?
I don't see "odh-dashboard" (for the default case on L100) being specified in the same way, so maybe even though it's the same string here, it's a different meaning?
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.
Yep I think it has a different meaning, but that predates this PR so I'll defer to @VaishnaviHire or @zdtsw to add additional context
/test opendatahub-operator-e2e |
1 similar comment
/test opendatahub-operator-e2e |
case resources.GetAnnotation(&obj, annotations.ManagedByODHOperator) == "false": | ||
// remove the opendatahub.io/managed as it should not be set | ||
// to the actual object in this case | ||
resources.RemoveAnnotation(&obj, annotations.ManagedByODHOperator) |
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.
not sure i understand this:
if the resource exist in the cluster, and with annoation to false, we dont touch it
if the resource does not exist, (like we just enable component) and component team mark the annoation in manifests with annotation to false, we remove that annoation then create it? then next time run into "run" it will for intl the first swtich...case ?
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 is the same for each reconciliation. the annotation is removed as the behavior is controller by the component developers, not the user so I didn't want it to be set on the cluster. But is something we can talk about since that annotation is for the moment only an internal annotation (i.e. it is added to the OdhDashboardConfig
)
/test opendatahub-operator-e2e |
0f5a430
to
b1bb237
Compare
b1bb237
to
65c0496
Compare
@zdtsw @VaishnaviHire @ykaliuta e2e are green, I guess we are ok to merge ? |
yes for me |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
7d4613c
into
opendatahub-io:feature-operator-refactor
Description
This PR introduces a new component reconciliation pipeline framework and a set of reusable action that can be composed according to the need of a specific component. This PR is the result of the work related to RHOAIENG-14676
The main entry point is the
ComponentReconcilerBuilder
:Actions currently provided out of the box are provided by the packages in
github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/actions
:How Has This Been Tested?
Screenshot or short clip
Merge criteria
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