@@ -15,28 +15,33 @@ propertyRules:
15
15
# Instead of replacing the property with an existing type, it can also be ignored using:
16
16
# matchSuccess: omit
17
17
18
- # 1. Name -directed matching.
18
+ # Step 1: name -directed matching.
19
19
#
20
- # The first step of determining if a rule applies to a given CRD property, is to attempt
20
+ # This is the first step of determining if a rule applies to a given CRD property. It tries
21
21
# to match the property's name against zero or more exact strings or regular expressions.
22
+ #
23
+ # Any `matchName` expressions are evaluated prior to `matchSchema` expressions.
22
24
matchName :
23
25
# An exact match checks the property name matches exactly.
24
26
- exact : resources
25
27
# This is the equivalent regular expression to `exact` match, above.
26
28
#
27
- # You should prefer to use precise `exact` matches if possible, as they are performed using
28
- # `O(1)` `HashMap::get(name)`. In constrast; the property name must be tested against _every_
29
- # `regex` defined in the overrides, via a `O(n)` linear scan per property, if no `exact`
30
- # matches were found.
29
+ # You should prefer to use precise `exact` matches if possible, as they can optimized to use
30
+ # `O(1)` `HashMap::get(name)`. With `regex` matches however, the property name must be tested
31
+ # against _every_ `regex` requiring an `O(n)` linear scan per property, if no `exact` matches
32
+ # were found.
31
33
#
32
34
# Regular expression syntax is that of the <https://docs.rs/regex> crate.
33
35
- regex : ^resources$
34
36
35
- # 2. Type-directed matching.
37
+ # Step 2: type-directed matching.
38
+ #
39
+ # This is the second step of determining if a rule applies to a given CRD property. It tries
40
+ # to match the property's schema against a partial specification.
36
41
#
37
- # If one of the `matchName` expressions succeeded in matching the property name, or no
38
- # expressions were specified, then the property's `JSONSchemaProps` value will be tested against
39
- # the partially specified schema defined in `matchSchema`.
42
+ # If one of the `matchName` expressions succeeded in matching the property name, or no `matchName`
43
+ # expressions were specified, the property's `JSONSchemaProps` value will be tested against the
44
+ # schema defined in `matchSchema`.
40
45
#
41
46
# The full `JSONSchemaProps` format is supported. It's the same as what you see within a CRD YAML,
42
47
# and can be copy-pasted directly from CRD properties. However, only a certain subset of
@@ -281,7 +286,7 @@ propertyRules:
281
286
- matchSuccess :
282
287
replace : Vec<LocalObjectReference>
283
288
matchAnyName :
284
- - exact :
289
+ - exact : imagePullSecrets
285
290
matchSchema :
286
291
exhaustive :
287
292
type : array
0 commit comments