mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 22:06:57 +02:00
define readinessProbe on statefulSet (#1825)
* define readinessProbe on statefulSet * do not error out on deleting Patroni cluster objects * change delete order for patroni objects
This commit is contained in:
@@ -25,7 +25,7 @@ const (
|
||||
clusterPath = "/cluster"
|
||||
statusPath = "/patroni"
|
||||
restartPath = "/restart"
|
||||
apiPort = 8008
|
||||
ApiPort = 8008
|
||||
timeout = 30 * time.Second
|
||||
)
|
||||
|
||||
@@ -74,7 +74,7 @@ func apiURL(masterPod *v1.Pod) (string, error) {
|
||||
return "", fmt.Errorf("%s is not a valid IPv4/IPv6 address", masterPod.Status.PodIP)
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("http://%s", net.JoinHostPort(ip.String(), strconv.Itoa(apiPort))), nil
|
||||
return fmt.Sprintf("http://%s", net.JoinHostPort(ip.String(), strconv.Itoa(ApiPort))), nil
|
||||
}
|
||||
|
||||
func (p *Patroni) httpPostOrPatch(method string, url string, body *bytes.Buffer) (err error) {
|
||||
|
||||
@@ -36,17 +36,17 @@ func TestApiURL(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
"127.0.0.1",
|
||||
fmt.Sprintf("http://127.0.0.1:%d", apiPort),
|
||||
fmt.Sprintf("http://127.0.0.1:%d", ApiPort),
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"0000:0000:0000:0000:0000:0000:0000:0001",
|
||||
fmt.Sprintf("http://[::1]:%d", apiPort),
|
||||
fmt.Sprintf("http://[::1]:%d", ApiPort),
|
||||
nil,
|
||||
},
|
||||
{
|
||||
"::1",
|
||||
fmt.Sprintf("http://[::1]:%d", apiPort),
|
||||
fmt.Sprintf("http://[::1]:%d", ApiPort),
|
||||
nil,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user