Skip to content

Commit

Permalink
Bugfix: port may not be returned (#74)
Browse files Browse the repository at this point in the history
* Bugfix: port may not be returned

* Double check all vars

* Pre release v0.7.10

* Pre release v0.7.9 - wrong version
  • Loading branch information
digiserg authored Jan 26, 2024
1 parent f850d11 commit b128d16
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
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

0 comments on commit b128d16

Please sign in to comment.