This is what I tried: ```new Secret("<>>"...
# kubernetes
f
This is what I tried:
Copy code
new Secret("<>>", {
    metadata: {
        name: "<>",
        namespace: "default"
    },
    stringData: {
        auth: password.result.apply(p => {
            let hash = crypto.createHash('md5');
            hash.update(p);
            return hash.digest('base64')
        }).apply(p => `<>:${p}`)
    }
})
s
I have done something like
Copy code
new Secret("<>>", {
    metadata: {
        name: "<>",
        namespace: "default"
    },
    stringData: {
        auth: password.result.apply(p => {
            return Buffer.from(p).toString('base64')
        })
    }
})
f
how this is working? where is the user name? and should it be encoded?
g
The
stringData
field is used for raw string data, so you don’t need to b64 encode the input. https://www.pulumi.com/docs/reference/pkg/kubernetes/core/v1/secret/#stringdata_nodejs The
data
field is for b64-encoded input.
f
I know, I am using base64 on the hash...