File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
spring-cloud-kubernetes-fabric8-autoconfig/src/main/java/org/springframework/cloud/kubernetes/fabric8 Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 1818
1919import java .time .Duration ;
2020
21- import io .fabric8 .kubernetes .client .Client ;
2221import io .fabric8 .kubernetes .client .Config ;
2322import io .fabric8 .kubernetes .client .ConfigBuilder ;
2423import io .fabric8 .kubernetes .client .KubernetesClient ;
2524import io .fabric8 .kubernetes .client .KubernetesClientBuilder ;
2625
27- import org .springframework .beans .factory .BeanFactoryUtils ;
2826import org .springframework .boot .autoconfigure .AutoConfigureAfter ;
2927import org .springframework .boot .autoconfigure .condition .ConditionalOnCloudPlatform ;
3028import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
3331import org .springframework .cloud .kubernetes .commons .KubernetesCommonsAutoConfiguration ;
3432import org .springframework .context .annotation .Bean ;
3533import org .springframework .context .annotation .Configuration ;
36- import org .springframework .context .event .ContextClosedEvent ;
37- import org .springframework .context .event .EventListener ;
3834
3935/**
4036 * Auto configuration for Kubernetes.
@@ -121,13 +117,4 @@ public Fabric8PodUtils kubernetesPodUtils(KubernetesClient client) {
121117 return new Fabric8PodUtils (client );
122118 }
123119
124- @ EventListener
125- void onContextClosed (ContextClosedEvent event ) {
126- // Clean up any open connections from the KubernetesClient when the context is
127- // closed
128- BeanFactoryUtils .beansOfTypeIncludingAncestors (event .getApplicationContext (), KubernetesClient .class )
129- .values ()
130- .forEach (Client ::close );
131- }
132-
133120}
You can’t perform that action at this time.
0 commit comments