moremind commented on code in PR #5784:
URL: https://github.com/apache/shenyu/pull/5784#discussion_r1842354202


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/config/KubernetesConfiguration.java:
##########
@@ -21,52 +21,60 @@
 import io.kubernetes.client.openapi.apis.AppsV1Api;
 import io.kubernetes.client.util.Config;
 import org.apache.shenyu.admin.config.properties.DeploymentProperties;
+import org.apache.shenyu.admin.scale.scaler.KubernetesScaler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import 
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.util.Optional;
 
 @Configuration
 @EnableConfigurationProperties(DeploymentProperties.class)
 public class KubernetesConfiguration {
 
+    private final Logger logger = 
LoggerFactory.getLogger(KubernetesConfiguration.class);
+
     /**
      * kubernetes apiClient.
+     *
      * @param deploymentProperties deploymentProperties
      * @return AppsV1Api
      */
     @Bean
+    @ConditionalOnProperty(value = {"shenyu.k8s.scale.enabled"}, havingValue = 
"true")

Review Comment:
   remove {}



##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/scale/config/ScaleProperties.java:
##########
@@ -24,10 +24,30 @@
 @ConfigurationProperties(prefix = "shenyu.k8s.scale")
 public class ScaleProperties {
 
+    private boolean enabled;

Review Comment:
   may give default value, for example false or true



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to