Skip to content

Commit

Permalink
Only update tls flags on leader (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp authored Nov 18, 2024
1 parent 4fed73b commit c5e6100
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/relations/postgresql_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ def update_read_only_endpoint(self, event: DatabaseRequestedEvent = None) -> Non

def update_tls_flag(self, tls: str) -> None:
"""Update TLS flag and CA in relation databag."""
if not self.charm.unit.is_leader():
return

relations = self.model.relations[self.relation_name]
if tls == "True":
_, ca, _ = self.charm.tls.get_tls_files()
Expand Down

0 comments on commit c5e6100

Please sign in to comment.