mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Ignore 403s when trying to create Kubernetes Service (#2390)
Close #1132
This commit is contained in:
@@ -950,7 +950,8 @@ class Kubernetes(AbstractDCS):
|
||||
if not self._api.create_namespaced_service(self._namespace, body):
|
||||
return
|
||||
except Exception as e:
|
||||
if not isinstance(e, k8s_client.rest.ApiException) or e.status != 409: # Service already exists
|
||||
if not isinstance(e, k8s_client.rest.ApiException) or e.status != 409 or e.status != 403:
|
||||
# Service already exists
|
||||
return logger.exception('create_config_service failed')
|
||||
self._should_create_config_service = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user