https://pulumi.com logo
#general
Title
# general
n

narrow-author-62348

04/08/2020, 9:52 AM
Buffer.from(sk as string).toString("base64")
works, but I’m wondering if there are other idiomatic way to do this.
s

stocky-island-3676

04/08/2020, 10:03 AM
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

narrow-author-62348

04/08/2020, 10:12 AM
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

narrow-author-62348

04/09/2020, 12:02 AM
This would make the string non-secret in pulumi?
c

clean-eve-27532

04/09/2020, 8:10 AM
Its no different from the way you're doing it now other than lets Pulumi do the base64 encoding, rather than doing it manually