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:
parent
7f5c19332a
commit
ae0c09a05c
2 changed files with 1 additions and 6 deletions
pkg
|
@ -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"`
|
||||
}
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue