Skip to content

Commit 6ac786d

Browse files
committed
fix: formatting
1 parent 8a4ef14 commit 6ac786d

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

rustrial-k8s-aws-iam-controller/src/service_account_controller.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use k8s_openapi::{
66
apimachinery::pkg::apis::meta::v1::{ObjectMeta, OwnerReference},
77
};
88
use kube::{
9-
api::{DeleteParams, Patch, PatchParams},
109
Api, Error, ResourceExt,
10+
api::{DeleteParams, Patch, PatchParams},
1111
};
1212
use kube_runtime::{
1313
controller::{Action, Controller},
@@ -17,7 +17,7 @@ use kube_runtime::{
1717
use log::info;
1818
use metrics::{counter, histogram};
1919
use rustrial_k8s_aws_iam_apis::{
20-
Provider, TrustPolicyStatement, TrustPolicyStatementSpec, TRUST_POLICY_STATEMENT_LABEL,
20+
Provider, TRUST_POLICY_STATEMENT_LABEL, TrustPolicyStatement, TrustPolicyStatementSpec,
2121
};
2222
use sha2::Digest;
2323
use std::{sync::Arc, time::Instant};

rustrial-k8s-aws-iam-controller/src/trust_policy_statement_controller.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
use crate::{
2+
Configuration, CrdError,
23
arn::ARN,
34
iam_policy::{Action, ConditionMap, Conditions, Effect, PolicyDocument, Principal, Statement},
4-
Configuration, CrdError,
55
};
66
use aws_sdk_iam::{operation::get_role::GetRoleError, types::Role};
77
use aws_sdk_sts::error::SdkError;
88
use aws_types::SdkConfig;
99
use futures::{Future, StreamExt};
1010
use json_patch::diff;
1111
use kube::{
12-
api::{Patch, PatchParams},
1312
Api, Client, CustomResourceExt, Error, ResourceExt,
13+
api::{Patch, PatchParams},
1414
};
1515
use kube_runtime::{
1616
controller::{Action as RAction, Controller},
@@ -23,8 +23,8 @@ use log::{error, info, warn};
2323
use metrics::{counter, histogram};
2424
use regex::Regex;
2525
use rustrial_k8s_aws_iam_apis::{
26-
Authorization, Condition, Provider, RoleUsagePolicy, RoleUsagePolicySpec, TrustPolicyStatement,
27-
API_GROUP,
26+
API_GROUP, Authorization, Condition, Provider, RoleUsagePolicy, RoleUsagePolicySpec,
27+
TrustPolicyStatement,
2828
};
2929
use std::{collections::HashMap, convert::TryFrom, ops::DerefMut, sync::Arc, time::Instant};
3030
use tokio::time::Duration;
@@ -410,7 +410,7 @@ impl TrustPolicyStatementController {
410410
);
411411
// Bail out and schedule retry on temporary errors during authorization lookup.
412412
// This will make sure we don't remove existing authorizations on error, which
413-
// would lead to problems as workloads will temporarily not be able to assume
413+
// would lead to problems as workloads will temporarily not be able to assume
414414
// the IAM Role until the time based reconciliation would fix it again.
415415
return Ok(RAction::requeue(Duration::from_secs(5)));
416416
}
@@ -450,7 +450,10 @@ impl TrustPolicyStatementController {
450450
{
451451
error!(
452452
"Error while removing TrustPolicy Statement of {}/{} from IAM Role {}: {}",
453-
namespace, tp.name_any(), role.arn, e
453+
namespace,
454+
tp.name_any(),
455+
role.arn,
456+
e
454457
);
455458
tp.set_status(Some(format!(
456459
"Failed to remove TrustPolicy Statement from IAM Role: {}",

0 commit comments

Comments
 (0)