mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Comment out DaemonSet update type fields and remove the code that depends on it.
Leaving the type fields as comments for reference and reminder. But deleting the conversion, defaulting and validation code. They can always be brough back from the previous PR once the types are introduced. Because builds break without them anyway that serves as a reminder, so there is no need to leave them commented out.
This commit is contained in:
@@ -42,25 +42,6 @@ func addDefaultingFuncs(scheme *runtime.Scheme) {
|
||||
obj.Labels = labels
|
||||
}
|
||||
}
|
||||
updateStrategy := &obj.Spec.UpdateStrategy
|
||||
if updateStrategy.Type == "" {
|
||||
updateStrategy.Type = RollingUpdateDaemonSetStrategyType
|
||||
}
|
||||
if updateStrategy.Type == RollingUpdateDaemonSetStrategyType {
|
||||
if updateStrategy.RollingUpdate == nil {
|
||||
rollingUpdate := RollingUpdateDaemonSet{}
|
||||
updateStrategy.RollingUpdate = &rollingUpdate
|
||||
}
|
||||
if updateStrategy.RollingUpdate.MaxUnavailable == nil {
|
||||
// Set default MaxUnavailable as 1 by default.
|
||||
maxUnavailable := intstr.FromInt(1)
|
||||
updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable
|
||||
}
|
||||
}
|
||||
if obj.Spec.UniqueLabelKey == nil {
|
||||
obj.Spec.UniqueLabelKey = new(string)
|
||||
*obj.Spec.UniqueLabelKey = DefaultDaemonSetUniqueLabelKey
|
||||
}
|
||||
},
|
||||
func(obj *Deployment) {
|
||||
// Default labels and selector to labels from pod template spec.
|
||||
|
||||
Reference in New Issue
Block a user