cherry-pick(#1136) fix revision enable workload check and prevent GC if replica>0 (#1141)

* fix revision enable workload check and prevent GC if replica>0

* fix ci and vet
This commit is contained in:
Jianbo Sun
2021-03-05 10:52:48 +08:00
committed by GitHub
parent d938b9ee9e
commit 198c836849
5 changed files with 412 additions and 9 deletions

View File

@@ -173,10 +173,10 @@ func main() {
case "", "false", string(oamcontroller.ApplyOnceOnlyOff):
controllerArgs.ApplyMode = oamcontroller.ApplyOnceOnlyOff
setupLog.Info("ApplyOnceOnly is disabled")
case "true", oamcontroller.ApplyOnceOnlyOn:
case "true", string(oamcontroller.ApplyOnceOnlyOn):
controllerArgs.ApplyMode = oamcontroller.ApplyOnceOnlyOn
setupLog.Info("ApplyOnceOnly is enabled, that means workload or trait only apply once if no spec change even they are changed by others")
case oamcontroller.ApplyOnceOnlyForce:
case string(oamcontroller.ApplyOnceOnlyForce):
controllerArgs.ApplyMode = oamcontroller.ApplyOnceOnlyForce
setupLog.Info("ApplyOnceOnlyForce is enabled, that means workload or trait only apply once if no spec change even they are changed or deleted by others")
default: