Skip to content

Commit c67d431

Browse files
author
Mike Rostermund
authored
Merge pull request #741 from humio/mike/default_replace_all
Replace all if ReplaceAllOnUpdate strategy is set
2 parents 93c71f2 + 887b3b0 commit c67d431

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

api/v1alpha1/humiocluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const (
3636
HumioClusterUpdateStrategyOnDelete = "OnDelete"
3737
// HumioClusterUpdateStrategyRollingUpdate is the update strategy that will always cause pods to be replaced one at a time
3838
HumioClusterUpdateStrategyRollingUpdate = "RollingUpdate"
39-
// HumioClusterUpdateStrategyReplaceAllOnUpdate is the update strategy that will replace all pods at the same time during an update.
39+
// HumioClusterUpdateStrategyReplaceAllOnUpdate is the update strategy that will replace all pods at the same time during an update of either image or configuration.
4040
HumioClusterUpdateStrategyReplaceAllOnUpdate = "ReplaceAllOnUpdate"
4141
// HumioClusterUpdateStrategyRollingUpdateBestEffort is the update strategy where the operator will evaluate the Humio version change and determine if the
4242
// Humio pods can be updated in a rolling fashion or if they must be replaced at the same time

controllers/humiocluster_pod_lifecycle.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ func NewPodLifecycleState(hnp HumioNodePool, pod corev1.Pod) *podLifecycleState
3232
}
3333

3434
func (p *podLifecycleState) ShouldRollingRestart() bool {
35+
if p.nodePool.GetUpdateStrategy().Type == humiov1alpha1.HumioClusterUpdateStrategyReplaceAllOnUpdate {
36+
return false
37+
}
3538
if p.nodePool.GetUpdateStrategy().Type == humiov1alpha1.HumioClusterUpdateStrategyRollingUpdate {
3639
return true
3740
}

0 commit comments

Comments
 (0)