aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/exts/kubernetes/certificates.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-02-02 16:12:08 +0000
committerGravatar Chris Lovering <[email protected]>2024-02-02 16:12:08 +0000
commit5fd87154cbf326068b181f366286a635a7eaa119 (patch)
tree709446f42d8981e83bca8b17f4fda280d477c7e2 /arthur/exts/kubernetes/certificates.py
parentAdd ruff isort configuration (diff)
Enable all ruff rules
Diffstat (limited to 'arthur/exts/kubernetes/certificates.py')
-rw-r--r--arthur/exts/kubernetes/certificates.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/arthur/exts/kubernetes/certificates.py b/arthur/exts/kubernetes/certificates.py
index 69c1c32..a2383da 100644
--- a/arthur/exts/kubernetes/certificates.py
+++ b/arthur/exts/kubernetes/certificates.py
@@ -25,15 +25,15 @@ class Certificates(commands.Cog):
"""List TLS certificates in the selected namespace (defaults to default)."""
certs = await certificates.list_certificates(namespace)
- table_data = []
-
- for certificate in certs["items"]:
- table_data.append([
+ table_data = [
+ [
certificate["metadata"]["name"],
", ".join(certificate["spec"]["dnsNames"]),
certificate["spec"]["issuerRef"]["name"],
certificate["status"]["conditions"][0]["message"],
- ])
+ ]
+ for certificate in certs["items"]
+ ]
table = tabulate(
table_data, headers=["Name", "DNS Names", "Issuer", "Status"], tablefmt="psql"