diff --git a/api/v1alpha1/humiocluster_types.go b/api/v1alpha1/humiocluster_types.go index ccada0cd..39aaf201 100644 --- a/api/v1alpha1/humiocluster_types.go +++ b/api/v1alpha1/humiocluster_types.go @@ -36,7 +36,7 @@ const ( HumioClusterUpdateStrategyOnDelete = "OnDelete" // HumioClusterUpdateStrategyRollingUpdate is the update strategy that will always cause pods to be replaced one at a time HumioClusterUpdateStrategyRollingUpdate = "RollingUpdate" - // HumioClusterUpdateStrategyReplaceAllOnUpdate is the update strategy that will replace all pods at the same time during an update. + // HumioClusterUpdateStrategyReplaceAllOnUpdate is the update strategy that will replace all pods at the same time during an update of either image or configuration. HumioClusterUpdateStrategyReplaceAllOnUpdate = "ReplaceAllOnUpdate" // HumioClusterUpdateStrategyRollingUpdateBestEffort is the update strategy where the operator will evaluate the Humio version change and determine if the // Humio pods can be updated in a rolling fashion or if they must be replaced at the same time diff --git a/controllers/humiocluster_pod_lifecycle.go b/controllers/humiocluster_pod_lifecycle.go index acc33a09..d73a783b 100644 --- a/controllers/humiocluster_pod_lifecycle.go +++ b/controllers/humiocluster_pod_lifecycle.go @@ -32,6 +32,9 @@ func NewPodLifecycleState(hnp HumioNodePool, pod corev1.Pod) *podLifecycleState } func (p *podLifecycleState) ShouldRollingRestart() bool { + if p.nodePool.GetUpdateStrategy().Type == humiov1alpha1.HumioClusterUpdateStrategyReplaceAllOnUpdate { + return false + } if p.nodePool.GetUpdateStrategy().Type == humiov1alpha1.HumioClusterUpdateStrategyRollingUpdate { return true }