mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-24 08:36:46 +00:00
chore: make function comment match function name (#12417)
Signed-off-by: momantech <cuimoman@qq.com>
This commit is contained in:
parent
d701ab49cf
commit
1982ebca47
4 changed files with 5 additions and 5 deletions
|
@ -105,7 +105,7 @@ func (allin AllInHandler) validateValueWithStringSetPattern(key []string, value
|
||||||
return isAllIn
|
return isAllIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// allsetExistsInArray checks if all key is a subset of value
|
// allSetExistsInArray checks if all key is a subset of value
|
||||||
// The value can be a string, an array of strings, or a JSON format
|
// The value can be a string, an array of strings, or a JSON format
|
||||||
// array of strings (e.g. ["val1", "val2", "val3"].
|
// array of strings (e.g. ["val1", "val2", "val3"].
|
||||||
// allnotIn argument if set to true will check for allNotIn
|
// allnotIn argument if set to true will check for allNotIn
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (anyin AnyInHandler) validateValueWithStringPattern(key string, value inter
|
||||||
return keyExists
|
return keyExists
|
||||||
}
|
}
|
||||||
|
|
||||||
// anykeyExistsInArray checks if the key exists in the array value
|
// anyKeyExistsInArray checks if the key exists in the array value
|
||||||
// The value can be a string, an array of strings, or a JSON format
|
// The value can be a string, an array of strings, or a JSON format
|
||||||
// array of strings (e.g. ["val1", "val2", "val3"].
|
// array of strings (e.g. ["val1", "val2", "val3"].
|
||||||
func anyKeyExistsInArray(key string, value interface{}, log logr.Logger) (invalidType bool, keyExists bool) {
|
func anyKeyExistsInArray(key string, value interface{}, log logr.Logger) (invalidType bool, keyExists bool) {
|
||||||
|
@ -118,7 +118,7 @@ func (anyin AnyInHandler) validateValueWithStringSetPattern(key []string, value
|
||||||
return isAnyIn
|
return isAnyIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// anysetExistsInArray checks if any key is a subset of value
|
// anySetExistsInArray checks if any key is a subset of value
|
||||||
// The value can be a string, an array of strings, or a JSON format
|
// The value can be a string, an array of strings, or a JSON format
|
||||||
// array of strings (e.g. ["val1", "val2", "val3"].
|
// array of strings (e.g. ["val1", "val2", "val3"].
|
||||||
// notIn argument if set to true will check for NotIn
|
// notIn argument if set to true will check for NotIn
|
||||||
|
|
|
@ -17,7 +17,7 @@ func ReplaceInSelector(labelSelector *metav1.LabelSelector, resourceLabels map[s
|
||||||
return labelSelector
|
return labelSelector
|
||||||
}
|
}
|
||||||
|
|
||||||
// replaceWildcardsInMap will expand the "key" and "value" and will replace wildcard characters
|
// replaceWildcardsInMapKeyValues will expand the "key" and "value" and will replace wildcard characters
|
||||||
// It also does not handle anchors as these are not expected in selectors
|
// It also does not handle anchors as these are not expected in selectors
|
||||||
func replaceWildcardsInMapKeyValues(patternMap map[string]string, resourceMap map[string]string) map[string]string {
|
func replaceWildcardsInMapKeyValues(patternMap map[string]string, resourceMap map[string]string) map[string]string {
|
||||||
result := map[string]string{}
|
result := map[string]string{}
|
||||||
|
|
|
@ -1455,7 +1455,7 @@ func validateImageRegistry(entry kyvernov1.ContextEntry) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// validateResourceDescription checks if all necessary fields are present and have values. Also checks a Selector.
|
// validateMatchedResourceDescription checks if all necessary fields are present and have values. Also checks a Selector.
|
||||||
// field type is checked through openapi
|
// field type is checked through openapi
|
||||||
// Returns error if
|
// Returns error if
|
||||||
// - kinds is empty array in matched resource block, i.e. kinds: []
|
// - kinds is empty array in matched resource block, i.e. kinds: []
|
||||||
|
|
Loading…
Add table
Reference in a new issue