Add a option to change the regexp for database name/schema validation#2193
Add a option to change the regexp for database name/schema validation#2193flyingcamilo wants to merge 1 commit into
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.
It should rather place the existing validation.
| // 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.
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.