@@ -43,6 +43,7 @@ import (
4343 "github.com/openkruise/rollouts/pkg/controller/batchrelease/control/partitionstyle/cloneset"
4444 "github.com/openkruise/rollouts/pkg/controller/batchrelease/control/partitionstyle/daemonset"
4545 partitiondeployment "github.com/openkruise/rollouts/pkg/controller/batchrelease/control/partitionstyle/deployment"
46+ "github.com/openkruise/rollouts/pkg/controller/batchrelease/control/partitionstyle/nativedaemonset"
4647 "github.com/openkruise/rollouts/pkg/controller/batchrelease/control/partitionstyle/statefulset"
4748 "github.com/openkruise/rollouts/pkg/util"
4849 "github.com/openkruise/rollouts/pkg/util/errors"
@@ -230,14 +231,18 @@ func (r *Executor) getReleaseController(release *v1beta1.BatchRelease, newStatus
230231 fallthrough
231232
232233 case v1beta1 .PartitionRollingStyle , "" :
233- if targetRef .APIVersion == appsv1alpha1 .GroupVersion .String () && targetRef .Kind == reflect .TypeOf (appsv1alpha1.CloneSet {}).Name () {
234- klog .InfoS ("Using CloneSet partition-style release controller for this batch release" , "workload name" , targetKey .Name , "namespace" , targetKey .Namespace )
235- return partitionstyle .NewControlPlane (cloneset .NewController , r .client , r .recorder , release , newStatus , targetKey , gvk ), nil
236- }
237234 if targetRef .APIVersion == appsv1alpha1 .GroupVersion .String () && targetRef .Kind == reflect .TypeOf (appsv1alpha1.DaemonSet {}).Name () {
238235 klog .InfoS ("Using DaemonSet partition-style release controller for this batch release" , "workload name" , targetKey .Name , "namespace" , targetKey .Namespace )
239236 return partitionstyle .NewControlPlane (daemonset .NewController , r .client , r .recorder , release , newStatus , targetKey , gvk ), nil
240237 }
238+ if targetRef .APIVersion == apps .SchemeGroupVersion .String () && targetRef .Kind == reflect .TypeOf (apps.DaemonSet {}).Name () {
239+ klog .InfoS ("Using Native DaemonSet partition-style release controller for this batch release" , "workload name" , targetKey .Name , "namespace" , targetKey .Namespace )
240+ return partitionstyle .NewControlPlane (nativedaemonset .NewController , r .client , r .recorder , release , newStatus , targetKey , gvk ), nil
241+ }
242+ if targetRef .APIVersion == appsv1alpha1 .GroupVersion .String () && targetRef .Kind == reflect .TypeOf (appsv1alpha1.CloneSet {}).Name () {
243+ klog .InfoS ("Using CloneSet partition-style release controller for this batch release" , "workload name" , targetKey .Name , "namespace" , targetKey .Namespace )
244+ return partitionstyle .NewControlPlane (cloneset .NewController , r .client , r .recorder , release , newStatus , targetKey , gvk ), nil
245+ }
241246 if targetRef .APIVersion == apps .SchemeGroupVersion .String () && targetRef .Kind == reflect .TypeOf (apps.Deployment {}).Name () {
242247 klog .InfoS ("Using Deployment partition-style release controller for this batch release" , "workload name" , targetKey .Name , "namespace" , targetKey .Namespace )
243248 return partitionstyle .NewControlPlane (partitiondeployment .NewController , r .client , r .recorder , release , newStatus , targetKey , gvk ), nil
0 commit comments