-
Notifications
You must be signed in to change notification settings - Fork 941
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
Add a option to change the regexp for database name/schema validation #2193
base: master
Are you sure you want to change the base?
Conversation
Would rather like to see |
@FxKu That sound reasonable. I can do it. |
990057d
to
b2ca236
Compare
Hey @FxKu added in your suggestion. |
51cda17
to
87629d9
Compare
The previous setup adheres to the naming convention and that's a good thing. Unfortunately, however, there are cases in which you have to break with them. Closes: zalando#667
@FxKu Not sure if the e2e test is failing because of me, but I guess not. Is there anything I can do ? |
@flyingcamilo thanks for adding the config options. What would now happen with the old handling? https://github.com/zalando/postgres-operator/blob/master/pkg/cluster/cluster.go#L44 I don't see it touched in this PR. Some more ToDos: |
if err = c.readValidateDatabaseNameRegexp(c.OpConfig.DatabaseNameRegexp); err != nil { | ||
return err | ||
} | ||
|
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.
It should rather place the existing validation.
@@ -337,6 +341,7 @@ func (c *Cluster) Create() error { | |||
// that feature explicitly | |||
if !(c.databaseAccessDisabled() || c.getNumberOfInstances(&c.Spec) <= 0 || c.Spec.StandbyCluster != nil) { | |||
c.logger.Infof("Create roles") | |||
|
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.
please do not introduce unrelated changes - even these are just blank lines
The previous setup adheres to the naming convention, and that's a good thing. Unfortunately, however, there are cases in which you have to break with them.
Unfortunately, that is our case. We use external software and have no influence on their naming.