@@ -127,7 +127,7 @@ impl K8sGarbageCollector {
127127 let labels = obj_meta. labels . as_ref ( ) . unwrap_or ( & empty_map) ;
128128
129129 // We delete resources only if they are managed by Agent Control
130- if !labels:: is_managed_by_agentcontrol ( labels) {
130+ if !labels:: is_managed_by_agent_control ( labels) {
131131 return Ok ( false ) ;
132132 }
133133
@@ -146,11 +146,7 @@ impl K8sGarbageCollector {
146146}
147147
148148impl ResourceCleaner for K8sGarbageCollector {
149- fn clean (
150- & self ,
151- id : & AgentID ,
152- agent_type_id : & AgentTypeID ,
153- ) -> Result < ( ) , super :: ResourceCleanerError > {
149+ fn clean ( & self , id : & AgentID , agent_type_id : & AgentTypeID ) -> Result < ( ) , ResourceCleanerError > {
154150 // Call the collect method to perform garbage collection.
155151 self . collect ( id, agent_type_id) ?;
156152 Ok ( ( ) )
@@ -195,7 +191,7 @@ impl K8sGarbageCollectorMode<'_> {
195191 if let Some ( agent_type_id) = agent_identities. get ( agent_id) {
196192 let annotated_agent_type_id = Self :: retrieve_annotated_agent_type_id ( obj_meta) ?;
197193 // Check if the agent type is different from the one in the config.
198- // This is to support the case where the agent id exists in the config
194+ // This is to support the case where the agent id exists in the config,
199195 // but it's a different agent type. See PR#655 for some details.
200196 Ok ( & annotated_agent_type_id != agent_type_id)
201197 } else {
0 commit comments