Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Conversation

adarshaj
Copy link

this PR introduces dynamically setting (by eval-ing the env var) JAVA_OPTS (similar to lightbend's reactive-app) and istio mesh setup as described in workaround at akka/akka-management#209 (comment)

* Update to latest version of akka-management
* Include workarounds to make cluster bootstrap work with istio as documented in akka/akka-management#209 (comment)
@adarshaj
Copy link
Author

This has been tested to work with minikube with k8s version v1.12.1 with istio setup without mutual TLS (as described in quickstart) and automatic sidecar injection.

apiVersion: v1
fieldPath: status.podIP
- name: "DYN_JAVA_OPTS"
value: "-Dakka.remote.netty.tcp.hostname=${HOSTNAME//./-}.default.pod.cluster.local -Dakka.management.http.hostname=${HOSTNAME//./-}.default.pod.cluster.local"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the replace necessary? Is it even possible to have dot in the pod hostname? I think if you try to create a pod with dot within the name you get the error: a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character

Copy link
Author

@adarshaj adarshaj Dec 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkocur - Yes, replacement is necessary. It is actually the IP address which has dots, which is being replaced by hyphens (so 127.0.0.1 would become 127-0-0-1..). HOSTNAME env variable is infact set in the previous line just above this one. This way of translation of pod IP to pod's dns is defined by kubernetes.

@adarshaj
Copy link
Author

@gkocur - Could you pls let me know if this needs more work or if i wasn't clear explaining the need to replace?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants