File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -636,6 +636,7 @@ type DaemonSetSpec struct {
636
636
Annotations map [string ]string `json:"annotations,omitempty"`
637
637
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
638
638
UpdateStrategy string `json:"updateStrategy,omitempty"`
639
+ MaxUnavailable * int `json:"maxUnavailable,omitempty"`
639
640
}
640
641
641
642
type YunionagentSpec struct {
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ func (m *hostManager) newHostPrivilegedDaemonSet(
156
156
Scheme : corev1 .URISchemeHTTPS ,
157
157
},
158
158
},
159
- FailureThreshold : 30 ,
159
+ FailureThreshold : 300 ,
160
160
PeriodSeconds : 10 ,
161
161
},
162
162
ReadinessProbe : generateReadinessProbe ("/ping" , 8885 ),
@@ -215,7 +215,11 @@ func (m *hostManager) newHostPrivilegedDaemonSet(
215
215
if ds .Spec .UpdateStrategy .RollingUpdate == nil {
216
216
ds .Spec .UpdateStrategy .RollingUpdate = new (apps.RollingUpdateDaemonSet )
217
217
}
218
- var maxUnavailableCount = intstr .FromInt (3 )
218
+ var maxUnavailable = 3
219
+ if dsSpec .DaemonSetSpec .MaxUnavailable != nil && * dsSpec .DaemonSetSpec .MaxUnavailable > 0 {
220
+ maxUnavailable = * dsSpec .DaemonSetSpec .MaxUnavailable
221
+ }
222
+ var maxUnavailableCount = intstr .FromInt (maxUnavailable )
219
223
ds .Spec .UpdateStrategy .RollingUpdate .MaxUnavailable = & maxUnavailableCount
220
224
221
225
/* add pod label for pod affinity */
You can’t perform that action at this time.
0 commit comments