diff --git a/pkg/engine/variables/operator/allin.go b/pkg/engine/variables/operator/allin.go index 6497721f86..9caac6bfe7 100644 --- a/pkg/engine/variables/operator/allin.go +++ b/pkg/engine/variables/operator/allin.go @@ -105,7 +105,7 @@ func (allin AllInHandler) validateValueWithStringSetPattern(key []string, value 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 // array of strings (e.g. ["val1", "val2", "val3"]. // allnotIn argument if set to true will check for allNotIn diff --git a/pkg/engine/variables/operator/anyin.go b/pkg/engine/variables/operator/anyin.go index 451b7893af..0676b55e10 100644 --- a/pkg/engine/variables/operator/anyin.go +++ b/pkg/engine/variables/operator/anyin.go @@ -55,7 +55,7 @@ func (anyin AnyInHandler) validateValueWithStringPattern(key string, value inter 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 // array of strings (e.g. ["val1", "val2", "val3"]. 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 } -// 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 // array of strings (e.g. ["val1", "val2", "val3"]. // notIn argument if set to true will check for NotIn diff --git a/pkg/engine/wildcards/wildcards.go b/pkg/engine/wildcards/wildcards.go index e6939ca4f1..730d825295 100644 --- a/pkg/engine/wildcards/wildcards.go +++ b/pkg/engine/wildcards/wildcards.go @@ -17,7 +17,7 @@ func ReplaceInSelector(labelSelector *metav1.LabelSelector, resourceLabels map[s 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 func replaceWildcardsInMapKeyValues(patternMap map[string]string, resourceMap map[string]string) map[string]string { result := map[string]string{} diff --git a/pkg/validation/policy/validate.go b/pkg/validation/policy/validate.go index b9e3103daa..33d23d5f9e 100644 --- a/pkg/validation/policy/validate.go +++ b/pkg/validation/policy/validate.go @@ -1455,7 +1455,7 @@ func validateImageRegistry(entry kyvernov1.ContextEntry) error { 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 // Returns error if // - kinds is empty array in matched resource block, i.e. kinds: []