From 230750d73b6be2c8a631a6e7a27cf8eb90a6c6ec Mon Sep 17 00:00:00 2001 From: Lakshmi Narasimhan Date: Thu, 8 Feb 2024 08:47:57 +0530 Subject: [PATCH] Print cluster issuer run result. --- addons/sb-cluster-issuer/enable | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sb-cluster-issuer/enable b/addons/sb-cluster-issuer/enable index 825437d..f47ca7b 100755 --- a/addons/sb-cluster-issuer/enable +++ b/addons/sb-cluster-issuer/enable @@ -35,7 +35,9 @@ def main(email): cluster_issuer_manifest = cluster_issuer_template.format(email) # Use subprocess to apply the modified manifest - subprocess.run([KUBECTL, "apply", "-f", "-"], input=cluster_issuer_manifest.encode()) + result = subprocess.run([KUBECTL, "apply", "-f", "-"], capture_output = True, input=cluster_issuer_manifest.encode()) + click.echo(result.stdout.decode('utf-8')) + click.echo(result.stderr.decode('utf-8')) Path('/var/lock/sb-cluster-issuer.enabled').touch() click.echo("Created clusterissuer")