Skip to content

Commit cde0758

Browse files
authored
Adds a reflector for caching mirrord policies (changes mirrord operat…or setup to have the operator with watch permission for policies). (#3303)
* Adds a reflector for caching mirrord policies (changes mirrord operator setup to have the operator with watch permission for policies). * changelog
1 parent cb20dc0 commit cde0758

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog.d/+834.changed.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add watch permission for mirrord policies (so the operator can use a reflector and cache policies).

mirrord/operator/src/setup.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -589,15 +589,15 @@ impl OperatorClusterRole {
589589
verbs: vec!["create".to_owned()],
590590
..Default::default()
591591
},
592-
// Allow the operator to list+get mirrord policies.
592+
// Allow the operator to list+get+watch mirrord policies.
593593
PolicyRule {
594594
// Both namespaced and cluster-wide policies live in the same API group.
595595
api_groups: Some(vec![MirrordPolicy::group(&()).into_owned()]),
596596
resources: Some(vec![
597597
MirrordPolicy::plural(&()).into_owned(),
598598
MirrordClusterPolicy::plural(&()).into_owned(),
599599
]),
600-
verbs: vec!["list".to_owned(), "get".to_owned()],
600+
verbs: vec!["list".to_owned(), "get".to_owned(), "watch".to_owned()],
601601
..Default::default()
602602
},
603603
// Allow for patching replicas and environment variables.

0 commit comments

Comments
 (0)