Skip to content

Commit 64f5184

Browse files
committed
feat: add maxSurge to DaemonSet rolling update strategy
1 parent cc6c2e9 commit 64f5184

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

rust/operator-binary/src/controller.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ use stackable_operator::{
3434
k8s_openapi::{
3535
DeepMerge,
3636
api::{
37-
apps::v1::{DaemonSet, DaemonSetSpec},
37+
apps::v1::{
38+
DaemonSet, DaemonSetSpec, DaemonSetUpdateStrategy, RollingUpdateDaemonSet,
39+
},
3840
core::v1::{
3941
ConfigMap, EmptyDirVolumeSource, EnvVar, EnvVarSource, HTTPGetAction,
4042
ObjectFieldSelector, Probe, SecretVolumeSource, ServiceAccount,
@@ -1153,6 +1155,13 @@ fn build_server_rolegroup_daemonset(
11531155
..LabelSelector::default()
11541156
},
11551157
template: pod_template,
1158+
update_strategy: Some(DaemonSetUpdateStrategy {
1159+
type_: Some("RollingUpdate".to_string()),
1160+
rolling_update: Some(RollingUpdateDaemonSet {
1161+
max_surge: Some(IntOrString::Int(1)),
1162+
max_unavailable: Some(IntOrString::Int(0)),
1163+
}),
1164+
}),
11561165
..DaemonSetSpec::default()
11571166
};
11581167

0 commit comments

Comments
 (0)