Open
Description
I have a postgresql connection that I would like to look at, but it has a randomly generated password.
The config looks like this:
[[database]]
Name = 'cluster-coder'
Provider = 'postgres'
DBName = 'coder'
URL = 'postgres://postgres:<password>@localhost:${port}/coder?sslmode=disable'
Commands = [
{ Command = 'kubectl --context cluster port-forward -n coder svc/cluster-pooler ${port}:5432', WaitForPort = '${port}' }
]
It would be nice to be able to populate the <password>
the same we do for ${port}
.
Commands = [
{ Command = 'kubectl --context cluster get secrets blah | yq .data.password | base64 -d', <password identifier> },
{ Command = 'kubectl --context cluster port-forward -n coder svc/cluster-pooler ${port}:5432', WaitForPort = '${port}' }
]
I'm not sure what it should look like for <password identifier>
to say I want the output of this command to be used as the password... this might be able to be extend to allow arbitrary variable substitution, but at least MVP for this issue would be able to populate the password dynamically.
Metadata
Assignees
Labels
No labels