public K8sService(InstrumentationClient instrumentationClient)
        {
            var configFilePath = System.Environment.GetEnvironmentVariable("K8S_CONFIG_FILEPATH");

            if (!string.IsNullOrWhiteSpace(configFilePath))
            {
                k8s = new Kubernetes(KubernetesClientConfiguration.BuildConfigFromConfigFile(configFilePath));
            }
            else
            {
                k8s = new Kubernetes(KubernetesClientConfiguration.BuildConfigFromConfigFile());
            }

            this.Logger = instrumentationClient;
        }
Beispiel #2
0
 public CliRunner(
     InstrumentationClient instrumentationClient,
     IServiceProvider services)
 {
     if (instrumentationClient is null)
     {
         throw new ArgumentNullException(nameof(instrumentationClient));
     }
     deserializer = new DeserializerBuilder()
                    .WithNamingConvention(CamelCaseNamingConvention.Instance)
                    .IgnoreUnmatchedProperties()
                    .Build();
     this.instrumentationClient = instrumentationClient;
     this.services = services ?? throw new ArgumentNullException(nameof(services));
 }
Beispiel #3
0
 public ExportFileSystem(ExportOptions exOpts, InstrumentationClient logger)
 {
     this.exOpts   = exOpts;
     this.IcClient = logger;
 }