Exemplo n.º 1
0
        private static IKubernetes CreateKubernetesClient(KubernetesSettings settings)
        {
            var k8sClientConfig = KubernetesClientConfiguration.InClusterConfig();

            k8sClientConfig.Namespace = settings.KubernetesNamespace;
            return(new Kubernetes(k8sClientConfig));
        }
Exemplo n.º 2
0
        public KubernetesDiscoveryService(IKubernetes kubernetesClient, KubernetesSettings settings) : base(settings)
        {
            this.actorSystemName = ((ExtendedActorSystem)Context.System).Provider.DefaultAddress.System;
            this.k8s             = kubernetesClient;
            this.settings        = settings;

            labelSelector = $"akka-cluster={actorSystemName}";
            if (!string.IsNullOrWhiteSpace(settings.LabelSelector))
            {
                labelSelector = settings.LabelSelector;
            }
        }
Exemplo n.º 3
0
 public KubernetesDiscoveryService(KubernetesSettings settings)
     : this(CreateKubernetesClient(settings), settings)
 {
 }