Skip to content

Commit

Permalink
Removed Notebook ServiceAccount from default RoleBinding granting any…
Browse files Browse the repository at this point in the history
…uid SCC.
  • Loading branch information
ugiordan committed Dec 18, 2024
1 parent 4d1f0d5 commit 7af1f90
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions controllers/components/workbenches/workbenches_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/actions/deploy"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/actions/gc"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/actions/render/kustomize"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/actions/security"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/actions/updatestatus"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/handlers"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/predicates/component"
Expand Down Expand Up @@ -62,7 +61,6 @@ func (s *componentHandler) NewComponentReconciler(ctx context.Context, mgr ctrl.
WithAction(initialize).
WithAction(devFlags).
WithAction(configureDependencies).
WithAction(security.NewUpdatePodSecurityRoleBindingAction(serviceAccounts)).
WithAction(kustomize.NewAction(
kustomize.WithCache(),
kustomize.WithLabel(labels.ODH.Component(LegacyComponentName), labels.True),
Expand Down
10 changes: 0 additions & 10 deletions controllers/components/workbenches/workbenches_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"path"

componentApi "github.com/opendatahub-io/opendatahub-operator/v2/apis/components/v1alpha1"
"github.com/opendatahub-io/opendatahub-operator/v2/pkg/cluster"
odhtypes "github.com/opendatahub-io/opendatahub-operator/v2/pkg/controller/types"
odhdeploy "github.com/opendatahub-io/opendatahub-operator/v2/pkg/deploy"
)
Expand All @@ -21,8 +20,6 @@ const (
kfNotebookControllerPath = "kf-notebook-controller"
kfNotebookControllerManifestSourcePath = "overlays/openshift"

nbcServiceAccountName = "notebook-controller-service-account"

// LegacyComponentName is the name of the component that is assigned to deployments
// via Kustomize. Since a deployment selector is immutable, we can't upgrade existing
// deployment to the new component name, so keep it around till we figure out a solution.
Expand All @@ -33,13 +30,6 @@ var (
notebookControllerContextDir = path.Join(ComponentName, notebookControllerPath)
kfNotebookControllerContextDir = path.Join(ComponentName, kfNotebookControllerPath)
notebookContextDir = path.Join(ComponentName, notebooksPath)

serviceAccounts = map[cluster.Platform][]string{
cluster.SelfManagedRhoai: {nbcServiceAccountName},
cluster.ManagedRhoai: {nbcServiceAccountName},
cluster.OpenDataHub: {nbcServiceAccountName},
cluster.Unknown: {nbcServiceAccountName},
}
)

// manifests for nbc in ODH and RHOAI + downstream use it for imageparams.
Expand Down

0 comments on commit 7af1f90

Please sign in to comment.