Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ aliases:
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): previously, recreating a resource after deletion could hang and block updates; now resource recreation completes normally. See [#1707](https://github.com/VictoriaMetrics/operator/issues/1707).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): use global image registry unless image.repository is defined. See [#1813](https://github.com/VictoriaMetrics/operator/issues/1813).
* BUGFIX: [vmalertmanagerconfig](https://docs.victoriametrics.com/operator/resources/vmalertmanagerconfig/): previously spec.route and spec.receivers were required; now both parameters are optional to align with prometheus operator. VMAlertmanager now can be used to set just the global inhibition rules. See [#1800](https://github.com/VictoriaMetrics/operator/issues/1800).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): use global image registry unless image.repository is defined. See [#1813](https://github.com/VictoriaMetrics/operator/issues/1813).

## [v0.67.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.67.0)
**Release date:** 23 January 2026
Expand Down
11 changes: 5 additions & 6 deletions internal/controller/operator/factory/reconcile/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,8 @@ func PodIsReady(pod *corev1.Pod, minReadySeconds int32) bool {
}

func waitForPodReady(ctx context.Context, rclient client.Client, nsn types.NamespacedName, desiredRevision string, minReadySeconds int32) error {
var pod *corev1.Pod
var pod corev1.Pod
if err := wait.PollUntilContextTimeout(ctx, podWaitReadyIntervalCheck, podWaitReadyTimeout, true, func(_ context.Context) (done bool, err error) {
var pod corev1.Pod
err = rclient.Get(ctx, nsn, &pod)
if err != nil {
return false, fmt.Errorf("cannot get pod: %q: %w", nsn, err)
Expand All @@ -358,10 +357,10 @@ func waitForPodReady(ctx context.Context, rclient client.Client, nsn types.Names
}
return PodIsReady(&pod, minReadySeconds), nil
}); err != nil {
if pod == nil {
if len(pod.Name) == 0 {
return err
}
return podStatusesToError(err, pod)
return podStatusesToError(err, &pod)
}
return nil
}
Expand Down Expand Up @@ -442,7 +441,7 @@ func sortStsPodsByID(src []corev1.Pod) error {
return firstParseError
}

func isSTSPod(pod *corev1.Pod) bool {
func isOwnedBySTS(pod *corev1.Pod) bool {
for _, ref := range pod.OwnerReferences {
if ref.Kind == "StatefulSet" {
return true
Expand All @@ -457,7 +456,7 @@ func filterSTSPods(pods []corev1.Pod, revision string, minReadySeconds int32, re
// pod could be owned by Deployment due to Deployment -> StatefulSet transition
isSameRevision := pod.Labels[podRevisionLabel] == revision
switch {
case !isSTSPod(&pod):
case !isOwnedBySTS(&pod):
case !pod.DeletionTimestamp.IsZero() || recreate:
podsForUpdate = append(podsForUpdate, pod)
case PodIsReady(&pod, minReadySeconds) && isSameRevision:
Expand Down
Loading