-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 Correctly sets DNS imageRepository when custom repositories are used #2832
🐛 Correctly sets DNS imageRepository when custom repositories are used #2832
Conversation
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.
Overall this is a good step, although I wonder if we can find / build a regular expression and validate each input?
Maybe @randomvariable knows where can get a good regex to parse OCI images? Then we can use the regexp package to divide the incoming string in groups and return what we need
In alternative, if we can't find a good regex with groups, we can use the reference repository we're using today just for validation / normalization, then parse the strings manually where required |
cd063d6
to
24b30f3
Compare
Agree with the potential of panics. That was going through my head when working on this as well. My regex-fu isn't that good but I think the reference library uses them as well. So might just be able to get it from there. |
The reference library has a bunch of regexes at https://github.com/docker/distribution/blob/master/reference/regexp.go |
For this iteration, I'd suggest to build these higher level functions on top of the reference library, but make them work like we need. |
24b30f3
to
8dc514a
Compare
@vincepri updated to just use the constant in the file that's used to search for the deployment. |
code changes lgtm, should we retitle the PR and tackle the image library separately? |
8dc514a
to
fa18c56
Compare
/retitle Correctly sets DNS imageRepository when custom repositories are used |
/lgtm |
/milestone v0.3.4 |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gab-satchi, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Which issue(s) this PR fixes
Fixes #2810