diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml
index f1b209e..2b6a338 100644
--- a/.github/workflows/build-publish.yml
+++ b/.github/workflows/build-publish.yml
@@ -29,7 +29,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
- dotnet-version: '8.x.x'
+ dotnet-version: '10.x'
- name: Build
run: dotnet build -c Release
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 0000000..3db64ff
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,27 @@
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/K8sOperator.sln b/K8sOperator.sln
index f8c1709..4b8b1fc 100644
--- a/K8sOperator.sln
+++ b/K8sOperator.sln
@@ -1,14 +1,13 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31903.59
+# Visual Studio Version 18
+VisualStudioVersion = 18.1.11312.151 d18.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{898CC489-C84A-49BD-9D77-3CEA1F6A7180}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{029923F0-FD53-4B75-BA07-F102BBE9C429}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
- src\Directory.Packages.props = src\Directory.Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9320CC2F-6BB6-4B29-B625-EB427EE87891}"
@@ -16,7 +15,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{0CCCC7F3-A522-4535-8D5A-1E53815936D3}"
ProjectSection(SolutionItems) = preProject
test\Directory.Build.props = test\Directory.Build.props
- test\Directory.Packages.props = test\Directory.Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{4D1F501E-294C-4B22-9792-1BBB2B553C69}"
diff --git a/examples/SimpleOperator/SimpleOperator.csproj b/examples/SimpleOperator/SimpleOperator.csproj
index 294659d..df57e67 100644
--- a/examples/SimpleOperator/SimpleOperator.csproj
+++ b/examples/SimpleOperator/SimpleOperator.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
enable
enable
pmdevers
diff --git a/global.json b/global.json
index 90996b8..588227b 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "8.0.100",
+ "version": "10.0.100",
"rollForward": "latestFeature"
}
}
\ No newline at end of file
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 9f9f584..fb860a7 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
true
enable
enable
diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props
deleted file mode 100644
index d3d0c2d..0000000
--- a/src/Directory.Packages.props
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/K8sOperator.NET.Generators/Builders/ClusterRoleBindingBuilderExtensions.cs b/src/K8sOperator.NET.Generators/Builders/ClusterRoleBindingBuilderExtensions.cs
index 3d34998..aecd608 100644
--- a/src/K8sOperator.NET.Generators/Builders/ClusterRoleBindingBuilderExtensions.cs
+++ b/src/K8sOperator.NET.Generators/Builders/ClusterRoleBindingBuilderExtensions.cs
@@ -22,7 +22,7 @@ public static TBuilder WithRoleRef(this TBuilder builder, string apiGr
{
builder.Add(x =>
{
- x.RoleRef = new V1RoleRef(apiGroup, kind, name);
+ x.RoleRef = new V1RoleRef() { ApiGroup = apiGroup, Kind = kind, Name = name };
});
return builder;
@@ -44,7 +44,7 @@ public static TBuilder WithSubject(this TBuilder builder, string kind,
builder.Add(x =>
{
x.Subjects ??= [];
- x.Subjects.Add(new Rbacv1Subject(kind, name, apiGroup, ns));
+ x.Subjects.Add(new Rbacv1Subject() { Kind = kind, Name = name, ApiGroup = apiGroup, NamespaceProperty = ns });
});
return builder;
diff --git a/src/K8sOperator.NET.Generators/Builders/DeploymentBuilderExtensions.cs b/src/K8sOperator.NET.Generators/Builders/DeploymentBuilderExtensions.cs
index b6ac9b6..f29de55 100644
--- a/src/K8sOperator.NET.Generators/Builders/DeploymentBuilderExtensions.cs
+++ b/src/K8sOperator.NET.Generators/Builders/DeploymentBuilderExtensions.cs
@@ -1,5 +1,4 @@
-using k8s.Authentication;
-using k8s.Models;
+using k8s.Models;
namespace K8sOperator.NET.Generators.Builders;
@@ -164,13 +163,13 @@ public static TBuilder WithImage(this TBuilder builder, string image)
/// An action to configure resource requests.
/// The configured builder.
public static TBuilder WithResources(this TBuilder builder,
- Action>? claims = null,
+ Action>? claims = null,
Action>? limits = null,
Action>? requests = null
)
where TBuilder : IKubernetesObjectBuilder
{
- var c = new List();
+ var c = new List();
claims?.Invoke(c);
var l = new Dictionary();
limits?.Invoke(l);
diff --git a/src/K8sOperator.NET/EventWatcher.cs b/src/K8sOperator.NET/EventWatcher.cs
index 409f39b..9c73045 100644
--- a/src/K8sOperator.NET/EventWatcher.cs
+++ b/src/K8sOperator.NET/EventWatcher.cs
@@ -1,10 +1,11 @@
-using k8s;
+using k8s;
using k8s.Autorest;
using k8s.Models;
using K8sOperator.NET.Extensions;
using K8sOperator.NET.Metadata;
using K8sOperator.NET.Models;
using Microsoft.Extensions.Logging;
+using System.Text.Json;
namespace K8sOperator.NET;
@@ -32,12 +33,12 @@ public interface IEventWatcher
}
internal class EventWatcher(IKubernetesClient client, Controller controller, List