* Parse clientCertificateData/clientKeyData from auth plugins
Currently ExecuteExternalCommand crashes with a key not found error if
it runs a certificate based (rather than token based) plugin. This
commit will now return either the token string, or the certificate and
key strings which are then used to set the relevant fields on the
configuration object.
* Fix formatting
* Use new return style
* Removed NETSTANDARD2_0 IFDefs and Fixed some brackets it wouldn't let me build if I didn't fix them
* Removed bracket changes
* Fixed Formatting hopefully
* Updated StartInfo.EnvironmentVariables from StartInfo.Environment so it is compatiable with 4.5.2
* Forgot I had changed this and didn't check git diff till now. My Bad
* Missed a spot where it was referencing Envrionment and not EnvironmentVariables
* Allow KUBECONFIG environment variable to point to multiple files
* Add more tests, add API (can make internal if necessary)
* test
* allow passing in env var
* small amount of feedback
* Feedback
* Nits
* Some extra tests and comments
The current documentation only mentions that it uses a default config file. However, it actually works with a lot more than that and it is helpful to see that in the documentation.
* 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
* 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
* 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