colossal-potato-56488
05/22/2021, 4:44 PMconst postgres = new k8s.helm.v3.Chart("postgres", {
version: "10.4.6",
chart: "postgresql",
fetchOpts: {
repo: "<https://charts.bitnami.com/bitnami>",
},
});
// Cannot read property 'postgresql-password' of undefined
// kubectl get secret --namespace default postgres-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode
export const dbPassword = new k8s.core.v1.Secret('postgres-postgresql', { metadata: { namespace: 'default' } }).data.apply(data => data['postgresql-password'])
console.log(46, dbPassword)
postgresql.config.username = 'postgres'
postgresql.config.password = dbPassword // yields: Type 'Output<string>' is not assignable to type 'string'
const myDb = new postgresql.Database("my-database");
Any help appreciated!