From fc7e9c7a69f5ddc715c7df4f3cb98aecd30e449f Mon Sep 17 00:00:00 2001 From: Adarsh J Date: Tue, 20 Nov 2018 05:55:59 +0530 Subject: [PATCH] Add support for istio mesh cluster bootstrap * Update to latest version of akka-management * Include workarounds to make cluster bootstrap work with istio as documented in https://github.com/akka/akka-management/issues/209#issuecomment-398419324 --- build.sbt | 2 +- k8s/istio-mesh-routing.yaml | 16 ++++++++++++++++ k8s/simple-akka-cluster-service-clusterIP.yml | 16 ++++++++++++++++ ... => simple-akka-cluster-service-nodePort.yml} | 2 +- 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 k8s/istio-mesh-routing.yaml create mode 100644 k8s/simple-akka-cluster-service-clusterIP.yml rename k8s/{simple-akka-cluster-service.yml => simple-akka-cluster-service-nodePort.yml} (93%) diff --git a/build.sbt b/build.sbt index c3c1695..b563c01 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ enablePlugins(JavaServerAppPackaging, DockerPlugin) val akkaVersion = "2.5.17" val akkaHttpVersion = "10.1.5" -val akkaManagementVersion = "0.18.0" +val akkaManagementVersion = "0.19.0" libraryDependencies ++=Seq( "com.typesafe.akka" %% "akka-persistence" % akkaVersion, diff --git a/k8s/istio-mesh-routing.yaml b/k8s/istio-mesh-routing.yaml new file mode 100644 index 0000000..40ee5c7 --- /dev/null +++ b/k8s/istio-mesh-routing.yaml @@ -0,0 +1,16 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: akka-simple-cluster +spec: + hosts: + - "*.default.pod.cluster.local" + location: MESH_INTERNAL + ports: + - number: 2551 + name: "remoting" + protocol: TCP + - number: 8558 + name: "management" + protocol: HTTP + resolution: NONE diff --git a/k8s/simple-akka-cluster-service-clusterIP.yml b/k8s/simple-akka-cluster-service-clusterIP.yml new file mode 100644 index 0000000..cc49097 --- /dev/null +++ b/k8s/simple-akka-cluster-service-clusterIP.yml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: akka-simple-cluster-cluster-ip +spec: + ports: + - name: remoting + port: 2551 + protocol: TCP + targetPort: 2551 + - name: management + port: 8558 + protocol: TCP + targetPort: 8558 + selector: + app: akka-simple-cluster diff --git a/k8s/simple-akka-cluster-service.yml b/k8s/simple-akka-cluster-service-nodePort.yml similarity index 93% rename from k8s/simple-akka-cluster-service.yml rename to k8s/simple-akka-cluster-service-nodePort.yml index 782fb98..a2c2aee 100644 --- a/k8s/simple-akka-cluster-service.yml +++ b/k8s/simple-akka-cluster-service-nodePort.yml @@ -14,4 +14,4 @@ spec: - protocol: TCP name: api port: 8080 - targetPort: api \ No newline at end of file + targetPort: api