Skip to content

Commit

Permalink
Upgrade to netstandard1.4 to netstandard2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Jul 13, 2024
1 parent ca2d8ed commit 0639575
Showing 11 changed files with 28 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

[![Build Status (Travis CI)](https://travis-ci.org/tintoy/dotnet-kube-client.svg?branch=develop)](https://travis-ci.org/tintoy/dotnet-kube-client)

KubeClient is an extensible Kubernetes API client for .NET Core (targets `netstandard1.4`).
KubeClient is an extensible Kubernetes API client for .NET Core (targets `netstandard2.0`).

Note - there is also an [official](https://github.com/kubernetes-client/csharp/) .NET client for Kubernetes (both clients actually share code in a couple of places). These two clients are philosophically-different (from a design perspective) but either can be bent to fit your needs. For more information about how KubeClient differs from the official client, see the section below on [extensibility](#extensibility).

@@ -12,7 +12,7 @@ Note - there is also an [official](https://github.com/kubernetes-client/csharp/)

## Packages

* `KubeClient` (`netstandard1.4` or newer)
* `KubeClient` (`netstandard2.0` or newer)
The main client and models.
[![KubeClient](https://img.shields.io/nuget/v/KubeClient.svg)](https://www.nuget.org/packages/KubeClient)
* `KubeClient.Extensions.Configuration` (`netstandard2.0` or newer)
@@ -21,7 +21,7 @@ Note - there is also an [official](https://github.com/kubernetes-client/csharp/)
* `KubeClient.Extensions.DependencyInjection` (`netstandard2.0` or newer)
Dependency-injection support.
[![KubeClient.Extensions.KubeConfig](https://img.shields.io/nuget/v/KubeClient.Extensions.DependencyInjection.svg)](https://www.nuget.org/packages/KubeClient.Extensions.DependencyInjection)
* `KubeClient.Extensions.KubeConfig` (`netstandard1.4` or newer)
* `KubeClient.Extensions.KubeConfig` (`netstandard2.0` or newer)
Support for loading and parsing configuration from `~/.kube/config`.
[![KubeClient.Extensions.KubeConfig](https://img.shields.io/nuget/v/KubeClient.Extensions.KubeConfig.svg)](https://www.nuget.org/packages/KubeClient.Extensions.KubeConfig)
* `KubeClient.Extensions.WebSockets` (`netstandard2.1` or newer)
2 changes: 1 addition & 1 deletion samples/WatchEvents/WatchEvents.csproj
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
<PackageReference Include="Serilog" Version="2.5.0" />
<PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" />
<PackageReference Include="Serilog.Sinks.Literate" Version="3.0.0" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
</ItemGroup>

<Import Project="..\Common.props" />
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>

<Description>Kubernetes client configuration support for KubeClient</Description>
</PropertyGroup>
@@ -14,7 +14,7 @@
<PackageReference Include="HTTPlease.Core" Version="$(PackageVersion_HTTPlease)" />
<PackageReference Include="BouncyCastle.NetCore" Version="1.8.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
<PackageReference Include="YamlDotNet" Version="6.1.2" />
</ItemGroup>

12 changes: 9 additions & 3 deletions src/KubeClient/KubeApiException.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
using HTTPlease;
using System;

#if NETSTANDARD2_0

using System.Runtime.Serialization;

#endif // NETSTANDARD2_0

namespace KubeClient
{
using Models;

/// <summary>
/// Exception raised when an error result is returned by the Kubernetes API.
/// </summary>
#if NETSTANDARD20
#if NETSTANDARD2_0
[Serializable]
#endif // NETSTANDARD20
#endif // NETSTANDARD2_0
public class KubeApiException
: KubeClientException
{
@@ -106,7 +112,7 @@ public KubeApiException(HttpRequestException<StatusV1> requestException)
/// <param name="context">
/// A <see cref="StreamingContext"/> containing information about the origin of the serialised data.
/// </param>
protected KubeClientException(SerializationInfo info, StreamingContext context)
protected KubeApiException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
4 changes: 2 additions & 2 deletions src/KubeClient/KubeClient.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>

<Description>A Kubernetes API client for .NET</Description>
</PropertyGroup>
@@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="1.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="YamlDotNet" Version="6.1.2" />
</ItemGroup>
6 changes: 6 additions & 0 deletions src/KubeClient/KubeClientException.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
using HTTPlease;
using System;

#if NETSTANDARD2_0

using System.Runtime.Serialization;

#endif // NETSTANDARD2_0

namespace KubeClient
{
using Models;
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
<PackageReference Include="HTTPlease.Formatters.Json" Version="$(PackageVersion_HTTPlease)" />
<PackageReference Include="HTTPlease.Testability.Xunit" Version="$(PackageVersion_HTTPlease)" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.0.0" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
</ItemGroup>

<ItemGroup>
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
</ItemGroup>

<ItemGroup>
2 changes: 1 addition & 1 deletion test/KubeClient.TestCommon/KubeClient.TestCommon.csproj
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
<PackageReference Include="xunit" Version="2.3.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/KubeClient.Tests/KubeClient.Tests.csproj
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
<PackageReference Include="HTTPlease.Diagnostics" Version="$(PackageVersion_HTTPlease)" />
<PackageReference Include="HTTPlease.Formatters.Json" Version="$(PackageVersion_HTTPlease)" />
<PackageReference Include="HTTPlease.Testability.Xunit" Version="$(PackageVersion_HTTPlease)" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="4.4.1" />
</ItemGroup>

<ItemGroup>

0 comments on commit 0639575

Please sign in to comment.