Hi, I'm having a bit of a mental block. i'm tryin...
# python
s
Hi, I'm having a bit of a mental block. i'm trying to read an existing
Secret
value from a cluster. I've got the following code:
Copy code
cert_ca = k8s.core.v1.Secret.get("ou-tls-certificate","openunison/ou-tls-certificate").data["ca.crt"].apply(lambda data: str(data)  )
a
Don't have a setup to validate but have you tried?
Copy code
cert_ca = k8s.core.v1.Secret.get("ou-tls-certificate","openunison/ou-tls-certificate").data.apply(lambda data: data.get("ca.crt", "undefined"))
s
ended up realizing the issue was i was trying to log before preview happened. once i skipped the logging it mostly worked. still trying to figure out how to delay the preview until after the secret gets generated