Skip to content

Commit

Permalink
review comments incorporated
Browse files Browse the repository at this point in the history
  • Loading branch information
abodhekar committed Nov 2, 2023
1 parent 3e11c33 commit 7ad72f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions controllers/databaseclaim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ const (
// https://github.com/kubernetes-sigs/controller-runtime/blob/main/TMP-LOGGING.md
DebugLevel = 1

operationalStatusTagKey string = "OPERATIONAL_STATUS"
operationalStatusInactiveValue string = "INACTIVE"
operationalStatusTagKey string = "operational-status"
operationalStatusInactiveValue string = "inactive"
)

type ModeEnum int
Expand Down Expand Up @@ -157,6 +157,10 @@ func (r *DatabaseClaimReconciler) getMode(dbClaim *persistancev1.DatabaseClaim)
}
}

if dbClaim.Status.OldDB.DbState == persistancev1.PostMigrationInProgress && dbClaim.Status.ActiveDB.DbState == persistancev1.Ready {
return M_PostMigrationInProgress
}

if r.Input.SharedDBHost {
if dbClaim.Status.ActiveDB.DbState == persistancev1.UsingSharedHost {
activeHostParams := hostparams.GetActiveHostParams(dbClaim)
Expand Down Expand Up @@ -231,8 +235,6 @@ func (r *DatabaseClaimReconciler) getMode(dbClaim *persistancev1.DatabaseClaim)
return M_UpgradeDBInProgress

}
} else if dbClaim.Status.OldDB.DbState == persistancev1.PostMigrationInProgress {
return M_PostMigrationInProgress
}
}

Expand Down

0 comments on commit 7ad72f6

Please sign in to comment.