gleep fixes mtls and stuff
This commit is contained in:
1 parent
31b726b439
commit
779db4cd94
16 files changed
+526
-45
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user