check for other env vars, too

This commit is contained in:
Felix Kunde 2026-02-20 17:37:53 +01:00
parent 5b72a725bd
commit 6db89303a8
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import (
"fmt"
"net/http"
"reflect"
"regexp"
"sort"
"strings"
"time"
@ -665,7 +666,8 @@ func parseResourceRequirements(resourcesRequirement v1.ResourceRequirements) (ac
func isStandbyCluster(spec *acidv1.PostgresSpec) bool {
for _, env := range spec.Env {
if env.Name == "STANDBY_WALE_S3_PREFIX" && env.Value != "" {
hasStandbyEnv, _ := regexp.MatchString(`^STANDBY_WALE_(S3|GS|GSC|SWIFT)_PREFIX$`, env.Name)
if hasStandbyEnv && env.Value != "" {
return true
}
}