diff --git a/api/v1alpha1/batchrelease_types.go b/api/v1alpha1/batchrelease_types.go index 0e02e695..d003de3f 100644 --- a/api/v1alpha1/batchrelease_types.go +++ b/api/v1alpha1/batchrelease_types.go @@ -75,10 +75,11 @@ type BatchReleaseTerminationPolicyType string const ( // RetainCompletionPolicyType will retain the current state of workload - // when the batch release is completed or terminated. + // when the batch release is terminated. RetainCompletionPolicyType BatchReleaseTerminationPolicyType = "Retain" // PromoteCompletionPolicyType will promote all pods of workload to the - // latest revision when the batch release is completed or terminated. + // update revision when the batch release is terminated via setting + // workload paused=false and partition=null. PromoteCompletionPolicyType BatchReleaseTerminationPolicyType = "Promote" ) diff --git a/pkg/controller/batchrelease/control/interface.go b/pkg/controller/batchrelease/control/interface.go index 99e91880..5f0a28a9 100644 --- a/pkg/controller/batchrelease/control/interface.go +++ b/pkg/controller/batchrelease/control/interface.go @@ -65,9 +65,6 @@ type Interface interface { // It might depend on if the rollout succeeded or not. // For example, we may remove the objects which created by batchRelease. // this function will always retry util it returns 'true'. - // parameters: - // - cleanup: 'true' means clean up canary resources, 'false' means do not clean up. - // - promote: 'true' means unpause workload and upgrade all pods, 'false' means do nothing. Finalize() (bool, error) // SyncWorkloadInformation will watch and compare the status recorded in Status of BatchRelease diff --git a/pkg/controller/batchrelease/control/partitionstyle/interface.go b/pkg/controller/batchrelease/control/partitionstyle/interface.go index 05152bfc..106a570d 100644 --- a/pkg/controller/batchrelease/control/partitionstyle/interface.go +++ b/pkg/controller/batchrelease/control/partitionstyle/interface.go @@ -8,9 +8,8 @@ import ( ) type Interface interface { - // BuildController will get workload object - // and parse workload info, and return a - // controller for workload + // BuildController will get workload object and parse workload info, + // and return a controller for workload BuildController() (Interface, error) // GetInfo return workload information GetInfo() *util.WorkloadInfo