Skip to content

Commit

Permalink
Fix operator setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz4780 committed Nov 25, 2024
1 parent 386124a commit 0c1f4ca
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions mirrord/operator/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,29 +539,22 @@ impl OperatorRole {
verbs: vec!["list".to_owned(), "get".to_owned()],
..Default::default()
},
// Allow for patching replicas and environment variables.
PolicyRule {
api_groups: Some(vec!["apps".to_owned()]),
resources: Some(vec!["deployments".to_owned(), "statefulsets".to_owned()]),
verbs: vec!["patch".to_owned()],
..Default::default()
},
// Allow for patching replicas and environment variables.
PolicyRule {
api_groups: Some(vec!["argoproj.io".to_owned()]),
resources: Some(vec!["rollouts".to_owned()]),
verbs: vec!["patch".to_owned()],
..Default::default()
},
];

if sqs_splitting || kafka_splitting {
rules.extend([
// For SQS/Kafka controller to temporarily change deployments to use changed
// queues.
PolicyRule {
api_groups: Some(vec!["apps".to_owned()]),
resources: Some(vec!["deployments".to_owned()]),
verbs: vec!["patch".to_owned()],
..Default::default()
},
// For SQS/Kafka controller to temporarily change Argo Rollouts to use changed
// queues.
PolicyRule {
api_groups: Some(vec!["argoproj.io".to_owned()]),
resources: Some(vec!["rollouts".to_owned()]),
verbs: vec!["patch".to_owned()],
..Default::default()
},
]);
}

if kafka_splitting {
rules.extend([
PolicyRule {
Expand Down

0 comments on commit 0c1f4ca

Please sign in to comment.