fix: add plugin file

This commit is contained in:
Rhomel Chinsio
2020-03-05 06:57:40 +00:00
parent f0ae77abd5
commit b33d0f86f0

View File

@@ -148,8 +148,10 @@ func (p *plugin) findContainers(obj map[string]interface{}) error {
}
func isImageMatched(s, t string) bool {
// Tag values are limited to [a-zA-Z0-9_.-].
pattern, _ := regexp.Compile("^" + t + "(@sha256)?(:[a-zA-Z0-9_.-]*)?$")
// Tag values are limited to [a-zA-Z0-9_.{}-].
// Some tools like Bazel rules_k8s allow tag patterns with {} characters.
// More info: https://github.com/bazelbuild/rules_k8s/pull/423
pattern, _ := regexp.Compile("^" + t + "(@sha256)?(:[a-zA-Z0-9_.{}-]*)?$")
return pattern.MatchString(s)
}