diff --git a/src/charm.py b/src/charm.py index be65745026..87fb03aad9 100755 --- a/src/charm.py +++ b/src/charm.py @@ -98,8 +98,8 @@ def __init__(self, *args): charm=self, relation="restart", callback=self._restart ) - postgresql_db_port = ServicePort(5432, name=f"{self.app.name}") - patroni_api_port = ServicePort(8008, name=f"{self.app.name}") + postgresql_db_port = ServicePort(5432, name="database") + patroni_api_port = ServicePort(8008, name="api") self.service_patcher = KubernetesServicePatch(self, [postgresql_db_port, patroni_api_port]) @property diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index ef388ea0e4..f5070a8cbc 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -447,9 +447,11 @@ def get_expected_k8s_resources(namespace: str, application: str) -> set: [ f"Endpoints/patroni-{application}-config", f"Endpoints/patroni-{application}", + f"Endpoints/{application}", f"Endpoints/{application}-primary", f"Endpoints/{application}-replicas", f"Service/patroni-{application}-config", + f"Service/{application}", ] )