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

Make PostgreSQL secrets name template configurable #575

Merged
merged 2 commits into from
Apr 23, 2021
Merged

Make PostgreSQL secrets name template configurable #575

merged 2 commits into from
Apr 23, 2021

Conversation

dajudge
Copy link
Contributor

@dajudge dajudge commented Apr 20, 2021

Fixes #572

Signed-off-by: Alex Stockinger mail@alexstockinger.de

@dajudge dajudge changed the title Add db secret suffix '.postgresql.acid.zalan.do' for inClusterDb Use latest postgres-operator 1.6.2 Apr 20, 2021
@dajudge dajudge changed the title Use latest postgres-operator 1.6.2 Make PostgreSQL secrets name template configurable Apr 20, 2021
@dajudge dajudge marked this pull request as draft April 20, 2021 12:38
@Ghostbaby Ghostbaby self-requested a review April 21, 2021 02:02
Comment on lines 168 to 178
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
}
Copy link
Contributor Author

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?

Copy link
Contributor Author

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>
@dajudge dajudge marked this pull request as ready for review April 22, 2021 04:35
@steven-zou steven-zou requested a review from bitsf April 22, 2021 06:28
@dajudge
Copy link
Contributor Author

dajudge commented Apr 22, 2021

@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

#575 (review)

Copy link
Contributor

@Ghostbaby Ghostbaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@steven-zou steven-zou merged commit df70168 into goharbor:master Apr 23, 2021
@dajudge dajudge deleted the add-zalando-secret-suffix branch April 23, 2021 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong secret name referenced when using inClusterDatabase
4 participants