gleep fixes mtls and stuff

This commit is contained in:
boris committed 2026-04-18 18:17:29 +01:00
1 parent 31b726b439
commit 779db4cd94
16 files changed
+526 -45

No files matched your search

+9 -1
View File
@@ -139,7 +139,15 @@ class AgentCertificateAuthority(models.Model):
self.revoked_at = timezone.now()
def get_key_pem(self) -> str:
file_payload = read_secret_ref(self.key_pem, label="Agent CA private key")
try:
file_payload = read_secret_ref(self.key_pem, label="Agent CA private key")
except RuntimeError as exc:
# Recover gracefully when a secret-file reference points to a
# deleted key file (for example after volume resets).
if "file missing:" in str(exc):
file_payload = ""
else:
raise
if file_payload:
return file_payload
inline_payload = (self.key_pem or "").strip()