* Ensure that awaits do not continue on the captured context.
* Make functions async for maintainability.
* Add documentation detailing the use of UIFact.
* Use value from ContextDetails to populate Namespace
This is a fix for: #372
This change uses the value from ContextDetails.Namespace to populate
KubernetesClientConfiguration.Namespace.
The issue is there's a Namespace property on both Context and ContextDetails
- The property on Context is used today
- The property on ContextDetails is not
- The property on ContextDetails maps to the actual yaml config
* Obsolete Context.Namespace
This property doesn't map to anything in the YAML and thus will never be
set. Other clients I checked (java, golang) don't look for a property
at this level.
I think this was likely a mistake, and it should be obsoleted because
it will never be populated.
Example:
```yaml
contexts:
- context:
cluster: ...
namespace: ... # this is ContextDetails.Namespace
user: ...
name: foo
```
```yaml
contexts:
- context:
cluster: ...
namespace: ...
user: ...
name: foo
namespace: ... # this is Context.Namespace
```
* Adding the user credentials exec abillity
new file: src/KubernetesClient/KubeConfigModels/ExecCredentialResponse.cs
new file: src/KubernetesClient/KubeConfigModels/ExternalExecution.cs
modified: src/KubernetesClient/KubeConfigModels/UserCredentials.cs
modified: src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs
* Fixed a few issues with the process spawning and some null references issues
* Removed unused import that caused the build to fail (Mail)
* Added preprocessor directive that will disable out-of-tree client authentication in case it is not a asp.net core app
* Added tests to the new external execution (out-of-tree client authentication) extension
* Trying to fix failing tests that fail apparently due to the preprocessor symbol
* Trying to fix failing macos tests
* Added the -n (do not output trailing newline) and the -E options to the echo command in OSX
* initializing arguments variable
* Changes according to tg123 comments
Changed OSX testing command to printf to try and solve the JSON
parsing errors
* Added missing references
* Environment.UserInteractive and Process applies to .NET Standard >= 2.0 according to Microsoft documentation
* fix a race condition.
when multiple call to GetStream happens around the same time, on the
same inputIndex, a race condition will cause this.buffers.Add() to throw
exception.
* add WebSocket server certificate validation support for net 452
* port forwarding bug fix
In StreamDemuxer, if the buffer is created before connection is established, the port bytes are not removed when
the bytes are delivering to the client. Repro code looks like (the key is to call remoteStreams.Start AFTER
GetStream):
var ws = await kubernetesClient.WebSocketNamespacedPodPortForwardAsync (... )
var remoteStreams = new StreamDemuxer(ws);
var stream = remoteStreams.GetStream(0, 0);
remoteStreams.Start();
This change filters out the port bytes which are the 2nd and 3rd bytes sent in all cases.
* incorporate review feedbacks.
add an enum StreamType to StreamDemuxer so it knows whether / how
the data stream should be handled.
* add tests, fix skip bytes scenario for multiple streams
* add more tests for verifying content.
* simplify code a bit
* Remove requirement for certificate authority data in kubeconfig.
* Update src/KubernetesClient/KubernetesClientConfiguration.ConfigFile.cs
Update casing of `URL` at @itowlson suggestion.
Co-Authored-By: twitchax <twitchax@gmail.com>
* Create KubernetesClientConfiguration from pre-loaded K8SConfiguration
* Tweaked a couple more doc strings
* Fix duplicated tests
* Give the new method a more informative name
* Update WatcherDelegatingHandler to stop eating first line (#183)
* Override Read methods in PeekableStreamReader to avoid unpredicted behaviour (#183)
Override Read methods in PeekableStreamReader to avoid unpredicted behaviour (#183)
* Watcher: Add onClosed event and callback
* Update the code generators to accept the onClose callback
* Re-generate API
* Update unit tests
* Fix unit test
* Watcher fixes/improvements:
- Run Task.Yield at the beginning to make sure we're running async
- Set Watching = false before invoking OnClosed, to make sure the callers see a consistent state.
* fix test case fail on windows
* fix cert not working on windows
* changed to RuntimeInformation to see if osx
* change to a more common way to deal with line ending (due to git autocrlf)
* Fix flakey tests by converting them to async and synchronizing code blocks
* Use the same timeout for all tests
* Use signals to gracefully shut down the mock server
* Support relative paths in Kubernetes configuration files
* Filename -> FileName
* Filename -> FileName
* KuberentesClientConfiguration: Allow the user to opt-out of the mechanism which resolves relative paths in the configuration file.
* Update unit tests
* Fix test