Skip to content

Commit

Permalink
actorsystem の名前と pod 名を合わせた
Browse files Browse the repository at this point in the history
  • Loading branch information
kuramapommel committed Nov 26, 2024
1 parent a51c7c9 commit c182507
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions sample/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ version: "3.8"
# アンカーを用いてすべてのコンテナに共通の環境変数をまとめて定義する
x-environment: &seed-nodes-environment
SEED_PORT: 2551
SEED_NODES.0: "akka://ClusterSystem@node1:2551"
SEED_NODES.1: "akka://ClusterSystem@node2:2551"
SEED_NODES.2: "akka://ClusterSystem@node3:2551"
SEED_NODES.0: "akka://til-akka-typed@node1:2551"
SEED_NODES.1: "akka://til-akka-typed@node2:2551"
SEED_NODES.2: "akka://til-akka-typed@node3:2551"

services:
node1:
Expand Down
16 changes: 8 additions & 8 deletions sample/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ metadata:
spec:
selector:
matchLabels:
app: node1
app: til-akka-typed
serviceName: "til-akka-typed-service"
replicas: 3
template:
metadata:
labels:
app: node1
app: til-akka-typed
spec:
containers:
- name: node1
- name: til-akka-typed
image: kuramapommel/til-akka-typed:latest
ports:
- containerPort: 8080
Expand All @@ -28,11 +28,11 @@ spec:
- name: HTTP_PORT
value: "8080"
- name: SEED_NODES.0
value: "akka://ClusterSystem@til-akka-typed-stateful-set-0.til-akka-typed-service:2551"
value: "akka://til-akka-typed@til-akka-typed-stateful-set-0.til-akka-typed-service:2551"
- name: SEED_NODES.1
value: "akka://ClusterSystem@til-akka-typed-stateful-set-1.til-akka-typed-service:2551"
value: "akka://til-akka-typed@til-akka-typed-stateful-set-1.til-akka-typed-service:2551"
- name: SEED_NODES.2
value: "akka://ClusterSystem@til-akka-typed-stateful-set-2.til-akka-typed-service:2551"
value: "akka://til-akka-typed@til-akka-typed-stateful-set-2.til-akka-typed-service:2551"
- name: DYNAMODB_HOST
value: "dynamodb-local-service.default.svc.cluster.local"
- name: DYNAMODB_PORT
Expand All @@ -54,7 +54,7 @@ spec:
targetPort: 2551
protocol: TCP
selector:
app: node1
app: til-akka-typed

---
apiVersion: v1
Expand All @@ -69,7 +69,7 @@ spec:
protocol: TCP
nodePort: 30080
selector:
app: node1
app: til-akka-typed

---
apiVersion: apps/v1
Expand Down
2 changes: 1 addition & 1 deletion sample/minikube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
protocol: TCP
nodePort: 31080
selector:
app: node1
app: til-akka-typed

---
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def startHttpServer(routes: Route)(using system: ActorSystem[?]): Unit =
startHttpServer(routes.routes)

Behaviors.empty
val system = ActorSystem[Nothing](rootBehavior, "ClusterSystem")
val system = ActorSystem[Nothing](rootBehavior, "til-akka-typed")
// #server-bootstrapping

AkkaManagement(system).start()
Expand Down

0 comments on commit c182507

Please sign in to comment.