12 Commits

Author SHA1 Message Date
Boshi Lian
292262755a revert change to structs from classes for IntOrString and ResourceQuantity, and handle null values in YAML converters (#1673)
* feat: add V2HorizontalPodAutoscaler integration test

* fix: change structs to classes for IntOrString and ResourceQuantity, and handle null values in YAML converters

* feat: implement equality members for ResourceQuantity class
2025-10-15 08:59:35 -07:00
Qing Long
6d27bd900b feat: enhance Kubernetes client with watch functionality (#1667)
* feat: enhance Kubernetes client with watch functionality

* refactor: simplify watch event handling in Kubernetes client example

* refactor: update Kubernetes watch functionality to use new event handling methods and add async enumerable support

* fix

* fix

* fix: correct usage of Pod list items in client example and update Obsolete attribute formatting

* fix: update client example to use correct Pod list method and improve Obsolete attribute formatting

* refactor: enhance type resolution for list items in TypeHelper by adding TryGetItemTypeFromSchema method

* feat: mark Watch methods as obsolete to prepare for future deprecation

* fix

* refactor: update WatcherExt class to internal and remove obsolete attributes; improve example method signature in Program.cs

* refactor: change WatcherExt class from internal to public and mark methods as obsolete for future deprecation
2025-10-11 15:10:53 -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
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
f32cf9eab3 fix warnings for net8 (#1481)
* fix ca2007

* xUnit1031

* fix ca2007

* fix ca2007

* remove deprecated ctor

* fix xUnit1031

* fix missing doc

* fix missing dispose

* fix ex
2024-01-09 18:05:26 +01:00
Boshi Lian
89d36aa98d introduce cordon (#1231)
* introduce cordon

* clean import

* force one by one
2023-03-13 13:46:48 -07:00
Shenglong Li
e1508370f5 Dispose certificates in Kubernetes.Dispose() (#1191)
* Dispose certs created by Kuberentes

* Update tests
2023-02-01 15:47:29 -08:00
Boshi Lian
8888a16b58 add patch and replace to generic (#1040) 2022-09-29 10:02:39 -07:00
Manuel Menegazzo
f615b5b459 Fix some compilation warnings (#1010)
* Fixe some summary warning

* Fixed more warning

* Uniformed example projects code

* Uniformed test projects code

* Fix OperatingSystems enum and GenericType summaries
2022-09-15 16:21:21 -07:00
Boshi Lian
fd6f920e40 chunk websocket frame when buff > 15M (#981)
* ws is now chunked

* remove chunk in example

* fix build
2022-08-21 13:29:36 -07:00
Boshi Lian
85755ccb3e 8.0: API Group + v1.24 (#850)
* swagger 1.24

* trim converter

* api group

* before moving method

* grouped api for client

* fix classic build

* fix e2e

* move all code to v8

* fix vis to

* bump ver

* fix authtest filename
2022-05-07 13:05:17 -07:00
Boshi Lian
b5e1e9c858 init kubectl (#830)
* init kubectl

* swagger version into assembly
2022-04-18 14:55:51 -07:00