Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Discovery.KubernetesApi to support multi-config #2596

Conversation

Arkatufus
Copy link
Contributor

Changes

  • Add Akka.Hosting support
  • Add multi-config support
    • Make discovery plugin id configurable (was hardcoded)
    • Automatically generate default config fallback for each named discovery id
    • Only plugin with IsDefaultPlugin set to true will be used as akka.discovery.method value

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -14,6 +18,31 @@ internal static class ConfigExtensions
var value = config.GetString(key);
return string.IsNullOrWhiteSpace(value) || value.Equals($"<{key}>") ? null : value;
}

internal static Configuration.Config MoveTo(this Configuration.Config config, string path)
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same method from the Azure plugin you were working on?

{
}

public KubernetesApiServiceDiscovery(ExtendedActorSystem system, Configuration.Config config)
Copy link
Member

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@@ -35,7 +34,7 @@ public class KubernetesDiscoveryOptions: IHoconOption
public void Apply(AkkaConfigurationBuilder builder, Setup? setup = null)
{
var sb = new StringBuilder();
sb.AppendLine($"{FullPath} {{");
sb.AppendLine($"{KubernetesApiServiceDiscovery.FullPath(ConfigPath)} {{");
Copy link
Member

Choose a reason for hiding this comment

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

LGTM - looks like we made the pathing more dynamic all-around here.

@Aaronontheweb Aaronontheweb merged commit 6d5402d into akkadotnet:dev Jun 27, 2024
3 checks passed
@Arkatufus Arkatufus deleted the update-discovery-kubernetes-for-multi-config branch July 15, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants