risdenk commented on a change in pull request #267: KNOX-2238 CM discovery -
Add TLS support to Phoenix auto discovery
URL: https://github.com/apache/knox/pull/267#discussion_r381293198
##########
File path:
gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/phoenix/PhoenixServiceModelGenerator.java
##########
@@ -58,14 +59,24 @@ public ServiceModel generateService(ApiService
service,
ApiServiceConfig serviceConfig,
ApiRole role,
ApiConfigList roleConfig) {
+
String hostname = role.getHostRef().getHostname();
- // Phoenix Query Server does not support https
+ String sslEnabledRaw = getRoleConfigValue(roleConfig, SSL_ENABLED);
String scheme = "http";
+
+ if (sslEnabledRaw != null) {
+ if (Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED))) {
Review comment:
If you are going to keep `sslEnabledRaw` - then no need to `null` check here
and should use `sslEnabledRaw` inside the `parseBoolean`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services