Skip to content

Commit

Permalink
feat: Use Pekko (#44)
Browse files Browse the repository at this point in the history
Release-As: 1.7.0-rc1

feat: switch to pekko

feat: use native leases

feat: separate liveness cehck
  • Loading branch information
antoninguyot authored Jan 24, 2025
1 parent 178a4b7 commit 2bfff44
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 43 deletions.
30 changes: 18 additions & 12 deletions config/akka.conf → config/pekko.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Akka configurations
akka {
extensions = ["akka.cluster.pubsub.DistributedPubSub"]
pekko {
extensions = ["org.apache.pekko.cluster.pubsub.DistributedPubSub"]
log-dead-letters = off
log-dead-letters-during-shutdown = off
http.parsing.max-uri-length = 64k
actor {
provider = cluster
serialize-messages = on
serializers {
proto = "akka.remote.serialization.ProtobufSerializer"
proto = "org.apache.pekko.remote.serialization.ProtobufSerializer"
}
serialization-bindings {
"actors.serializer.Serializable" = proto
Expand All @@ -30,6 +30,7 @@ akka {
}
discovery {
kubernetes-api {
use-raw-ip = {{ .Values.podsDirectConnect }}
pod-namespace = "{{ .Release.Namespace }}"
pod-label-selector = "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
}
Expand All @@ -38,18 +39,18 @@ akka {
http {
hostname = ${?HOSTNAME}
bind-hostname = 0.0.0.0
port = 8558
bind-port = 8558
port = 7626
bind-port = 7626
}
health-checks {
readiness-checks {
stream = "healthcheck.StreamHealthCheck"
stream = "healthcheck.StreamReadinessCheck"
}
liveness-checks {
stream = "healthcheck.StreamLivenessCheck"
}
}
cluster.bootstrap {
contact-point {
connect-by-ip = {{ .Values.podsDirectConnect }}
}
contact-point-discovery {
discovery-method = kubernetes-api
port-name = management
Expand All @@ -63,16 +64,16 @@ akka {
}
}
cluster {
downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider"
downing-provider-class = "org.apache.pekko.cluster.sbr.SplitBrainResolverProvider"
{{- if .Values.leases.enabled }}
split-brain-resolver {
active-strategy = "lease-majority"
lease-majority {
lease-implementation = "akka.coordination.lease.kubernetes"
lease-implementation = "pekko.coordination.lease.kubernetes"
}
}
singleton {
use-lease = "akka.coordination.lease.kubernetes"
use-lease = "pekko.coordination.lease.kubernetes"
}
{{- end }}
shutdown-after-unsuccessful-join-seed-nodes = 60s
Expand All @@ -82,5 +83,10 @@ akka {
send-to-dead-letters-when-no-subscribers = on
}
}
{{- if .Values.leases.enabled }}
coordination.lease.kubernetes {
lease-class = "org.apache.pekko.coordination.lease.kubernetes.NativeKubernetesLease"
}
{{- end }}
coordinated-shutdown.exit-jvm = off
}
29 changes: 0 additions & 29 deletions crds/leases.yml

This file was deleted.

2 changes: 1 addition & 1 deletion templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ spec:
- name: https
containerPort: 9443
- name: management
containerPort: 8558
containerPort: 7626
- name: artery
containerPort: 25520
{{- if .Values.sidecars }}
Expand Down
2 changes: 1 addition & 1 deletion templates/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "common.names.fullname" . }}-lease-updater
rules:
- apiGroups: [ "akka.io" ]
- apiGroups: [ "coordination.k8s.io" ]
resources: [ "leases" ]
verbs: [ "get", "create", "update", "list", "delete" ]
---
Expand Down

0 comments on commit 2bfff44

Please sign in to comment.