Skip to content

Implement KubectlTop for node and pod metrics - #1703

Merged
k8s-ci-robot merged 3 commits into
masterfrom
copilot/implement-kubectl-top
Dec 12, 2025
Merged

k8s-ci-robot merged 3 commits into
masterfrom
copilot/implement-kubectl-top

Conversation

Copilot AI commented Dec 12, 2025 •

Copy link
Copy Markdown
Contributor

Adds kubectl top functionality to retrieve and sort node/pod metrics by CPU or memory usage, similar to the Java client implementation.

Changes

  • AsyncKubectl.Top.cs: Async methods for retrieving sorted metrics

    • TopNodesAsync(metric, cancellationToken) - nodes sorted by capacity percentage
    • TopPodsAsync(namespace, metric, cancellationToken) - pods sorted by container sum
    • ResourceMetrics<TResource, TMetrics> class pairs resources with their metrics
  • Kubectl.Top.cs: Synchronous wrappers for TopNodes() and TopPods()

  • KubectlTests.Top.cs: Test coverage for both metrics, sorting validation, error cases

  • examples/metrics: Updated to demonstrate KubectlTop usage

Usage

var kubectl = new Kubectl(client);

// Get top nodes by CPU usage (sorted by % of capacity)
var topNodes = kubectl.TopNodes("cpu");
foreach (var item in topNodes)
{
    var cpuUsage = item.Metrics.Usage["cpu"];
    var cpuCapacity = item.Resource.Status.Capacity["cpu"];
    Console.WriteLine($"{item.Resource.Metadata.Name}: {cpuUsage} / {cpuCapacity}");
}

// Get top pods by memory usage (sorted by sum across containers)
var topPods = kubectl.TopPods("kube-system", "memory");
foreach (var item in topPods)
{
    var memSum = item.Metrics.Containers.Sum(c => c.Usage["memory"].ToDouble());
    Console.WriteLine($"{item.Resource.Metadata.Name}: {memSum} bytes");
}

Leverages existing GetKubernetesNodesMetricsAsync() and GetKubernetesPodsMetricsByNamespaceAsync() extension methods.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • crl.comodoca.com
    • Triggering command: /home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet /home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet restore --no-dependencies /home/REDACTED/work/csharp/csharp/src/KubernetesClient.Classic/KubernetesClient.Classic.csproj --packages /home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot emblyInfo.cs chTe�� ernetesYamlTests0 ializationTests.-j kAssert.cs cAuthTests.cs ernetesClientConfigurationTests.cs OrStringTests.cs ernalExecutionTests.cs (dns block)
  • ocsp.comodoca.com
    • Triggering command: /home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet /home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/.dotnet/dotnet restore --no-dependencies /home/REDACTED/work/csharp/csharp/src/KubernetesClient.Classic/KubernetesClient.Classic.csproj --packages /home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/home/REDACTED/work/csharp/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot emblyInfo.cs chTe�� ernetesYamlTests0 ializationTests.-j kAssert.cs cAuthTests.cs ernetesClientConfigurationTests.cs OrStringTests.cs ernalExecutionTests.cs (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement KubectlTop</issue_title>
<issue_description>Similar to:
https://github.com/kubernetes-client/java/blob/master/extended/src/main/java/io/kubernetes/client/extended/kubectl/KubectlTop.java

And:
https://kubernetes.io/docs/reference/kubectl/generated/kubectl_top/

We should implement the ability to get top pod and node metrics along dimensions like CPU and Memory.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 12, 2025
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 12, 2025
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 12, 2025
Copilot AI changed the title [WIP] Implement function to get top pod and node metrics Implement KubectlTop for node and pod metrics Dec 12, 2025
Copilot AI requested a review from brendandburns December 12, 2025 17:28
@brendandburns
brendandburns marked this pull request as ready for review December 12, 2025 17:35
Copilot AI review requested due to automatic review settings December 12, 2025 17:35
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 12, 2025
@k8s-ci-robot
k8s-ci-robot requested a review from tg123 December 12, 2025 17:35

@brendandburns brendandburns left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 12, 2025
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, Copilot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR implements kubectl top functionality for retrieving and sorting node and pod metrics by CPU or memory usage, similar to the Java Kubernetes client implementation. The implementation follows the established kubectl pattern of separating async and sync implementations across partial classes.

Key Changes

  • Adds TopNodesAsync and TopPodsAsync methods to retrieve metrics paired with resources and sort by capacity percentage (nodes) or container sum (pods)
  • Introduces ResourceMetrics<TResource, TMetrics> generic class to pair Kubernetes resources with their metrics
  • Provides comprehensive test coverage with sorting validation and error case handling

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/KubernetesClient.Kubectl/Beta/AsyncKubectl.Top.cs Implements async methods for retrieving and sorting node/pod metrics with ResourceMetrics class and calculation helpers
src/KubernetesClient.Kubectl/Beta/Kubectl.Top.cs Provides synchronous wrappers for TopNodes and TopPods using GetAwaiter().GetResult() pattern
tests/Kubectl.Tests/KubectlTests.Top.cs Comprehensive test coverage including sorting validation, error cases, and independent calculation verification
examples/metrics/metrics.csproj Adds Kubectl project reference to enable KubectlTop usage in examples
examples/metrics/Program.cs Demonstrates KubectlTop API usage alongside raw metrics API for comparison

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
}

async Task TopPods(Kubectl kubectl)

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

The TopPods method is synchronous but is being called from an async context. While this works, since TopPods is a synchronous wrapper around TopPodsAsync, it's inconsistent with the pattern used in the existing NodesMetrics and PodsMetrics functions which properly await async methods. Consider either using TopPodsAsync directly with await, or removing the async keyword from the TopPods function signature since it doesn't await anything.

Copilot uses AI. Check for mistakes.
var nodes = await client.CoreV1.ListNodeAsync(cancellationToken: cancellationToken).ConfigureAwait(false);

// Get node metrics
var nodeMetrics = await client.GetKubernetesNodesMetricsAsync().ConfigureAwait(false);

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

The GetKubernetesNodesMetricsAsync extension method doesn't accept a cancellationToken parameter, but the TopNodesAsync method receives one. The cancellationToken is only passed to ListNodeAsync but not to GetKubernetesNodesMetricsAsync, which means the metrics API call cannot be cancelled even when the caller requests cancellation. This creates an inconsistent cancellation behavior where only part of the operation can be cancelled.

Suggested change
var nodeMetrics = await client.GetKubernetesNodesMetricsAsync().ConfigureAwait(false);
var nodeMetrics = await client.GetKubernetesNodesMetricsAsync(cancellationToken).ConfigureAwait(false);

Copilot uses AI. Check for mistakes.
var pods = await client.CoreV1.ListNamespacedPodAsync(@namespace, cancellationToken: cancellationToken).ConfigureAwait(false);

// Get pod metrics for the namespace
var podMetrics = await client.GetKubernetesPodsMetricsByNamespaceAsync(@namespace).ConfigureAwait(false);

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

The GetKubernetesPodsMetricsByNamespaceAsync extension method doesn't accept a cancellationToken parameter, but the TopPodsAsync method receives one. The cancellationToken is only passed to ListNamespacedPodAsync but not to GetKubernetesPodsMetricsByNamespaceAsync, which means the metrics API call cannot be cancelled even when the caller requests cancellation. This creates an inconsistent cancellation behavior where only part of the operation can be cancelled.

Suggested change
var podMetrics = await client.GetKubernetesPodsMetricsByNamespaceAsync(@namespace).ConfigureAwait(false);
var podMetrics = await client.GetKubernetesPodsMetricsByNamespaceAsync(@namespace, cancellationToken).ConfigureAwait(false);

Copilot uses AI. Check for mistakes.
Comment on lines +185 to +187
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
Assert.Throws<ArgumentException>(() => client.TopPods(null, "cpu"));
#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

The pragma warning disable/restore is only needed around line 186. Line 184 doesn't require suppressing the nullable warning since string.Empty is not null. Consider moving the pragma directives to only wrap line 186, or use a nullable suppression operator (null!) on line 186 instead of pragma directives for better code clarity.

Suggested change
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
Assert.Throws<ArgumentException>(() => client.TopPods(null, "cpu"));
#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.
Assert.Throws<ArgumentException>(() => client.TopPods(null!, "cpu"));

Copilot uses AI. Check for mistakes.
}
}

async Task TopNodes(Kubectl kubectl)

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

The TopNodes method is synchronous but is being called from an async context. While this works, since TopNodes is a synchronous wrapper around TopNodesAsync, it's inconsistent with the pattern used in the existing NodesMetrics and PodsMetrics functions which properly await async methods. Consider either using TopNodesAsync directly with await, or removing the async keyword from the TopNodes function signature since it doesn't await anything.

Suggested change
async Task TopNodes(Kubectl kubectl)
void TopNodes(Kubectl kubectl)

Copilot uses AI. Check for mistakes.
Comment on lines +162 to +168
foreach (var container in podMetrics.Containers)
{
if (container?.Usage != null && container.Usage.TryGetValue(metric, out var value))
{
sum += value.ToDouble();
}
}

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
Comment on lines +223 to +229
foreach (var container in podMetrics.Containers)
{
if (container.Usage.TryGetValue("cpu", out var value))
{
sum += value.ToDouble();
}
}

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
Comment on lines +237 to +243
foreach (var container in podMetrics.Containers)
{
if (container.Usage.TryGetValue("memory", out var value))
{
sum += value.ToDouble();
}
}

Copilot AI Dec 12, 2025

Copy link

Choose a reason for hiding this comment

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

This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.

Copilot uses AI. Check for mistakes.
sei-jbooz pushed a commit to cmu-sei/Vm.Api that referenced this pull request Nov 20, 2026
Updated [KubernetesClient](https://github.com/kubernetes-client/csharp)
from 17.0.14 to 21.0.8.

<details>
<summary>Release notes</summary>

_Sourced from [KubernetesClient's
releases](https://github.com/kubernetes-client/csharp/releases)._

## 21.0.7

## What's Changed
* Bump Microsoft.Extensions.Logging to 10.0.12 by @​dependabot[bot] in
kubernetes-client/csharp#1901
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 10.0.400 to 10.0.401 by
@​dependabot[bot] in
kubernetes-client/csharp#1904
* Bump OpenTelemetry.Exporter.Console from 1.17.0 to 1.18.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1908
* Bump codecov/codecov-action from 7.0.0 to 7.1.1 by @​dependabot[bot]
in kubernetes-client/csharp#1916
* Bump Autofac and 2 others by @​dependabot[bot] in
kubernetes-client/csharp#1924
* Bump FluentAssertions from 8.10.0 to 8.11.0 by @​dependabot[bot] in
kubernetes-client/csharp#1925
* Bump Microsoft.VisualStudio.SlnGen from 12.0.32 to 12.0.53 by
@​dependabot[bot] in
kubernetes-client/csharp#1928
* Bump Microsoft.Extensions.Hosting from 10.0.11 to 10.0.12 by
@​dependabot[bot] in
kubernetes-client/csharp#1905
* Update generated client to Kubernetes v1.37 (SDK 21.0) by @​tg123 in
kubernetes-client/csharp#1889
* Bump Microsoft.NET.Test.Sdk from 18.9.0 to 18.10.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1926
* Bump Microsoft.SourceLink.GitHub from 10.0.301 to 10.0.401 by
@​dependabot[bot] in
kubernetes-client/csharp#1907
* Bump Microsoft.TestPlatform.ObjectModel from 18.6.0 to 18.10.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1927
* Use NuGet Trusted Publishing for nuget.org releases by @​brendandburns
with @​Copilot in kubernetes-client/csharp#1943
* Bump nunit/docfx-action from 4.1.0 to 5.0.0 by @​dependabot[bot] in
kubernetes-client/csharp#1939
* Bump WireMock.Net from 2.6.0 to 2.18.0 by @​dependabot[bot] in
kubernetes-client/csharp#1938
* Bump OpenTelemetry.Exporter.Console from 1.18.0 to 1.19.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1931


**Full Changelog**:
kubernetes-client/csharp@v20.0.103...v21.0.7

## 20.0.103

## What's Changed
* Bump Microsoft.SourceLink.GitHub from 10.0.300 to 10.0.301 by
@​dependabot[bot] in
kubernetes-client/csharp#1870
* Bump Microsoft.Extensions.Logging from 10.0.9 to 10.0.10 by
@​dependabot[bot] in
kubernetes-client/csharp#1868
* Bump BouncyCastle.Cryptography from 2.6.2 to 2.7.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1871
* chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1859
* Bump JsonPatch.Net from 5.0.2 to 5.0.3 by @​dependabot[bot] in
kubernetes-client/csharp#1864
* Bump Nerdbank.GitVersioning from 3.10.85 to 3.10.91 by
@​dependabot[bot] in
kubernetes-client/csharp#1874
* chore(deps): bump actions/setup-dotnet from 5.3.0 to 6.0.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1862
* Bump Microsoft.CodeAnalysis.Common and Microsoft.CodeAnalysis.CSharp
by @​dependabot[bot] in
kubernetes-client/csharp#1865
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 10.0.301 to 10.0.302 by
@​dependabot[bot] in
kubernetes-client/csharp#1866
* Bump Microsoft.Extensions.Hosting from 10.0.9 to 10.0.10 by
@​dependabot[bot] in
kubernetes-client/csharp#1867
* Bump Microsoft.NET.Test.Sdk from 18.6.0 to 18.8.1 by @​dependabot[bot]
in kubernetes-client/csharp#1869
* Bump OpenTelemetry.Exporter.Console from 1.16.0 to 1.17.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1875
* Bump Swashbuckle.AspNetCore from 10.2.1 to 10.2.3 by @​dependabot[bot]
in kubernetes-client/csharp#1882
* Bump Autofac from 9.3.0 to 9.3.2 by @​dependabot[bot] in
kubernetes-client/csharp#1873
* Bump Nerdbank.GitVersioning from 3.10.91 to 3.10.94 by
@​dependabot[bot] in
kubernetes-client/csharp#1899
* Bump Microsoft.CodeAnalysis.Common and Microsoft.CodeAnalysis.CSharp
by @​dependabot[bot] in
kubernetes-client/csharp#1891
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 10.0.302 to 10.0.400 by
@​dependabot[bot] in
kubernetes-client/csharp#1892
* Bump Microsoft.Extensions.Hosting from 10.0.10 to 10.0.11 by
@​dependabot[bot] in
kubernetes-client/csharp#1893
* Bump Microsoft.NET.Test.Sdk from 18.8.1 to 18.9.0 by @​dependabot[bot]
in kubernetes-client/csharp#1895
* Bump actions/deploy-pages from 5.0.0 to 5.0.1 by @​dependabot[bot] in
kubernetes-client/csharp#1900


**Full Changelog**:
kubernetes-client/csharp@v20.0.84...v20.0.103

## 20.0.84

## What's Changed
* Bump actions/upload-artifact from 6 to 7 by @​dependabot[bot] in
kubernetes-client/csharp#1722
* Wire up UserAgent from config to HTTP requests by @​tg123 with
@​Copilot in kubernetes-client/csharp#1724
* Bump microsoft/setup-msbuild from 2 to 3 by @​dependabot[bot] in
kubernetes-client/csharp#1726
* chore: pin GitHub Actions to commit SHAs by @​brendandburns with
@​Copilot in kubernetes-client/csharp#1732
* Add v5 WebSocket streaming protocol support (stdin close/EOF) by
@​brendandburns with @​Copilot in
kubernetes-client/csharp#1725
* Update generated client to Kubernetes v1.36 (SDK 20.0) by @​tg123 with
@​Copilot in kubernetes-client/csharp#1733
* Bump Autofac and 2 others by @​dependabot[bot] in
kubernetes-client/csharp#1734
* Bump FluentAssertions from 8.6.0 to 8.9.0 by @​dependabot[bot] in
kubernetes-client/csharp#1735
* Bump Microsoft.Build.Traversal from 4.1.0 to 4.1.82 by
@​dependabot[bot] in
kubernetes-client/csharp#1740
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 9.0.0 to 10.0.203 by
@​dependabot[bot] in
kubernetes-client/csharp#1742
* Bump Microsoft.Bcl.AsyncInterfaces from 10.0.0 to 10.0.7 by
@​dependabot[bot] in
kubernetes-client/csharp#1739
* Bump Microsoft.NET.Test.Sdk from 17.14.1 to 18.5.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1746
* Bump Microsoft.SourceLink.GitHub from 8.0.0 to 10.0.203 by
@​dependabot[bot] in
kubernetes-client/csharp#1747
* Bump Fractions from 7.3.0 to 8.3.2 by @​dependabot[bot] in
kubernetes-client/csharp#1736
* Bump Microsoft.Extensions.Hosting from 9.0.8 to 10.0.7 by
@​dependabot[bot] in
kubernetes-client/csharp#1743
* Bump Microsoft.VisualStudio.SlnGen from 12.0.23 to 12.0.32 by
@​dependabot[bot] in
kubernetes-client/csharp#1749
* Bump JsonPatch.Net from 3.3.0 to 5.0.2 by @​dependabot[bot] in
kubernetes-client/csharp#1737
* Bump Microsoft.Extensions.Logging from 9.0.8 to 10.0.7 by
@​dependabot[bot] in
kubernetes-client/csharp#1745
* build(deps): bump github/codeql-action from 4.35.2 to 4.35.3 by
@​dependabot[bot] in
kubernetes-client/csharp#1751
* Bump Newtonsoft.Json from 13.0.3 to 13.0.4 by @​dependabot[bot] in
kubernetes-client/csharp#1753
* build(deps): bump github/codeql-action from 4.35.3 to 4.35.4 by
@​dependabot[bot] in
kubernetes-client/csharp#1764
* Bump System.IO.Abstractions.TestingHelpers from 22.0.15 to 22.1.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1763
* Bump Microsoft.TestPlatform.ObjectModel from 17.14.1 to 18.5.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1748
* Bump System.Diagnostics.DiagnosticSource to 10.0.7 by
@​dependabot[bot] in
kubernetes-client/csharp#1762
* Bump Nerdbank.GitVersioning from 3.7.115 to 3.9.50 by
@​dependabot[bot] in
kubernetes-client/csharp#1752
* Bump xunit.runner.visualstudio from 3.0.2 to 3.1.5 by
@​dependabot[bot] in
kubernetes-client/csharp#1769
* Bump Swashbuckle.AspNetCore from 9.0.4 to 10.1.7 by @​dependabot[bot]
in kubernetes-client/csharp#1761
* Bump System.Reactive from 6.0.2 to 6.1.0 by @​dependabot[bot] in
kubernetes-client/csharp#1765
* Bump Vecc.YamlDotNet.Analyzers.StaticGenerator from 16.3.0 to 17.0.0
by @​dependabot[bot] in
kubernetes-client/csharp#1767
* Bump FluentAssertions from 8.9.0 to 8.10.0 by @​dependabot[bot] in
kubernetes-client/csharp#1770
* build(deps): bump dotnet/nbgv from 0.5.1 to 0.5.2 by @​dependabot[bot]
in kubernetes-client/csharp#1778
* Bump OpenTelemetry.Exporter.Console from 1.12.0 to 1.15.3 by
@​dependabot[bot] in
kubernetes-client/csharp#1755
* Bump MartinCostello.Logging.XUnit from 0.6.0 to 0.7.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1760
* build(deps): bump codecov/codecov-action from 6.0.0 to 6.0.1 by
@​dependabot[bot] in
kubernetes-client/csharp#1773
* Bump Microsoft.CodeAnalysis.NetAnalyzers from 10.0.203 to 10.0.300 by
@​dependabot[bot] in
kubernetes-client/csharp#1775
* Bump Microsoft.Extensions.Hosting from 10.0.7 to 10.0.8 by
@​dependabot[bot] in
kubernetes-client/csharp#1776
* build(deps): bump github/codeql-action from 4.35.4 to 4.36.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1779
* build(deps): bump actions/setup-dotnet from 5.2.0 to 5.3.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1780
* Bump System.Diagnostics.DiagnosticSource from 10.0.7 to 10.0.8 by
@​dependabot[bot] in
kubernetes-client/csharp#1788
* Bump Microsoft.NET.Test.Sdk from 18.5.1 to 18.6.0 by @​dependabot[bot]
in kubernetes-client/csharp#1781
* Bump Microsoft.SourceLink.GitHub from 10.0.203 to 10.0.300 by
@​dependabot[bot] in
kubernetes-client/csharp#1782
* build(deps): bump actions/checkout from 6.0.2 to 6.0.3 by
@​dependabot[bot] in
kubernetes-client/csharp#1790
* build(deps): bump github/codeql-action from 4.36.0 to 4.36.2 by
@​dependabot[bot] in
kubernetes-client/csharp#1791
* Bump Microsoft.Bcl.AsyncInterfaces and 5 others by @​dependabot[bot]
in kubernetes-client/csharp#1792
* build(deps): bump codecov/codecov-action from 6.0.1 to 7.0.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1794
* Bump Vecc.YamlDotNet.Analyzers.StaticGenerator from 17.0.0 to 18.0.0
by @​dependabot[bot] in
kubernetes-client/csharp#1796
* Bump YamlDotNet from 16.3.0 to 18.0.0 by @​dependabot[bot] in
kubernetes-client/csharp#1798
* Bump Microsoft.TestPlatform.ObjectModel from 18.5.1 to 18.6.0 by
@​dependabot[bot] in
kubernetes-client/csharp#1783
* Bump Swashbuckle.AspNetCore from 10.1.7 to 10.2.1 by @​dependabot[bot]
in kubernetes-client/csharp#1787
 ... (truncated)

## 19.0.2

## What's Changed
* Implement List operations for Kubectl by @​Copilot in
kubernetes-client/csharp#1693
* Implement KubectlDelete to delete Kubernetes resources by @​Copilot in
kubernetes-client/csharp#1696
* Implement Kubectl Patch operations by @​Copilot in
kubernetes-client/csharp#1698
* Implement KubectlRollout with generic type parameters for deployment
lifecycle management by @​Copilot in
kubernetes-client/csharp#1700
* Implement KubectlTop for node and pod metrics by @​Copilot in
kubernetes-client/csharp#1703
* Bump actions/upload-artifact from 5 to 6 by @​dependabot[bot] in
kubernetes-client/csharp#1706
* fix: make JsonConverter classes public by @​IvanJosipovic in
kubernetes-client/csharp#1694
* Add RFC3339 formats with offset by @​luiscantero in
kubernetes-client/csharp#1705
* Fix multi-certificate loading from certificate-authority-data by
@​Copilot in kubernetes-client/csharp#1690
* Use actual lease duration from Kubernetes object in leader election by
@​Copilot in kubernetes-client/csharp#1707
* Update client generation to Kubernetes v1.35 and bump SDK version to
19.0 by @​Copilot in
kubernetes-client/csharp#1712
* Order YAML type meta fields before resource data by @​Copilot in
kubernetes-client/csharp#1717


**Full Changelog**:
kubernetes-client/csharp@v18.0.13...v19.0.2

## 18.0.13

## What's Changed
* feat(KubernetesJson): Use of SourceGenerationContext outside AOT by
@​IvanJosipovic in kubernetes-client/csharp#1677
* Bump actions/upload-artifact from 4 to 5 by @​dependabot[bot] in
kubernetes-client/csharp#1678
* Publish Symbols to NuGet by @​tg123 in
kubernetes-client/csharp#1681
* Fix datetime serialization to always output 6 decimal places for
microseconds by @​Copilot in
kubernetes-client/csharp#1687
* Add .NET 10 target framework support by @​Copilot in
kubernetes-client/csharp#1686
* Implement Kubectl Get using generic client for any Kubernetes resource
by @​Copilot in kubernetes-client/csharp#1685
* Fix flaky test by using dynamic port allocation instead of static
counter by @​Copilot in
kubernetes-client/csharp#1691
* Bump actions/checkout from 5 to 6 by @​dependabot[bot] in
kubernetes-client/csharp#1688

## New Contributors
* @​Copilot made their first contribution in
kubernetes-client/csharp#1687

**Full Changelog**:
kubernetes-client/csharp@v18.0.5...v18.0.13

## 18.0.5

## What's Changed
* revert change to structs from classes for IntOrString and
ResourceQuantity, and handle null values in YAML converters by @​tg123
in kubernetes-client/csharp#1673


**Full Changelog**:
kubernetes-client/csharp@v18.0.4...v18.0.5

## 18.0.4

## What's Changed
* feat: add example for creating and resizing a Kubernetes pod by
@​tg123 in kubernetes-client/csharp#1655
* fix docfx by @​tg123 in
kubernetes-client/csharp#1656
* fix(yaml): byte[] serialization by @​IvanJosipovic in
kubernetes-client/csharp#1657
* Bump actions/setup-dotnet from 4 to 5 by @​dependabot[bot] in
kubernetes-client/csharp#1658
* refactor: reorganize Kubernetes client models into separate files by
@​tg123 in kubernetes-client/csharp#1663
* generate base on 1.34 by @​tg123 in
kubernetes-client/csharp#1654
* migrate to record by @​tg123 in
kubernetes-client/csharp#1665
* Bump github/codeql-action from 3 to 4 by @​dependabot[bot] in
kubernetes-client/csharp#1669
* feat: enhance Kubernetes client with watch functionality by @​lqlive
in kubernetes-client/csharp#1667


**Full Changelog**:
kubernetes-client/csharp@v17.0.14...v18.0.4

Commits viewable in [compare
view](https://github.com/kubernetes-client/csharp/commits).
</details>

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=KubernetesClient&package-manager=nuget&previous-version=17.0.14&new-version=21.0.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement KubectlTop

4 participants