Skip to content

Commit

Permalink
fix: use set_ports instead of open_port (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabello authored Apr 17, 2024
1 parent 1adee25 commit a45524a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class GrafanaAgentK8sCharm(GrafanaAgentCharm):
def __init__(self, *args):
super().__init__(*args)
self._container = self.unit.get_container(self._name)
self.unit.open_port(protocol="tcp", port=self._http_listen_port)
self.unit.open_port(protocol="tcp", port=self._grpc_listen_port)
self.unit.set_ports(self._http_listen_port, self._grpc_listen_port)

self._scrape = MetricsEndpointConsumer(self)
self.framework.observe(
Expand Down

0 comments on commit a45524a

Please sign in to comment.