Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deployments/dlb_plugin/base/intel-dlb-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
selector:
matchLabels:
app: intel-dlb-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
5 changes: 5 additions & 0 deletions deployments/dsa_plugin/base/intel-dsa-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
selector:
matchLabels:
app: intel-dsa-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ spec:
selector:
matchLabels:
app: intel-fpga-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
5 changes: 5 additions & 0 deletions deployments/gpu_plugin/base/intel-gpu-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
selector:
matchLabels:
app: intel-gpu-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
5 changes: 5 additions & 0 deletions deployments/iaa_plugin/base/intel-iaa-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
selector:
matchLabels:
app: intel-iaa-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
5 changes: 5 additions & 0 deletions deployments/qat_plugin/base/intel-qat-kernel-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
selector:
matchLabels:
app: intel-qat-kernel-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
5 changes: 5 additions & 0 deletions deployments/qat_plugin/base/intel-qat-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ spec:
selector:
matchLabels:
app: intel-qat-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
5 changes: 5 additions & 0 deletions deployments/sgx_plugin/base/intel-sgx-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ spec:
selector:
matchLabels:
app: intel-sgx-plugin
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
labels:
Expand Down
10 changes: 10 additions & 0 deletions pkg/controllers/dlb/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -34,6 +35,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
devicePlugin := rawObj.(*devicepluginv1.DlbDevicePlugin)
yes := true
no := false
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

daemonSet := apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Expand All @@ -53,6 +56,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down
11 changes: 11 additions & 0 deletions pkg/controllers/dsa/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -36,6 +37,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet

yes := true
no := false
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

daemonSet := apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Kind: "DaemonSet",
Expand All @@ -54,6 +58,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down
10 changes: 10 additions & 0 deletions pkg/controllers/fpga/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -37,6 +38,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
yes := true
no := false
directoryOrCreate := v1.HostPathDirectoryOrCreate
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

return &apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Expand All @@ -56,6 +59,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down
11 changes: 11 additions & 0 deletions pkg/controllers/gpu/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -38,6 +39,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet

yes := true
no := false
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

daemonSet := apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Kind: "DaemonSet",
Expand All @@ -56,6 +60,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down
11 changes: 11 additions & 0 deletions pkg/controllers/iaa/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -36,6 +37,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet

yes := true
no := false
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

daemonSet := apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Kind: "DaemonSet",
Expand All @@ -54,6 +58,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down
10 changes: 10 additions & 0 deletions pkg/controllers/qat/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -38,6 +39,8 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
yes := true
no := false
pluginAnnotations := devicePlugin.ObjectMeta.DeepCopy().Annotations
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

daemonSet := apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Expand All @@ -58,6 +61,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down
11 changes: 11 additions & 0 deletions pkg/controllers/sgx/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/controller-runtime/pkg/client"

devicepluginv1 "github.com/intel/intel-device-plugins-for-kubernetes/pkg/apis/deviceplugin/v1"
Expand All @@ -38,6 +39,9 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
yes := true
no := false
charDevice := v1.HostPathCharDev
maxUnavailable := intstr.FromInt(1)
maxSurge := intstr.FromInt(0)

daemonSet := apps.DaemonSet{
TypeMeta: metav1.TypeMeta{
Kind: "DaemonSet",
Expand All @@ -56,6 +60,13 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet
"app": appLabel,
},
},
UpdateStrategy: apps.DaemonSetUpdateStrategy{
Type: "RollingUpdate",
RollingUpdate: &apps.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
Expand Down