-
Notifications
You must be signed in to change notification settings - Fork 456
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
fix:port name cant have consecutive hyphens #3976
Conversation
Hi @zhaohuiweixiao. Thanks for your PR. I'm waiting for a kubesphere member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: zhaohuihui <[email protected]>
00381a6
to
c887143
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zhaohuiweixiao The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -592,7 +592,7 @@ | |||
export const PATTERN_TAG = /^[A-Za-z0-9]([-A-Za-z0-9_.]*[A-Za-z0-9])?$/ | |||
export const PATTERN_PASSWORD = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,64}$/ | |||
export const PATTERN_IMAGE = /^\S+$/ | |||
export const PATTERN_PORT_NAME = /^[a-z]([-a-z0-9]*[a-z0-9])?$/ | |||
export const PATTERN_PORT_NAME = /^[a-z](?:-?[a-z0-9]+)*$/ |
Check failure
Code scanning / CodeQL
Inefficient regular expression
How can I verify that my expression is efficient offline? i test the regular express no problem on https://regex101.com/. |
you should resolve this error first. |
@@ -35,7 +35,7 @@ module.exports = { | |||
ENVIRONMENT_INVALID_TIP: 'The key of an environment variable can contain only letters, numbers, underscores (_), hyphens (-), and periods (.), and must not start with a number.', | |||
ENVIRONMENT_CANNOT_BE_EMPTY: 'Please set a key for the environment variable.', | |||
// List > Create > Pod Settings > Port Settings | |||
WORKLOAD_PORT_NAME_DESC: 'The port name can contain only lowercase letters, numbers and hyphens (-), and must start with a lowercase letter and end with a lowercase letter or number. The maximum length is 15 characters.', | |||
WORKLOAD_PORT_NAME_DESC: 'The port name can contain only lowercase letters, numbers and hyphens (-), and must start with a lowercase letter and end with a lowercase letter or number, and cannot have consecutive hyphens. The maximum length is 15 characters.', |
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.
The port name can contain only lowercase letters, numbers and hyphens (-), and must start with a lowercase letter and end with a lowercase letter or number. Avoid using consecutive hyphens. The maximum length is 15 characters.
@zhaohuiweixiao: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: zhaohuihui [email protected]
What type of PR is this?
/kind bug
What this PR does / why we need it:
the port name can not have consecutive hyphens in k8s.
Special notes for reviewers:
Does this PR introduced a user-facing change?