Skip to content

Commit b128d16

Browse files
authored
Bugfix: port may not be returned (#74)
* Bugfix: port may not be returned * Double check all vars * Pre release v0.7.10 * Pre release v0.7.9 - wrong version
1 parent f850d11 commit b128d16

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

charts/vals-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ kubeVersion: ">= 1.19.0-0"
1616
type: application
1717

1818
# Chart version
19-
version: 0.7.8
19+
version: 0.7.9
2020

2121
# Latest container tag
22-
appVersion: v0.7.8
22+
appVersion: v0.7.9
2323

2424
maintainers:
2525
- email: info@digitalis.io

charts/vals-operator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vals-operator
22

3-
![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)
3+
![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)
44

55
This helm chart installs the Digitalis Vals Operator to manage and sync secrets from supported backends into Kubernetes.
66
## About Vals-Operator

vault/vault.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,19 @@ func GetDbCredentials(role string, mount string) (VaultDbSecret, error) {
293293
return dbSecret, fmt.Errorf("vault did not return the connection details for the database")
294294
}
295295

296-
hosts, _ = conn["hosts"].(string)
297-
connectionURL, _ = conn["connection_url"].(string)
298-
port = conn["port"].(json.Number).String()
296+
h, ok := conn["hosts"].(string)
297+
if ok {
298+
hosts = h
299+
}
300+
c, ok := conn["connection_url"].(string)
301+
if ok {
302+
connectionURL = c
303+
}
304+
305+
n, ok := conn["port"].(json.Number)
306+
if ok {
307+
port = n.String()
308+
}
299309

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

0 commit comments

Comments
 (0)