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:
rkarg-blizz
2024-02-26 15:56:13 -08:00
committed by GitHub
parent c15d79d96d
commit 93140a6d8c
5 changed files with 5 additions and 100 deletions

View File

@@ -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);
}
}
}
}

View File

@@ -1,7 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
</Project>