Skip to content

Commit

Permalink
Merge pull request #344 from pauldthomson/master
Browse files Browse the repository at this point in the history
Remove unnecessary if condition
  • Loading branch information
laverya committed Mar 2, 2021
2 parents 657402c + ef15504 commit bc1c489
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/apis/databases/v1alpha4/vault.go
Expand Up @@ -104,15 +104,9 @@ func (d *Database) GetVaultAnnotations() (map[string]string, error) {
} else {
switch db {
case "postgres", "cockroachdb":
if connTemplate == "" {
template = fmt.Sprintf(`
template = fmt.Sprintf(`
{{- with secret "database/creds/%s" -}}
postgres://{{ .Data.username }}:{{ .Data.password }}@postgres:5432/%s{{- end }}`, v.Role, d.Name)
} else {
template = fmt.Sprintf(`
{{- with secret "database/creds/%s" -}}
%s`, v.Role, connTemplate)
}

case "mysql":
template = fmt.Sprintf(`
Expand Down

0 comments on commit bc1c489

Please sign in to comment.