-
Notifications
You must be signed in to change notification settings - Fork 148
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: add support for Workbenches component #1349
feat: add support for Workbenches component #1349
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature-operator-refactor #1349 +/- ##
============================================================
Coverage ? 27.15%
============================================================
Files ? 60
Lines ? 4806
Branches ? 0
============================================================
Hits ? 1305
Misses ? 3349
Partials ? 152 ☔ View full report in Codecov by Sentry. |
607327f
to
d54e3d0
Compare
// Go through each manifest and set the overlays if defined | ||
// first on odh-notebook-controller and kf-notebook-controller last to notebook-images | ||
if len(workbenches.Spec.DevFlags.Manifests) != 0 { | ||
for _, subcomponent := range workbenches.Spec.DevFlags.Manifests { |
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.
in this loop, you should amend the rr.Manifesst path, otherwhise the changes won't be taken into account, simlat to https://github.com/opendatahub-io/opendatahub-operator/blob/feature-operator-refactor/controllers/components/dashboard/dashboard_controller_actions.go#L49-L59
Scheme *runtime.Scheme | ||
} | ||
// NewComponentReconciler creates a ComponentReconciler for the Workbenches API. | ||
func NewComponentReconciler(ctx context.Context, mgr ctrl.Manager) error { |
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 seems there is the need to add additional actions to create namespace and update pod security role binding, see https://github.com/opendatahub-io/opendatahub-operator/blob/feature-operator-refactor/components/workbenches/workbenches.go#L127-L139
An example about how to add additional resources can be found https://github.com/opendatahub-io/opendatahub-operator/blob/feature-operator-refactor/controllers/components/modelregistry/modelregistry_controller_actions.go#L87-L138
An example about updating pod security can be found here https://github.com/opendatahub-io/opendatahub-operator/blob/feature-operator-refactor/controllers/components/dashboard/dashboard_controller_actions.go#L76-L106
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.
Thank you, the respective actions added
I assume the pod security role binding action will be affected by the change introduced in #1354 later
dd18cd7
to
5d35ed5
Compare
0a84741
to
286901d
Compare
286901d
to
ee4eece
Compare
ee4eece
to
b5756b1
Compare
b5756b1
to
126ccf4
Compare
126ccf4
to
fc803d9
Compare
/retest |
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
} | ||
NotebookControllerPath = filepath.Join(odhdeploy.DefaultManifestPath, "odh-notebook-controller/odh-notebook-controller", defaultKustomizePathNbc) | ||
|
||
rr.Manifests[i].Path = odhdeploy.DefaultManifestPath |
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.
The index here may cause an our of bound issues i.e. if there are 4 entries in the devFlags
array.
The order may also cause issues as i.e. if you have only 1 entry in the devFLags
, the you may override the wrong entry in the manifests.
True also for the same logic in the below conditions
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 had an incorrect assumption previously, it should be fixed now. Leaving this conversation open for now to check
fc803d9
to
7e96a8e
Compare
LGTM , @zdtsw can you have a look ? |
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
7e96a8e
to
bbefeb7
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.
in general i am fine with the changes
bbefeb7
to
7ea3737
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.
LGTM, couple of optional suggestions inline.
controllers/components/workbenches/workbenches_controller_actions.go
Outdated
Show resolved
Hide resolved
7ea3737
to
473d5a0
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.
need rebase and fix changed for workbench
473d5a0
to
a695aff
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.
LGTM
[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 |
a5756b9
into
opendatahub-io:feature-operator-refactor
Description
JIRA ref: RHOAIENG-13176
How Has This Been Tested?
Screenshot or short clip
Merge criteria