Skip to content
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

update: remove cache for deployment in model reg namespace #1270

Open
wants to merge 3 commits into
base: incubation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/modelregistry/modelregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ var (
ComponentName = "model-registry-operator"
DefaultModelRegistriesNamespace = "odh-model-registries"
Path = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/odh"
// we should not apply this label to the namespace, as it triggered namspace deletion during operator uninstall
// modelRegistryLabels = cluster.WithLabels(
// labels.ODH.OwnedNamespace, "true",
// ).
)

// Verifies that ModelRegistry implements ComponentInterface.
Expand Down Expand Up @@ -127,6 +123,10 @@ func (m *ModelRegistry) ReconcileComponent(ctx context.Context, cli client.Clien
}

// Create model registries namespace
// we should not apply this label to the namespace, as it triggered namspace deletion during operator uninstall
// modelRegistryLabels = cluster.WithLabels(
zdtsw marked this conversation as resolved.
Show resolved Hide resolved
// labels.ODH.OwnedNamespace, "true",
// ).
// We do not delete this namespace even when ModelRegistry is Removed or when operator is uninstalled.
ns, err := cluster.CreateNamespace(ctx, cli, m.RegistriesNamespace)
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import (
dscv1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/datasciencecluster/v1"
dsciv1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/dscinitialization/v1"
featurev1 "github.com/opendatahub-io/opendatahub-operator/v2/apis/features/v1"
"github.com/opendatahub-io/opendatahub-operator/v2/components/modelregistry"
"github.com/opendatahub-io/opendatahub-operator/v2/controllers/certconfigmapgenerator"
dscctrl "github.com/opendatahub-io/opendatahub-operator/v2/controllers/datasciencecluster"
dscictrl "github.com/opendatahub-io/opendatahub-operator/v2/controllers/dscinitialization"
Expand Down Expand Up @@ -384,7 +383,5 @@ func createDeploymentCacheConfig(platform cluster.Platform) map[string]cache.Con
default:
namespaceConfigs["opendatahub"] = cache.Config{}
}
// for modelregistry namespace
namespaceConfigs[modelregistry.DefaultModelRegistriesNamespace] = cache.Config{}
return namespaceConfigs
}
Loading