Skip to content

Commit

Permalink
Add selector label for Helm Release (#2)
Browse files Browse the repository at this point in the history
* add label for helm release selector

* inject the actor system name from the helm instance annotation
  • Loading branch information
antoninguyot authored Jul 11, 2024
1 parent f8948ae commit 238243c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/akka.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ akka {
discovery {
kubernetes-api {
pod-namespace = "{{ .Release.Namespace }}"
pod-label-selector = "app.kubernetes.io/name={{ include "common.names.name" . }}"
pod-label-selector = "app.kubernetes.io/name={{ include "common.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
}
}
management {
Expand Down Expand Up @@ -83,4 +83,4 @@ akka {
}
}
coordinated-shutdown.exit-jvm = off
}
}
5 changes: 5 additions & 0 deletions templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ spec:
apiVersion: v1
fieldPath: status.podIP
{{- end }}
# Inject the actor system name from the Helm release name
- name: AKKA_ACTOR_SYSTEM
valueFrom:
fieldRef:
fieldPath : metadata.labels['app.kubernetes.io/instance']
- name: LICENSE
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit 238243c

Please sign in to comment.