Skip to content

Commit

Permalink
revert: back out annotation for application namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Zhou <[email protected]>
  • Loading branch information
zdtsw committed Aug 22, 2024
1 parent 3bf06f8 commit 8a647de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ var configMapPredicates = predicate.Funcs{
}
// Do not reconcile on kserver's inferenceservice-config CM updates, for rawdeployment
namespace := e.ObjectNew.GetNamespace()
if e.ObjectNew.GetName() == "inferenceservice-config" && (namespace == cluster.RHOAIApplicationNamespace || namespace == cluster.ODHApplicationNamespace) {
if e.ObjectNew.GetName() == "inferenceservice-config" && (namespace == "redhat-ods-applications" || namespace == "opendatahub") {

Check failure on line 371 in controllers/datasciencecluster/datasciencecluster_controller.go

View workflow job for this annotation

GitHub Actions / golangci-lint

string `redhat-ods-applications` has 3 occurrences, make it a constant (goconst)
return false
}
return true
Expand All @@ -379,7 +379,7 @@ var configMapPredicates = predicate.Funcs{
var componentDeploymentPredicates = predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
namespace := e.ObjectNew.GetNamespace()
if namespace == cluster.ODHApplicationNamespace || namespace == cluster.RHOAIApplicationNamespace {
if namespace == "opendatahub" || namespace == "redhat-ods-applications" {
oldManaged, oldExists := e.ObjectOld.GetAnnotations()[annotations.ManagedByODHOperator]
newManaged := e.ObjectNew.GetAnnotations()[annotations.ManagedByODHOperator]
// only reoncile if annotation from "not exist" to "set to true", or from "non-true" value to "true"
Expand All @@ -396,7 +396,7 @@ var componentDeploymentPredicates = predicate.Funcs{
var saPredicates = predicate.Funcs{
UpdateFunc: func(e event.UpdateEvent) bool {
namespace := e.ObjectNew.GetNamespace()
if e.ObjectNew.GetName() == "odh-model-controller" && (namespace == cluster.RHOAIApplicationNamespace || namespace == cluster.ODHApplicationNamespace) {
if e.ObjectNew.GetName() == "odh-model-controller" && (namespace == "redhat-ods-applications" || namespace == "opendatahub") {
return false
}
return true
Expand Down
2 changes: 1 addition & 1 deletion pkg/upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func CleanupExistingResource(ctx context.Context, cli client.Client, platform cl
multiErr = multierror.Append(multiErr, deleteDeprecatedServiceMonitors(ctx, cli, dscMonitoringNamespace, deprecatedOperatorSM))

// Remove deprecated opendatahub namespace(previously owned by kuberay and Kueue)
multiErr = multierror.Append(multiErr, deleteDeprecatedNamespace(ctx, cli, cluster.ODHApplicationNamespace))
multiErr = multierror.Append(multiErr, deleteDeprecatedNamespace(ctx, cli, "opendatahub"))

// Handling for dashboard OdhApplication Jupyterhub CR, see jira #443
multiErr = multierror.Append(multiErr, removOdhApplicationsCR(ctx, cli, gvk.OdhApplication, "jupyterhub", dscApplicationsNamespace))
Expand Down

0 comments on commit 8a647de

Please sign in to comment.