Support for OSB PR #452 to allow periods in the name field#1849
Conversation
| ) | ||
|
|
||
| const serviceClassNameFmt string = `[-a-zA-Z0-9]+` | ||
| const serviceClassNameFmt string = `[-.a-zA-Z0-9]+` |
There was a problem hiding this comment.
This change is compatible with Kubernetes names, see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
By convention, the names of Kubernetes resources should be up to maximum length of 253 characters and consist of lower case alphanumeric characters, -, and ., but certain resources have more specific restrictions.
Even though it's not critical now, it might be important in the future.
There was a problem hiding this comment.
@nilebox Thanks for the review!
This change brings service catalog up-to-speed on the OSB PR#452 to support period ('.') characters in service brokers' service class/plan names.
This helps in integrating some existing service brokers which use the '.' characters in the names without having to the change the brokers' catalog (which might cause some migration problems).
There was a problem hiding this comment.
@amshuman-kr yeah it's all good, I just left the comment for other reviewers :)
There was a problem hiding this comment.
do we need to escape the . so its not "any char" ?
There was a problem hiding this comment.
. is considered a normal character inside regex character classes. So, no escaping is required.
Just to be sure, I have added a test case where _ (underscore) is detected as an invalid character.
|
LGTM |
Support for OSB PR #452 which was merged recently.
I have added/modified some unit tests.
No integration tests were introduced as part of this change but I have executed the current integration tests successfully on my local machine.