feat: enhancing webhook regexp for registry check#1187
Closed
coffeecupjapan wants to merge 2 commits intoprojectcapsule:mainfrom
Closed
feat: enhancing webhook regexp for registry check#1187coffeecupjapan wants to merge 2 commits intoprojectcapsule:mainfrom
coffeecupjapan wants to merge 2 commits intoprojectcapsule:mainfrom
Conversation
✅ Deploy Preview for capsule-documentation canceled.
|
prometherion
reviewed
Sep 9, 2024
| r := regexp.MustCompile(`((?P<registry>[a-zA-Z0-9-._]+(:\d+)?)\/)?(?P<repository>.*\/)?(?P<image>[a-zA-Z0-9-._]+:(?P<tag>[a-zA-Z0-9-._]+))?`) | ||
| // registry name should start with a-zA-Z0-9 and end with a-zA-Z0-9 | ||
| // @see https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/apis/core/validation/validation.go#L7281-L7284 | ||
| r := regexp.MustCompile(`((?P<registry>[a-zA-Z0-9][a-zA-Z0-9-.]+[a-zA-Z0-9](:\d+)?)\/)?(?P<repository>.*\/)?(?P<image>[a-zA-Z0-9-._]+:(?P<tag>[a-zA-Z0-9-._]+))?`) |
Member
There was a problem hiding this comment.
@oliverbaehler it seems a good improvement to me, WDYT?
Member
|
@coffeecupjapan may I ask you to fix the PR according to the checks, such as DCO, pull request tile and commit message ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stale PR : #1176
Slack conversation : https://kubernetes.slack.com/archives/C03GETTJQRL/p1725202621083079