5252import static org .springframework .cloud .kubernetes .client .KubernetesClientUtils .getApplicationNamespace ;
5353
5454/**
55- * This one uses: 'ConditionalOnBlockingOrReactiveDiscoveryEnabled' because beans it contains
56- * are specific to both clients.
55+ * This one uses: 'ConditionalOnBlockingOrReactiveDiscoveryEnabled' because beans it
56+ * contains are specific to both clients.
57+ *
5758 * @author wind57
5859 */
5960@ Configuration (proxyBeanMethods = false )
6667final class KubernetesClientInformerAutoConfiguration {
6768
6869 private static final LogAccessor LOG = new LogAccessor (
69- LogFactory .getLog (KubernetesClientInformerAutoConfiguration .class ));
70+ LogFactory .getLog (KubernetesClientInformerAutoConfiguration .class ));
7071
7172 // we rely on the order of namespaces to enable listers, as such provide a bean of
7273 // namespaces as a list, instead of the incoming Set.
@@ -104,16 +105,16 @@ List<SharedInformerFactory> sharedInformerFactories(ApiClient apiClient, List<St
104105
105106 @ Bean
106107 @ ConditionalOnMissingBean (value = V1Service .class ,
107- parameterizedContainer = { List .class , SharedIndexInformer .class })
108+ parameterizedContainer = { List .class , SharedIndexInformer .class })
108109 List <SharedIndexInformer <V1Service >> serviceSharedIndexInformers (
109- List <SharedInformerFactory > sharedInformerFactories , List <String > selectiveNamespaces ,
110- ApiClient apiClient ) {
110+ List <SharedInformerFactory > sharedInformerFactories , List <String > selectiveNamespaces ,
111+ ApiClient apiClient ) {
111112
112113 int howManyNamespaces = selectiveNamespaces .size ();
113114 List <SharedIndexInformer <V1Service >> serviceSharedIndexedInformers = new ArrayList <>(howManyNamespaces );
114115 for (int i = 0 ; i < howManyNamespaces ; ++i ) {
115116 GenericKubernetesApi <V1Service , V1ServiceList > servicesApi = new GenericKubernetesApi <>(V1Service .class ,
116- V1ServiceList .class , "" , "v1" , "services" , apiClient );
117+ V1ServiceList .class , "" , "v1" , "services" , apiClient );
117118 SharedIndexInformer <V1Service > sharedIndexInformer = sharedInformerFactories .get (i )
118119 .sharedIndexInformerFor (servicesApi , V1Service .class , 0L , selectiveNamespaces .get (i ));
119120 serviceSharedIndexedInformers .add (sharedIndexInformer );
@@ -124,7 +125,7 @@ List<SharedIndexInformer<V1Service>> serviceSharedIndexInformers(
124125 @ Bean
125126 @ ConditionalOnMissingBean (value = V1Service .class , parameterizedContainer = { List .class , Lister .class })
126127 List <Lister <V1Service >> serviceListers (List <String > selectiveNamespaces ,
127- List <SharedIndexInformer <V1Service >> serviceSharedIndexInformers ) {
128+ List <SharedIndexInformer <V1Service >> serviceSharedIndexInformers ) {
128129
129130 int howManyNamespaces = selectiveNamespaces .size ();
130131 List <Lister <V1Service >> serviceListers = new ArrayList <>(howManyNamespaces );
@@ -141,16 +142,16 @@ List<Lister<V1Service>> serviceListers(List<String> selectiveNamespaces,
141142
142143 @ Bean
143144 @ ConditionalOnMissingBean (value = V1Endpoints .class ,
144- parameterizedContainer = { List .class , SharedIndexInformer .class })
145+ parameterizedContainer = { List .class , SharedIndexInformer .class })
145146 List <SharedIndexInformer <V1Endpoints >> endpointsSharedIndexInformers (
146- List <SharedInformerFactory > sharedInformerFactories , List <String > selectiveNamespaces ,
147- ApiClient apiClient ) {
147+ List <SharedInformerFactory > sharedInformerFactories , List <String > selectiveNamespaces ,
148+ ApiClient apiClient ) {
148149
149150 int howManyNamespaces = selectiveNamespaces .size ();
150151 List <SharedIndexInformer <V1Endpoints >> endpointsSharedIndexedInformers = new ArrayList <>(howManyNamespaces );
151152 for (int i = 0 ; i < howManyNamespaces ; ++i ) {
152153 GenericKubernetesApi <V1Endpoints , V1EndpointsList > endpointsApi = new GenericKubernetesApi <>(
153- V1Endpoints .class , V1EndpointsList .class , "" , "v1" , "endpoints" , apiClient );
154+ V1Endpoints .class , V1EndpointsList .class , "" , "v1" , "endpoints" , apiClient );
154155 SharedIndexInformer <V1Endpoints > sharedIndexInformer = sharedInformerFactories .get (i )
155156 .sharedIndexInformerFor (endpointsApi , V1Endpoints .class , 0L , selectiveNamespaces .get (i ));
156157 endpointsSharedIndexedInformers .add (sharedIndexInformer );
@@ -161,7 +162,7 @@ List<SharedIndexInformer<V1Endpoints>> endpointsSharedIndexInformers(
161162 @ Bean
162163 @ ConditionalOnMissingBean (value = V1Endpoints .class , parameterizedContainer = { List .class , Lister .class })
163164 List <Lister <V1Endpoints >> endpointsListers (List <String > selectiveNamespaces ,
164- List <SharedIndexInformer <V1Endpoints >> serviceSharedIndexInformers ) {
165+ List <SharedIndexInformer <V1Endpoints >> serviceSharedIndexInformers ) {
165166
166167 int howManyNamespaces = selectiveNamespaces .size ();
167168 List <Lister <V1Endpoints >> endpointsListers = new ArrayList <>(howManyNamespaces );
0 commit comments