@@ -90,7 +90,7 @@ pub struct Index {
90
90
route_refs : HashMap < NamespaceGroupKindName , RouteRef > ,
91
91
92
92
/// Maps rate limit ids to a list of details about these rate limits.
93
- ratelimits : HashMap < ResourceId , HTTPLocalRateLimitPolicyRef > ,
93
+ ratelimits : HashMap < ResourceId , HttpLocalRateLimitPolicyRef > ,
94
94
95
95
/// Maps egress network ids to a list of details about these networks.
96
96
egress_networks : HashMap < ResourceId , EgressNetworkRef > ,
@@ -115,7 +115,7 @@ struct RouteRef {
115
115
}
116
116
117
117
#[ derive( Clone , PartialEq ) ]
118
- struct HTTPLocalRateLimitPolicyRef {
118
+ struct HttpLocalRateLimitPolicyRef {
119
119
creation_timestamp : Option < DateTime < Utc > > ,
120
120
target_ref : ratelimit:: TargetReference ,
121
121
status_conditions : Vec < k8s_core_api:: Condition > ,
@@ -279,8 +279,8 @@ impl Controller {
279
279
self . patch_status:: <k8s_gateway_api:: TcpRoute >( & id. gkn. name, & id. namespace, patch) . await ;
280
280
} else if id. gkn. group == k8s_gateway_api:: TlsRoute :: group( & ( ) ) && id. gkn. kind == k8s_gateway_api:: TlsRoute :: kind( & ( ) ) {
281
281
self . patch_status:: <k8s_gateway_api:: TlsRoute >( & id. gkn. name, & id. namespace, patch) . await ;
282
- } else if id. gkn. group == linkerd_k8s_api:: HTTPLocalRateLimitPolicy :: group( & ( ) ) && id. gkn. kind == linkerd_k8s_api:: HTTPLocalRateLimitPolicy :: kind( & ( ) ) {
283
- self . patch_status:: <linkerd_k8s_api:: HTTPLocalRateLimitPolicy >( & id. gkn. name, & id. namespace, patch) . await ;
282
+ } else if id. gkn. group == linkerd_k8s_api:: HttpLocalRateLimitPolicy :: group( & ( ) ) && id. gkn. kind == linkerd_k8s_api:: HttpLocalRateLimitPolicy :: kind( & ( ) ) {
283
+ self . patch_status:: <linkerd_k8s_api:: HttpLocalRateLimitPolicy >( & id. gkn. name, & id. namespace, patch) . await ;
284
284
} else if id. gkn. group == linkerd_k8s_api:: EgressNetwork :: group( & ( ) ) && id. gkn. kind == linkerd_k8s_api:: EgressNetwork :: kind( & ( ) ) {
285
285
self . patch_status:: <linkerd_k8s_api:: EgressNetwork >( & id. gkn. name, & id. namespace, patch) . await ;
286
286
}
@@ -430,7 +430,7 @@ impl Index {
430
430
fn update_ratelimit (
431
431
& mut self ,
432
432
id : ResourceId ,
433
- ratelimit : & HTTPLocalRateLimitPolicyRef ,
433
+ ratelimit : & HttpLocalRateLimitPolicyRef ,
434
434
) -> bool {
435
435
match self . ratelimits . entry ( id) {
436
436
Entry :: Vacant ( entry) => {
@@ -672,7 +672,7 @@ impl Index {
672
672
& self ,
673
673
id : & NamespaceGroupKindName ,
674
674
target_ref : & ratelimit:: TargetReference ,
675
- ) -> Option < linkerd_k8s_api:: HTTPLocalRateLimitPolicyStatus > {
675
+ ) -> Option < linkerd_k8s_api:: HttpLocalRateLimitPolicyStatus > {
676
676
match target_ref {
677
677
ratelimit:: TargetReference :: Server ( server) => {
678
678
let condition = if self . servers . contains ( server) {
@@ -708,7 +708,7 @@ impl Index {
708
708
no_matching_target ( )
709
709
} ;
710
710
711
- Some ( linkerd_k8s_api:: HTTPLocalRateLimitPolicyStatus {
711
+ Some ( linkerd_k8s_api:: HttpLocalRateLimitPolicyStatus {
712
712
conditions : vec ! [ condition] ,
713
713
target_ref : linkerd_k8s_api:: LocalTargetRef {
714
714
group : Some ( POLICY_API_GROUP . to_string ( ) ) ,
@@ -724,7 +724,7 @@ impl Index {
724
724
fn make_ratelimit_patch (
725
725
& self ,
726
726
id : & NamespaceGroupKindName ,
727
- ratelimit : & HTTPLocalRateLimitPolicyRef ,
727
+ ratelimit : & HttpLocalRateLimitPolicyRef ,
728
728
) -> Option < k8s_core_api:: Patch < serde_json:: Value > > {
729
729
let status = self . target_ref_status ( id, & ratelimit. target_ref ) ;
730
730
@@ -828,8 +828,8 @@ impl Index {
828
828
let id = NamespaceGroupKindName {
829
829
namespace : id. namespace . clone ( ) ,
830
830
gkn : GroupKindName {
831
- group : linkerd_k8s_api:: HTTPLocalRateLimitPolicy :: group ( & ( ) ) ,
832
- kind : linkerd_k8s_api:: HTTPLocalRateLimitPolicy :: kind ( & ( ) ) ,
831
+ group : linkerd_k8s_api:: HttpLocalRateLimitPolicy :: group ( & ( ) ) ,
832
+ kind : linkerd_k8s_api:: HttpLocalRateLimitPolicy :: kind ( & ( ) ) ,
833
833
name : id. name . clone ( ) . into ( ) ,
834
834
} ,
835
835
} ;
@@ -1220,8 +1220,8 @@ impl kubert::index::IndexNamespacedResource<k8s_core_api::Service> for Index {
1220
1220
// to handle resets specially.
1221
1221
}
1222
1222
1223
- impl kubert:: index:: IndexNamespacedResource < linkerd_k8s_api:: HTTPLocalRateLimitPolicy > for Index {
1224
- fn apply ( & mut self , resource : linkerd_k8s_api:: HTTPLocalRateLimitPolicy ) {
1223
+ impl kubert:: index:: IndexNamespacedResource < linkerd_k8s_api:: HttpLocalRateLimitPolicy > for Index {
1224
+ fn apply ( & mut self , resource : linkerd_k8s_api:: HttpLocalRateLimitPolicy ) {
1225
1225
let namespace = resource
1226
1226
. namespace ( )
1227
1227
. expect ( "HTTPLocalRateLimitPolicy must have a namespace" ) ;
@@ -1237,7 +1237,7 @@ impl kubert::index::IndexNamespacedResource<linkerd_k8s_api::HTTPLocalRateLimitP
1237
1237
let creation_timestamp = resource. metadata . creation_timestamp . map ( |Time ( t) | t) ;
1238
1238
let target_ref = ratelimit:: TargetReference :: make_target_ref ( & namespace, & resource. spec ) ;
1239
1239
1240
- let rl = HTTPLocalRateLimitPolicyRef {
1240
+ let rl = HttpLocalRateLimitPolicyRef {
1241
1241
creation_timestamp,
1242
1242
target_ref,
1243
1243
status_conditions,
@@ -1349,7 +1349,7 @@ impl Index {
1349
1349
self . reconcile ( )
1350
1350
}
1351
1351
1352
- fn index_ratelimit ( & mut self , id : ResourceId , ratelimit : HTTPLocalRateLimitPolicyRef ) {
1352
+ fn index_ratelimit ( & mut self , id : ResourceId , ratelimit : HttpLocalRateLimitPolicyRef ) {
1353
1353
// Insert into the index; if the route is already in the index, and it hasn't
1354
1354
// changed, skip creating a patch.
1355
1355
if !self . update_ratelimit ( id. clone ( ) , & ratelimit) {
0 commit comments