Skip to content

Commit 07a59e7

Browse files
authored
Update SDK version to 14.0 for Kubernetes 1.30 (#1551)
* Update KUBERNETES_BRANCH to v1.30.0 in csharp.settings * Update version.json to 14.0 * Update SDK version to 14.0 for Kubernetes 1.30 * fix csharp naming conflict * drop support of net7 * remove unused comment
1 parent 3dae1cf commit 07a59e7

File tree

17 files changed

+22331
-15172
lines changed

17 files changed

+22331
-15172
lines changed

.github/workflows/buildtest.yaml

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
with:
1717
dotnet-version: |
1818
6.0.x
19-
7.0.x
2019
8.0.x
2120
# - name: Check Format
2221
# # don't check formatting on Windows b/c of CRLF issues.
@@ -48,10 +47,10 @@ jobs:
4847
fetch-depth: 0
4948
- name: Add msbuild to PATH
5049
uses: microsoft/setup-msbuild@v2
51-
- name: Setup dotnet SDK 7
50+
- name: Setup dotnet SDK
5251
uses: actions/setup-dotnet@v4
5352
with:
54-
dotnet-version: '7.0.x'
53+
dotnet-version: '8.0.x'
5554
- name: Restore nugets (msbuild)
5655
run: msbuild .\src\KubernetesClient\ -t:restore -p:RestorePackagesConfig=true
5756
- name: Build (msbuild)
@@ -68,7 +67,6 @@ jobs:
6867
with:
6968
dotnet-version: |
7069
6.0.x
71-
7.0.x
7270
8.0.x
7371
- name: Minikube
7472
run: minikube start

.github/workflows/codeql-analysis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ jobs:
2929
uses: actions/setup-dotnet@v4
3030
with:
3131
dotnet-version: |
32-
3.1.x
3332
6.0.x
34-
7.0.x
3533
8.0.x
3634
3735
# Initializes the CodeQL tools for scanning.

.github/workflows/docfx.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
with:
3535
dotnet-version: |
3636
6.0.x
37-
7.0.x
3837
8.0.x
3938
4039
- name: Build

.github/workflows/draft.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
with:
2020
dotnet-version: |
2121
6.0.x
22-
7.0.x
2322
8.0.x
2423
2524
- name: dotnet restore
@@ -37,4 +36,4 @@ jobs:
3736
env:
3837
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3938
run: |
40-
gh release create -d --generate-notes v$env:NBGV_NuGetPackageVersion
39+
gh release create -d --generate-notes v$env:NBGV_NuGetPackageVersion

.github/workflows/nuget.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
with:
2020
dotnet-version: |
2121
6.0.x
22-
7.0.x
2322
8.0.x
2423
2524
- name: dotnet restore

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ ${GEN_DIR}/openapi/csharp.sh ${REPO_DIR}/src/KubernetesClient ${REPO_DIR}/csharp
154154

155155
| SDK Version | Kubernetes Version | .NET Targeting |
156156
|-------------|--------------------|-----------------------------------------------------|
157+
| 14.0 | 1.30 | net6.0;net8.0;net48*;netstandard2.0* |
157158
| 13.0 | 1.29 | net6.0;net7.0;net8.0;net48*;netstandard2.0* |
158159
| 12.0 | 1.28 | net6.0;net7.0;net48*;netstandard2.0* |
159160
| 11.0 | 1.27 | net6.0;net7.0;net48*;netstandard2.0* |

csharp.settings

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export KUBERNETES_BRANCH=v1.29.0
1+
export KUBERNETES_BRANCH=v1.30.0
22
export CLIENT_VERSION=0.0.1
33
export PACKAGE_NAME=k8s

src/KubernetesClient.Kubectl/KubernetesClient.Kubectl.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>k8s.kubectl</RootNamespace>

src/KubernetesClient.ModelConverter/KubernetesClient.ModelConverter.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
44
<RootNamespace>k8s.ModelConverter</RootNamespace>
55
</PropertyGroup>
66

src/KubernetesClient/KubernetesClient.csproj

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<RootNamespace>k8s</RootNamespace>
6-
<!-- seems bug in net7 json generator, some types missing in its result
7-
net8 is still in preview, will enable it after net8 release -->
8-
<!-- <PublishAot Condition="'$(TargetFramework)' == 'net8.0'">true</PublishAot> -->
96
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
107
</PropertyGroup>
118

src/LibKubernetesGenerator/GeneralNameHelper.cs

+38-44
Original file line numberDiff line numberDiff line change
@@ -78,57 +78,51 @@ public string GetDotNetName(string jsonName, string style = "parameter")
7878
switch (style)
7979
{
8080
case "parameter":
81-
if (jsonName == "namespace")
81+
switch (jsonName)
8282
{
83-
return "namespaceParameter";
84-
}
85-
else if (jsonName == "continue")
86-
{
87-
return "continueParameter";
83+
case "namespace":
84+
return "namespaceParameter";
85+
case "continue":
86+
return "continueParameter";
87+
default:
88+
break;
8889
}
8990

9091
break;
9192

9293
case "fieldctor":
93-
if (jsonName == "namespace")
94-
{
95-
return "namespaceProperty";
96-
}
97-
else if (jsonName == "continue")
98-
{
99-
return "continueProperty";
100-
}
101-
else if (jsonName == "$ref")
102-
{
103-
return "refProperty";
104-
}
105-
else if (jsonName == "default")
106-
{
107-
return "defaultProperty";
108-
}
109-
else if (jsonName == "operator")
110-
{
111-
return "operatorProperty";
112-
}
113-
else if (jsonName == "$schema")
114-
{
115-
return "schema";
116-
}
117-
else if (jsonName == "enum")
118-
{
119-
return "enumProperty";
120-
}
121-
else if (jsonName == "object")
122-
{
123-
return "objectProperty";
124-
}
125-
else if (jsonName == "readOnly")
126-
{
127-
return "readOnlyProperty";
128-
}
129-
else if (jsonName == "from")
94+
95+
switch (jsonName)
13096
{
131-
return "fromProperty";
97+
case "namespace":
98+
return "namespaceProperty";
99+
case "continue":
100+
return "continueProperty";
101+
case "$ref":
102+
return "refProperty";
103+
case "default":
104+
return "defaultProperty";
105+
case "operator":
106+
return "operatorProperty";
107+
case "$schema":
108+
return "schema";
109+
case "enum":
110+
return "enumProperty";
111+
case "object":
112+
return "objectProperty";
113+
case "readOnly":
114+
return "readOnlyProperty";
115+
case "from":
116+
return "fromProperty";
117+
case "int":
118+
return "intValue";
119+
case "bool":
120+
return "boolValue";
121+
case "string":
122+
return "stringValue";
123+
124+
default:
125+
break;
132126
}
133127

134128
if (jsonName.Contains("-"))

0 commit comments

Comments
 (0)