Removing prometheus-net dependency (#1526)
* Update README.md * Update KubernetesClient.csproj * Delete examples/prometheus directory * Delete src/KubernetesClient/PrometheusHandler.cs
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
using k8s;
|
||||
using Prometheus;
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace prom
|
||||
{
|
||||
internal class Prometheus
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
var config = KubernetesClientConfiguration.BuildDefaultConfig();
|
||||
var handler = new PrometheusHandler();
|
||||
IKubernetes client = new Kubernetes(config, handler);
|
||||
|
||||
var server = new MetricServer(hostname: "localhost", port: 1234);
|
||||
server.Start();
|
||||
|
||||
Console.WriteLine("Making requests!");
|
||||
while (true)
|
||||
{
|
||||
client.CoreV1.ListNamespacedPod("default");
|
||||
client.CoreV1.ListNode();
|
||||
client.AppsV1.ListNamespacedDeployment("default");
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user