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

remove ContextEntry.path (prototype for API server lookup)

This commit is contained in:
Jim Bugwadia 2020-10-14 18:48:23 -07:00
parent 7f5c19332a
commit ae0c09a05c
2 changed files with 1 additions and 6 deletions
pkg
api/kyverno/v1
policy

View file

@ -194,7 +194,6 @@ type Rule struct {
type ContextEntry struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
ConfigMap *ConfigMapReference `json:"configMap,omitempty" yaml:"configMap,omitempty"`
}

View file

@ -458,11 +458,7 @@ func validateRuleContext(rule kyverno.Rule) (error) {
if entry.Name == ""{
return fmt.Errorf("a name is required for context entries")
}
if entry.Path == "" && entry.ConfigMap == nil {
return fmt.Errorf("path or configMap required for context entries")
}
if entry.ConfigMap != nil {
if entry.ConfigMap.Name == "" {
return fmt.Errorf("a name is required for configMap context entry")