This repository was archived by the owner on May 25, 2023. It is now read-only.
Conversation
Fixes #183 For the purpose of Akka Cluster Bootstrap, a specialized label `akka.lightbend.com/service-name` defined. This denotes the Akka Cluster to join when a pod comes up. - The value of the this label will default to either the app name or the app version name depending on the deployment type. - It can be overridden by user using `akkaClusterBootstrapSystemName` setting as described in https://developer.lightbend.com/docs/lightbend-orchestration/current/features/akka-cluster-bootstrap.html. - Deployment pods are labeled with `"akka.lightbend.com/service-name": "friendimpl"` etc - The label selector is overridden as `-Dakka.discovery.kubernetes-api.pod-label-selector=akka.lightbend.com/service-name=%s` (as opposed to using `app=%s`) - The effective name is overridden as `-Dakka.management.cluster.bootstrap.contact-point-discovery.effective-name=friendimpl` etc
TimMoore
reviewed
Feb 5, 2019
| "labels" -> Json( | ||
| "appName" -> appName.asJson), | ||
| "app" -> appName.asJson), | ||
| "name" -> appName.asJson) |
There was a problem hiding this comment.
Doesn't the name need to be serviceResourceName in case they differ?
Contributor
Author
There was a problem hiding this comment.
I am not sure if the word "service" in serviceResourceName means Kubernetes Service.
I think the intended purpose is to change the name of the Deployment service so when someone changes the version of the app, it would form a new cluster by creating a fresh one.
There was a problem hiding this comment.
It's used to query the service by name, isn't it?
Contributor
Author
There was a problem hiding this comment.
For example when a Lagom service wants to query another Lagom service via DNS?
In that case I'd say you want appName.asJson instead of serviceResourceName that can potentially be name + version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #183
Ref akka/akka-management#411
First,
appNamelabel is renamed to a more commonly usedapplabel, aligning with standards and Akka Management docs. This will stay sinceappis used in different contexts other than Akka Cluster Bootstrap, for exampleServiceresource uses label:For the purpose of Akka Cluster Bootstrap, however, a specialized label
akka.lightbend.com/service-nameis defined. This denotes the Akka Cluster to join when a pod comes up.akkaClusterBootstrapSystemNamesetting as described in https://developer.lightbend.com/docs/lightbend-orchestration/current/features/akka-cluster-bootstrap.html."akka.lightbend.com/service-name": "friendimpl"etc-Dakka.discovery.kubernetes-api.pod-label-selector=akka.lightbend.com/service-name=%s(as opposed to usingapp=%s)-Dakka.management.cluster.bootstrap.contact-point-discovery.effective-name=friendimpletc./cc @lightbend/play-team