asynkron / protoactor-dotnet

Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
http://proto.actor
Apache License 2.0
1.74k stars 288 forks source link

Add support for an Advertised Host other than PodIP when using Kubernetes cluster provider #2097

Closed AdamCLarsen closed 9 months ago

AdamCLarsen commented 9 months ago

Description

This PR introduces an enhancement to the Kubernetes cluster provider to allow an advertised host to be added as a Pod label, when not using the PodIP. This feature for scenarios where the fully qualified domain name (FQDN) is needed, for example, when using TLS to secure the communications within the cluster. This change include logic to detected the pod subdomain, namespace, and cluster domain, to attempt to keep the hostname stored in the label under k8s's max length of 63 chars for Pod Label values.

When workloads of type Deployment are joining the Proto.Actor cluster, it is recommended to create a headless services definition, and to also add a spec.subdomain to the Pod definition that matches the name of the assigned headless service. See examples/ClusterK8sGrains for a working example.

Purpose

This pull request is a:

Checklist