Skip to content

Commit e5aeaf3

Browse files
committed
make purposeSelector behavior more consistent
1 parent faf1ea4 commit e5aeaf3

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

api/dns/v1alpha1/config_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,5 @@ func requirementMatches(r *PurposeSelectorRequirement, purposes []string, seenRe
178178
}
179179
return false
180180
}
181-
return false
181+
return true
182182
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
purposeSelector: {}
2+
3+
purposeSets:
4+
a:
5+
- foo
6+
b:
7+
- bar
8+
- foo
9+
c:
10+
- foo
11+
- foo
12+
d: []
13+
e:
14+
- bar
15+
f:
16+
- foobar
17+
18+
expected:
19+
- a
20+
- b
21+
- c
22+
- d
23+
- e
24+
- f
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
purposeSelector:
2+
and:
3+
- name: foo
4+
- {}
5+
6+
purposeSets:
7+
a:
8+
- foo
9+
b:
10+
- bar
11+
- foo
12+
c:
13+
- foo
14+
- foo
15+
d: []
16+
e:
17+
- bar
18+
f:
19+
- foobar
20+
21+
expected:
22+
- a
23+
- b
24+
- c

0 commit comments

Comments
 (0)