mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-08 17:06:57 +00:00
* feat: add variables Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * feat: implement evaluator Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: build Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: linter Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> * fix: unit tests Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com> --------- Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
19 lines
404 B
Go
19 lines
404 B
Go
package variables
|
|
|
|
import "github.com/kyverno/kyverno/api/policies.kyverno.io/v1alpha1"
|
|
|
|
func GetAttestors(att []v1alpha1.Attestor) map[string]string {
|
|
m := make(map[string]string)
|
|
for _, v := range att {
|
|
m[v.Name] = v.Name
|
|
}
|
|
return m
|
|
}
|
|
|
|
func GetAttestations(att []v1alpha1.Attestation) map[string]string {
|
|
m := make(map[string]string)
|
|
for _, v := range att {
|
|
m[v.Name] = v.Name
|
|
}
|
|
return m
|
|
}
|