Skip to content
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

[cosigned] image pattern selector: keep glob and remove regex #1834

Closed
hectorj2f opened this issue May 4, 2022 · 5 comments · Fixed by #1873
Closed

[cosigned] image pattern selector: keep glob and remove regex #1834

hectorj2f opened this issue May 4, 2022 · 5 comments · Fixed by #1873
Assignees
Labels
enhancement New feature or request

Comments

@hectorj2f
Copy link
Contributor

Description

The ImagePattern field in the ClusterImagePolicy has two optional fields Glob and Regex. There is an internal discussion to remove Regex and keep Glob.

cc @DennyHoang @vaikas @

type ImagePattern struct {
	// +optional
	Glob string `json:"glob,omitempty"`
	// +optional
	Regex string `json:"regex,omitempty"`
}
@hectorj2f hectorj2f added the enhancement New feature or request label May 4, 2022
@hectorj2f hectorj2f self-assigned this May 4, 2022
@DennyHoang
Copy link
Contributor

DennyHoang commented May 4, 2022

Currently, globMatch is just a suffix check right now since we support only one wildcard *.
That would need to be updated to be actually glob check before removing regex.

@adamd-vmw
Copy link

glob has been sufficient for our use cases to date.

@hectorj2f
Copy link
Contributor Author

@DennyHoang Please, create the issue where you explain what is missing in globMatch, so we can fix it.

@vaikas
Copy link
Contributor

vaikas commented May 4, 2022

I think the one problem that can be an issue with glob matching that I've seen personally is when pulling things off of docker.io, sometimes it's index.docker.io for example. And in gcr.io they are sometimes gcr.io, us.gcr.io, asia.gcr.io so for them I think you'd maybe want to create:
.gcr.io/
gcr.io/*

instead of listing them all.

@hectorj2f
Copy link
Contributor Author

I am gonna remove the image.regex field now that glob matching has been improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants