-
Notifications
You must be signed in to change notification settings - Fork 107
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
Make PostgreSQL secrets name template configurable #575
Make PostgreSQL secrets name template configurable #575
Conversation
type SecretsTemplate string | ||
|
||
func (f *SecretsTemplate) Format(a ...string) string { | ||
res := string(*f) | ||
|
||
for i := 0; i < len(a); i += 2 { | ||
res = strings.Replace(res, "{"+a[i]+"}", a[i+1], -1) | ||
} | ||
|
||
return res | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@steven-zou this is a blunt copy from https://github.com/zalando/postgres-operator/blob/0745ce7cce63ab6431103d27eb08e54ec47d2b15/pkg/util/config/util.go#L232
does this need to be re-written to avoid licensing issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ghostbaby maybe you could say sth about this?
Fixes #572 Signed-off-by: Alex Stockinger <mail@alexstockinger.de>
Signed-off-by: Alex Stockinger <mail@alexstockinger.de>
@steven-zou @Ghostbaby @bitsf plz have a look at the comment above regarding the piece of code from the postgres-operator project before merging the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Fixes #572
Signed-off-by: Alex Stockinger mail@alexstockinger.de