Merge "Remove Consul configuration decoding"
diff --git a/hv-collector-main/Dockerfile b/hv-collector-main/Dockerfile
index 8049abc..0170b64 100644
--- a/hv-collector-main/Dockerfile
+++ b/hv-collector-main/Dockerfile
@@ -15,4 +15,5 @@
 
 COPY target/libs/external/* ./
 COPY target/libs/internal/* ./
+COPY src/main/scripts/healthcheck.sh ./
 COPY target/hv-collector-main-*.jar ./
diff --git a/hv-collector-main/src/main/scripts/healthcheck.sh b/hv-collector-main/src/main/scripts/healthcheck.sh
new file mode 100755
index 0000000..db62eec
--- /dev/null
+++ b/hv-collector-main/src/main/scripts/healthcheck.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+curl -f http://localhost:${VESHV_HEALTH_CHECK_API_PORT:-6060}/health/ready || exit 1
+nc -vz localhost ${VESHV_LISTEN_PORT:-6061} || exit 2
diff --git a/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt
index 8df416c..57aaf3d 100644
--- a/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt
+++ b/hv-collector-xnf-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/xnf/impl/adapters/VesHvClient.kt
@@ -20,10 +20,8 @@
 package org.onap.dcae.collectors.veshv.simulators.xnf.impl.adapters
 
 import arrow.core.Option
-import io.netty.handler.ssl.ClientAuth
+import arrow.core.getOrElse
 import io.netty.handler.ssl.SslContext
-import io.netty.handler.ssl.SslContextBuilder
-import io.netty.handler.ssl.SslProvider
 import org.onap.dcae.collectors.veshv.domain.WireFrameMessage
 import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration
 import org.onap.dcae.collectors.veshv.domain.WireFrameEncoder
@@ -47,9 +45,12 @@
     private val client: TcpClient = TcpClient.create()
             .host(configuration.vesHost)
             .port(configuration.vesPort)
-            .secure { sslSpec ->
-                createSslContext(configuration.security).fold({}, sslSpec::sslContext)
-            }
+            .configureSsl()
+
+    private fun TcpClient.configureSsl() =
+            createSslContext(configuration.security)
+                    .map { sslContext -> this.secure(sslContext) }
+                    .getOrElse { this }
 
     fun sendIo(messages: Flux<WireFrameMessage>) =
             sendRx(messages).then(Mono.just(Unit)).asIo()
diff --git a/pom.xml b/pom.xml
index f54e4c1..71a754c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,6 +89,7 @@
         <docker-image.registry>${onap.nexus.dockerregistry.daily}</docker-image.registry>
         <docker-image.namespace>onap</docker-image.namespace>
         <docker-image.name>${project.groupId}.${project.artifactId}</docker-image.name>
+        <docker-image.latest>1.1-SNAPSHOT</docker-image.latest>
         <docker.http_proxy/>
 
     </properties>
@@ -453,7 +454,7 @@
                                             <tags>
                                                 <tag>${project.version}-${maven.build.timestamp}Z</tag>
                                                 <tag>${project.version}</tag>
-                                                <tag>latest</tag>
+                                                <tag>${docker-image.latest}</tag>
                                             </tags>
                                         </build>
                                     </image>