rgw: fix status info when http is disabled

When http is disabled, the spec.status.info.insecure will keep on
showing the insecure endpoint. This PR makes sure that the
spec.status.info.insecure is empty when http is disabled

Signed-off-by: Santosh <sapillai@redhat.com>
(cherry picked from commit 6b9b0231b7)
This commit is contained in:
Santosh authored and Mergify committed 2026-02-12 15:48:38 +00:00
1 parent 125bb5f612
commit c9b4e2d60b
1 file changed
+5
+5
View File
@@ -86,10 +86,15 @@ func updateStatus(ctx context.Context, observedGeneration int64, replicaCount in
insecurePort := objectStore.Spec.Gateway.Port
if insecurePort > 0 {
objectStore.Status.Endpoints.Insecure = getAllDNSEndpoints(objectStore, insecurePort, false)
} else if insecurePort == 0 {
objectStore.Status.Endpoints.Insecure = []string{}
}
securePort := objectStore.Spec.Gateway.SecurePort
if securePort > 0 {
objectStore.Status.Endpoints.Secure = getAllDNSEndpoints(objectStore, securePort, true)
} else if securePort == 0 {
objectStore.Status.Endpoints.Secure = []string{}
}
if cephx != nil {