org.zodiac.autoconfigure.kubernetes.istio.IstioAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.kubernetes.istio;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
@SpringBootConfiguration
@ConditionalOnClass(value = {io.fabric8.kubernetes.client.Config.class, me.snowdrop.istio.client.IstioClient.class})
@ConditionalOnProperty(value = org.zodic.kubernetes.base.constants.KubernetesSystemPropertiesConstants.SPRING_ISTIO_ENABLED, havingValue = "true")
public class IstioAutoConfiguration {
@Bean
@ConditionalOnMissingBean
protected me.snowdrop.istio.client.IstioClient istioClient(io.fabric8.kubernetes.client.Config config) {
return new me.snowdrop.istio.client.DefaultIstioClient(config);
}
}