1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-30 03:15:05 +00:00

787 circle ci changes

This commit is contained in:
shravan 2020-04-02 21:19:51 +05:30
parent 410e53bd9f
commit 7ce0c8d68a

View file

@ -395,8 +395,5 @@ func applyPolicyOnResource(policy *v1.ClusterPolicy, resource *unstructured.Unst
func policyHasVariables(policy v1.ClusterPolicy) bool {
policyRaw, _ := json.Marshal(policy)
regex := regexp.MustCompile(`\{\{([^{}]*)\}\}`)
if len(regex.FindAllStringSubmatch(string(policyRaw), -1)) > 0 {
return true
}
return false
return len(regex.FindAllStringSubmatch(string(policyRaw), -1)) > 0
}