Commit Graph

9 Commits

Author SHA1 Message Date
Ivan Josipovic
70b6386441 feat(KubernetesJson): Use of SourceGenerationContext outside AOT (#1677)
* feat: initial source gen for json

* wip

* chore: readd default settings

* chore: cleanup

* chore: remove source gen from classic as it depends on C#9 support

* Update KubernetesClient.Classic.csproj

* wip

* enable UseStringEnumConverter

* chore: make converters public so we can use them in our libraries

* fix: recursion and remove converter from source gen

* fix: V1StatusObjectViewConverter

* wip

* wip

* wip

* fix: rfc3339 json serialization and yaml de/serialization

* chore: add namespace

* fix: imports

* fix: switch output to RFC3339Micro to fit Time and MicroTime

* chore: update AOT to match KubernetesYaml

* fix aot

* Update buildtest.yaml
2025-10-25 23:39:34 -07:00
Boshi Lian
5de1c25cf1 migrate to record (#1665)
* migrate to record

* chore: update project files and clean up unused references

* refactor: convert classes to records and simplify constructors for IntOrString, ResourceQuantity, and V1Patch

* fix: define IsExternalInit to resolve CS0518 error in IntOrString

* refactor: change IntOrString and ResourceQuantity from records to structs, update implicit conversions, and simplify null checks

* refactor: add JsonPropertyName attribute to Value property in IntOrString struct

* refactor: simplify V1Patch constructor and improve argument validation

* refactor: remove unnecessary CultureInfo parameter in ToInt method

* Update src/KubernetesClient/Models/ResourceQuantity.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/KubernetesClient/Models/IntOrString.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revert "Update src/KubernetesClient/Models/ResourceQuantity.cs"

This reverts commit 62b20a691554659e28d419067220dc1a0620133b.

* refactor: remove commented-out formatting check and simplify build command

* refactor: remove IValidate.cs from project references in Aot and Classic

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-22 14:20:13 -07:00
Boshi Lian
11a9641fbe refactor: reorganize Kubernetes client models into separate files (#1663) 2025-09-16 07:40:17 -07:00
Boshi Lian
9efecfdcd4 Enhance certificate handling for .NET 9 compatibility in KubernetesClientConfiguration (#1638) 2025-07-14 11:12:24 -07:00
Ayr Loong
f1125e9435 Implementing a more modular API (#1627)
* fix typo

* Add modular API

* Use x-kubernetes-action instead of operationId to generate method names

* fix

* Clean code style warnings

* Refactor client constructors to use Kubernetes type instead of IKubernetes

* Add ClientSet tests for Kubernetes pod operations

* Fix order of parameters in Pod API calls for consistency

* Enhance documentation for ClientSet and ResourceClient classes

* Refactor ClientSet and GroupClient for Kubernetes usage

* Refactor Pod API calls in tests to use singular form for consistency

* Refactor Pod API calls to use 'Create' and 'Update' methods for consistency
2025-05-22 00:56:39 -07:00
Boshi Lian
f7e7613d09 generate api v1.32 (#1603)
* generate based on v1.32

* bump ver

* Delete swagger.json.unprocessed

* Update target frameworks and SDK versions in project files

* Remove extra API endpoint from swagger.json

* Update .NET SDK version to 9.0.x and adjust package references

* happy build

* Enhance certificate handling for .NET 9.0 compatibility in CertUtils and KubernetesClientConfiguration

* Add mapping for V1beta1ResourceClaim to V1ResourceClaim in AutoMapper configurations

* Refactor certificate loading to improve compatibility with .NET 9.0

* Update package versions in Directory.Packages.props for improved compatibility and features

* Update Fractions package version to 7.3.0 for improved compatibility
2025-01-07 16:12:29 +01:00
Weihan Li
007ef8946c init cpm support (#1565)
* feat: init cpm support

* remove dotnet-xunit DotNetCliToolReference

* use VersionOverride for compatibility
2024-06-15 21:41:28 -07:00
Boshi Lian
09721624a9 update nuget (#1515) 2024-02-04 08:41:09 -08:00
Boshi Lian
00c4c6f4ab add KubernetesClient.Aot to support Aot (#1498)
* init aot

* fix ca2007

* xUnit1031

* fix ca2007

* fix ca2007

* remove deprecated ctor

* fix xUnit1031

* fix missing doc

* fix missing dispose

* wait for warnings fix

* fix space

* move aot code to dedicated proj

* Remove commented out code

* eliminate know warnings

* add e2e test for aot

* rever on field convert annotation

* add e2e aot gh

* Add KubernetesClient.Aot project reference

* move CA1812 rule violation to file
2024-01-29 13:58:22 -08:00