File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
deployments/sgx_plugin/base Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 88 selector :
99 matchLabels :
1010 app : intel-sgx-plugin
11+ updateStrategy :
12+ type : RollingUpdate
13+ rollingUpdate :
14+ maxSurge : 0
15+ maxUnavailable : 1
1116 template :
1217 metadata :
1318 labels :
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323 v1 "k8s.io/api/core/v1"
2424 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525 "k8s.io/apimachinery/pkg/util/diff"
26+ "k8s.io/apimachinery/pkg/util/intstr"
2627 "sigs.k8s.io/controller-runtime/pkg/client"
2728
2829 devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
@@ -38,6 +39,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
3839 yes := true
3940 no := false
4041 charDevice := v1 .HostPathCharDev
42+ maxUnavailable := intstr .FromInt (1 )
43+ maxSurge := intstr .FromInt (0 )
44+
4145 daemonSet := apps.DaemonSet {
4246 TypeMeta : metav1.TypeMeta {
4347 Kind : "DaemonSet" ,
@@ -56,6 +60,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
5660 "app" : appLabel ,
5761 },
5862 },
63+ UpdateStrategy : apps.DaemonSetUpdateStrategy {
64+ Type : "RollingUpdate" ,
65+ RollingUpdate : & apps.RollingUpdateDaemonSet {
66+ MaxUnavailable : & maxUnavailable ,
67+ MaxSurge : & maxSurge ,
68+ },
69+ },
5970 Template : v1.PodTemplateSpec {
6071 ObjectMeta : metav1.ObjectMeta {
6172 Labels : map [string ]string {
You can’t perform that action at this time.
0 commit comments