`Buffer.from(sk as string).toString("base64")` wor...
# general
n
Buffer.from(sk as string).toString("base64")
works, but I’m wondering if there are other idiomatic way to do this.
s
Not yet, AFAIK. Would you mind adding it to the pulumi-kubernetesx repo? Just found out you can directly get there from the documentation (just click on the header).
n
Oh, if so I’d like to use the current approach instead of introducing another package.
Copy code
const testSecrets = new k8s.core.v1.Secret("test", {
    type: "Opaque",
    stringData: {
        "client-secret": "hello",
    },
});
creates something like (simplified)
Copy code
apiVersion: v1
data:
  client-secret: aGVsbG8=
kind: Secret
metadata:
  name: test
type: Opaque
n
This would make the string non-secret in pulumi?
c
Its no different from the way you're doing it now other than lets Pulumi do the base64 encoding, rather than doing it manually