Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanks committed Feb 7, 2025
1 parent 54d8ba7 commit 996a2b5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions controllers/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,11 @@ func newUpgradeJobSpec(master *v1alpha1.CDAPMaster, name string, labels map[stri
s.CConf = cconf
s.HConf = hconf

// if val, exists := master.Spec.Config[confSkipPreUpgradeFlag]; exists {
// s.SkipPreUpgradeFlag = (val == "true")
// } else {
s.SkipPreUpgradeFlag = false
// }
if val, exists := master.Spec.Config[confSkipPreUpgradeFlag]; exists {
s.SkipPreUpgradeFlag = (val == "true")
} else {
s.SkipPreUpgradeFlag = false
}
s.SkipPreUpgrade = false

return s
Expand All @@ -619,9 +619,12 @@ func (s *VersionUpgradeJobSpec) SetPostUpgrade(isPostUpgrade bool) *VersionUpgra

func (s *VersionUpgradeJobSpec) SetSkipPreUpgrade(isPatchUpgrade bool) *VersionUpgradeJobSpec {
// If it is a patch revision and the flag is true, skip the pre upgrade job
fmt.Println("SkipPreUpgradeFlag:")
fmt.Println(s.SkipPreUpgradeFlag)
s.SkipPreUpgrade = isPatchUpgrade && s.SkipPreUpgradeFlag
fmt.Println("LOGS:")
fmt.Println("isPatchUpgrade:")
fmt.Println(isPatchUpgrade)
fmt.Println("SkipPreUpgradeFlag:")
fmt.Println(s.SkipPreUpgradeFlag)
return s
}

0 comments on commit 996a2b5

Please sign in to comment.