1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

policy violation name format update (#502)

This commit is contained in:
Shivkumar Dudhani 2019-11-18 11:42:00 -08:00 committed by GitHub
parent 61b202c64a
commit 89c298b5f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -331,8 +331,8 @@ func buildPVObj(policyName string, resourceSpec kyverno.ResourceSpec, rules []ky
"policy": policyName,
"resource": resourceSpec.ToKey(),
}
pv.SetGenerateName(fmt.Sprintf("%s-", policyName))
pv.SetLabels(labelMap)
pv.SetGenerateName("pv-")
return pv
}

View file

@ -36,7 +36,7 @@ func buildNamespacedPVObj(policy string, resource kyverno.ResourceSpec, fRules [
"policy": policy,
"resource": resource.ToKey(),
}
pv.SetGenerateName("pv-")
pv.SetGenerateName(fmt.Sprintf("%s-", policy))
pv.SetLabels(labelMap)
return pv
}