Skip to content

Commit

Permalink
update KubernetesServicePatch to omit setting the service name
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-scribner committed Mar 21, 2024
1 parent c7d82a2 commit 22d3628
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ def __init__(self, *args):

admin_port = ServicePort(int(self.model.config["admin-port"]), name="admin")
http_port = ServicePort(int(self.model.config["http-port"]), name="http")
self.service_patcher = KubernetesServicePatch(
self, [admin_port, http_port], service_name=f"{self.model.app.name}"
)
self.service_patcher = KubernetesServicePatch(self, [admin_port, http_port])

self.prometheus_provider = MetricsEndpointProvider(
charm=self,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def harness(mocked_kubernetes_service_patch):
def mocked_kubernetes_service_patch(mocker):
"""Mocks the KubernetesServicePatch for the charm."""
mocked_kubernetes_service_patch = mocker.patch(
"charm.KubernetesServicePatch", lambda x, y, service_name: None
"charm.KubernetesServicePatch", lambda x, y: None
)
yield mocked_kubernetes_service_patch

Expand Down

0 comments on commit 22d3628

Please sign in to comment.