Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: port may not be returned #74

Merged
merged 4 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/vals-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ kubeVersion: ">= 1.19.0-0"
type: application

# Chart version
version: 0.7.8
version: 0.7.9

# Latest container tag
appVersion: v0.7.8
appVersion: v0.7.9

maintainers:
- email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/vals-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# vals-operator

![Version: 0.7.8](https://img.shields.io/badge/Version-0.7.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.7.8](https://img.shields.io/badge/AppVersion-v0.7.8-informational?style=flat-square)
![Version: 0.7.9](https://img.shields.io/badge/Version-0.7.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.7.9](https://img.shields.io/badge/AppVersion-v0.7.9-informational?style=flat-square)

This helm chart installs the Digitalis Vals Operator to manage and sync secrets from supported backends into Kubernetes.
## About Vals-Operator
Expand Down
16 changes: 13 additions & 3 deletions vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,19 @@ func GetDbCredentials(role string, mount string) (VaultDbSecret, error) {
return dbSecret, fmt.Errorf("vault did not return the connection details for the database")
}

hosts, _ = conn["hosts"].(string)
connectionURL, _ = conn["connection_url"].(string)
port = conn["port"].(json.Number).String()
h, ok := conn["hosts"].(string)
if ok {
hosts = h
}
c, ok := conn["connection_url"].(string)
if ok {
connectionURL = c
}

n, ok := conn["port"].(json.Number)
if ok {
port = n.String()
}

if connectionURL != "" {
connectionURL = strings.Replace(connectionURL, "{{username}}", s.Data["username"].(string), 1)
Expand Down
Loading