Skip to content

Commit

Permalink
update ca certs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldmitry committed Nov 11, 2024
1 parent c7ea5ec commit c9156d8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cosl/coordinated_workers/nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def configure_tls(self, private_key: str, server_cert: str, ca_cert: str) -> Non
Path(CA_CERT_PATH).parent.mkdir(parents=True, exist_ok=True)
Path(CA_CERT_PATH).write_text(ca_cert)

# FIXME: uncomment as soon as the nginx image contains the ca-certificates package
# self._container.exec(["update-ca-certificates", "--fresh"])
self._container.exec(["update-ca-certificates", "--fresh"])

def delete_certificates(self) -> None:
"""Delete the certificate files from disk and run update-ca-certificates."""
Expand All @@ -103,8 +102,7 @@ def delete_certificates(self) -> None:
self._container.remove_path(CA_CERT_PATH, recursive=True)
if Path(CA_CERT_PATH).exists():
Path(CA_CERT_PATH).unlink(missing_ok=True)
# FIXME: uncomment as soon as the nginx image contains the ca-certificates package
# self._container.exec(["update-ca-certificates", "--fresh"])
self._container.exec(["update-ca-certificates", "--fresh"])

def _has_config_changed(self, new_config: str) -> bool:
"""Return True if the passed config differs from the one on disk."""
Expand Down

0 comments on commit c9156d8

Please sign in to comment.