* Ported GenericKubernetesApi from java along with other utilities
* Replace DeleteOptions for V1DeleteOptions
* Clean up and add clear()
* Clean up
* Removed TweakApiHandler
* Rename methods to follow "async" pattern
* Fix method naming
* Remove unneeded json property
* Rearrange httpsuccess logic
* Simplify dispose pattern
* Treat MockKubeServerFlags as flags
* Clean up flags logic
* Remove unneeded json properties
* Fix cs formatting
* Remove unused variable
* Move MockApi server options to seperate class and revert MockApi back to original
* Remove IRunnable
* Refactor config constants to use existing service account path
* Moved _url.Replace("/apis//", "/api/") down several lines.
Consider the following code:
var _baseUrl = BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/{group}/{version}/namespaces/{namespace}/{plural}").ToString();
_url = _url.Replace("/apis//", "/api/");
_url = _url.Replace("{group}", group);
_url = _url.Replace("{version}", version);
_url = _url.Replace("{namespace}", namespaceParameter);
_url = _url.Replace("{plural}", plural);
If group is empty string, we need to replace /apis// with /api.
To do this, we need to replace /apis// after {group}.
Code after the change:
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "apis/{group}/{version}/namespaces/{namespace}/{plural}").ToString();
_url = _url.Replace("{group}", group);
_url = _url.Replace("{version}", version);
_url = _url.Replace("{namespace}", namespaceParameter);
_url = _url.Replace("{plural}", plural);
_url = _url.Replace("/apis//", "/api/");
* Auto-generated changes
* Avoid calling _httpResponse.Content.ReadAsStringAsync() and deserialize from the content stream
Made a change to avoid calling _httpResponse.Content.ReadAsStringAsync() and deserialize from the content stream, which significantly reduced memory utilization.
Created Kubernetes.cs file and moved constructors and couple methods from the Kubernetes.cs.template to the Kubernetes.cs
Generated Kubernetes.cs will be in a separate commit.
* Separate commit for generated Kubernetes.cs
* Updated GitVersioning package to fix issue with loading native libgit lib. Added check for missing HttpClientHandler
* fixed type
* HttpClientHandler is null when trying to get client certificates for web socket connection. Added direct configuration of client cert instead of via HttpClientHandler
* fixed indentation warning
* re-added certs from httpclienthandler if present
* Updated GitVersioning package to fix issue with loading native libgit lib. Added check for missing HttpClientHandler
* fixed type
* HttpClientHandler is null when trying to get client certificates for web socket connection. Added direct configuration of client cert instead of via HttpClientHandler
* fixed indentation warning
* re-added certs from httpclienthandler if present
* merged duplicate code
* reverted package changes
Update customResource example nuget packages + update example
Update httpClientFactory example nuget packages
Update nuget packages
Change DateTime to DateTimeOffset
Update tests nuget packages
Make KubernetesClient project reference instead of Nuget package reference
Co-authored-by: Boshi Lian <farmer1992@gmail.com>
Co-authored-by: Boshi Lian <farmer1992@gmail.com>
* support async enum watch
* honor ct and catch more exception
* fix format
* better flaky
* ct to for should throw
* make sure no npe
* fix nuget build
* fix watcher test
* check close before dispose
* port autorest to watch generator
* rename KubernetesWatchGenerator -> KubernetesGenerator
* add validate
* fix format
* fix generate code warnings
* fix line ending
* fix missing property found by comp check
* do not new http method
* Initial port of cache functions from java client
* Move lock in Cache.Replace to be less disruptive
* Remove IListerWatcher as it's not used at the moment
* Added todo in Cache.Get as reminder
* TApiType implement IKubernetesObject
* TApiType implement IKubernetesObject
* TApiType implement class along with IKubernetesObject
* Disable failing test until it can be figured out
* Ran `dotnet format --fix-whitespace --fix-style` to put formatting in compliance
* Moved contents of KubernetesClient.Util into KubernetesClient project
* Moved contents of KubernetesClient.Util into KubernetesClient project #2 :(
* Update LICENSE
Update the copyright notice within the licence agreement, as per the instructions under "APPENDIX: How to apply the Apache License to your work."
* Update LICENSE
Updated the date and licence holder for the copyright notice