Skip to content

Commit

Permalink
update libs for k8s charm (#466)
Browse files Browse the repository at this point in the history
## Issue


## Solution
  • Loading branch information
MiaAltieri committed Aug 23, 2024
1 parent 8cad660 commit 00326a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/charms/mongodb/v0/config_server_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def is_mongos_running(self) -> bool:
connection_uri = f"mongodb://{self.charm.get_mongos_host()}"

# use the mongos port for k8s charms and external connections on VM
if self.charm.is_external_client or self.substrate == Config.K8S_SUBSTRATE:
if self.substrate == Config.K8S_SUBSTRATE or self.charm.is_external_client:
connection_uri = connection_uri + f":{Config.MONGOS_PORT}"

with MongosConnection(None, connection_uri) as mongo:
Expand Down
2 changes: 1 addition & 1 deletion lib/charms/mongodb/v1/mongodb_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
class MongoDBProvider(Object):
"""In this class, we manage client database relations."""

def __init__(self, charm: CharmBase, substrate="k8s", relation_name: str = "database") -> None:
def __init__(self, charm: CharmBase, substrate="k8s", relation_name: str = REL_NAME) -> None:
"""Constructor for MongoDBProvider object.
Args:
Expand Down

0 comments on commit 00326a5

Please sign in to comment.