Skip to content

Update SDK version to 14.0 for Kubernetes 1.30 #1551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/buildtest.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
# - name: Check Format
# # don't check formatting on Windows b/c of CRLF issues.
@@ -48,10 +47,10 @@ jobs:
fetch-depth: 0
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup dotnet SDK 7
- name: Setup dotnet SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'
- name: Restore nugets (msbuild)
run: msbuild .\src\KubernetesClient\ -t:restore -p:RestorePackagesConfig=true
- name: Build (msbuild)
@@ -68,7 +67,6 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Minikube
run: minikube start
2 changes: 0 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -29,9 +29,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x

# Initializes the CodeQL tools for scanning.
1 change: 0 additions & 1 deletion .github/workflows/docfx.yaml
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x

- name: Build
3 changes: 1 addition & 2 deletions .github/workflows/draft.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x

- name: dotnet restore
@@ -37,4 +36,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create -d --generate-notes v$env:NBGV_NuGetPackageVersion
gh release create -d --generate-notes v$env:NBGV_NuGetPackageVersion
1 change: 0 additions & 1 deletion .github/workflows/nuget.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x

- name: dotnet restore
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -154,6 +154,7 @@ ${GEN_DIR}/openapi/csharp.sh ${REPO_DIR}/src/KubernetesClient ${REPO_DIR}/csharp

| SDK Version | Kubernetes Version | .NET Targeting |
|-------------|--------------------|-----------------------------------------------------|
| 14.0 | 1.30 | net6.0;net8.0;net48*;netstandard2.0* |
| 13.0 | 1.29 | net6.0;net7.0;net8.0;net48*;netstandard2.0* |
| 12.0 | 1.28 | net6.0;net7.0;net48*;netstandard2.0* |
| 11.0 | 1.27 | net6.0;net7.0;net48*;netstandard2.0* |
2 changes: 1 addition & 1 deletion csharp.settings
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export KUBERNETES_BRANCH=v1.29.0
export KUBERNETES_BRANCH=v1.30.0
export CLIENT_VERSION=0.0.1
export PACKAGE_NAME=k8s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>k8s.kubectl</RootNamespace>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<RootNamespace>k8s.ModelConverter</RootNamespace>
</PropertyGroup>

5 changes: 1 addition & 4 deletions src/KubernetesClient/KubernetesClient.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

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

82 changes: 38 additions & 44 deletions src/LibKubernetesGenerator/GeneralNameHelper.cs
Original file line number Diff line number Diff line change
@@ -78,57 +78,51 @@ public string GetDotNetName(string jsonName, string style = "parameter")
switch (style)
{
case "parameter":
if (jsonName == "namespace")
switch (jsonName)
{
return "namespaceParameter";
}
else if (jsonName == "continue")
{
return "continueParameter";
case "namespace":
return "namespaceParameter";
case "continue":
return "continueParameter";
default:
break;
}

break;

case "fieldctor":
if (jsonName == "namespace")
{
return "namespaceProperty";
}
else if (jsonName == "continue")
{
return "continueProperty";
}
else if (jsonName == "$ref")
{
return "refProperty";
}
else if (jsonName == "default")
{
return "defaultProperty";
}
else if (jsonName == "operator")
{
return "operatorProperty";
}
else if (jsonName == "$schema")
{
return "schema";
}
else if (jsonName == "enum")
{
return "enumProperty";
}
else if (jsonName == "object")
{
return "objectProperty";
}
else if (jsonName == "readOnly")
{
return "readOnlyProperty";
}
else if (jsonName == "from")

switch (jsonName)
{
return "fromProperty";
case "namespace":
return "namespaceProperty";
case "continue":
return "continueProperty";
case "$ref":
return "refProperty";
case "default":
return "defaultProperty";
case "operator":
return "operatorProperty";
case "$schema":
return "schema";
case "enum":
return "enumProperty";
case "object":
return "objectProperty";
case "readOnly":
return "readOnlyProperty";
case "from":
return "fromProperty";
case "int":
return "intValue";
case "bool":
return "boolValue";
case "string":
return "stringValue";

default:
break;
}

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