Skip to content

Commit

Permalink
Ensure DS update default even though it is already set
Browse files Browse the repository at this point in the history
  • Loading branch information
redhatrises committed Jun 22, 2022
1 parent 452b445 commit 563b6ce
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/node/assets/daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ func pullSecrets(node *falconv1alpha1.FalconNodeSensor) []corev1.LocalObjectRefe
}

func dsUpdateStrategy(node *falconv1alpha1.FalconNodeSensor) appsv1.DaemonSetUpdateStrategy {
rollingUpdateSettings := appsv1.RollingUpdateDaemonSet{}
if node.Spec.Node.DSUpdateStrategy.Type == appsv1.RollingUpdateDaemonSetStrategyType || node.Spec.Node.DSUpdateStrategy.Type == "" {
rollingUpdateSettings := appsv1.RollingUpdateDaemonSet{}

/* Beta feature to enable later
if node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxSurge != nil {
rollingUpdateSettings.MaxSurge = node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxSurge
}
*/
/* Beta feature to enable later
if node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxSurge != nil {
rollingUpdateSettings.MaxSurge = node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxSurge
}
*/

if node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxUnavailable != nil {
rollingUpdateSettings.MaxUnavailable = node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxUnavailable
}
if node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxUnavailable != nil {
rollingUpdateSettings.MaxUnavailable = node.Spec.Node.DSUpdateStrategy.RollingUpdate.MaxUnavailable
}

if node.Spec.Node.DSUpdateStrategy.Type == appsv1.RollingUpdateDaemonSetStrategyType {
return appsv1.DaemonSetUpdateStrategy{
Type: appsv1.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &rollingUpdateSettings,
Expand Down

0 comments on commit 563b6ce

Please sign in to comment.