Commit Graph

126 Commits

Author SHA1 Message Date
dependabot[bot]
f6093b921a Bump System.IO.Abstractions.TestingHelpers from 17.0.23 to 17.1.1 (#978)
Bumps [System.IO.Abstractions.TestingHelpers](https://github.com/TestableIO/System.IO.Abstractions) from 17.0.23 to 17.1.1.
- [Release notes](https://github.com/TestableIO/System.IO.Abstractions/releases)
- [Commits](https://github.com/TestableIO/System.IO.Abstractions/compare/v17.0.23...v17.1.1)

---
updated-dependencies:
- dependency-name: System.IO.Abstractions.TestingHelpers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-16 14:20:49 -07:00
dependabot[bot]
75ca4d912e Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 (#974)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-11 10:48:58 -07:00
dependabot[bot]
677554b976 Bump Moq from 4.18.1 to 4.18.2 (#968)
Bumps [Moq](https://github.com/moq/moq4) from 4.18.1 to 4.18.2.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.18.1...v4.18.2)

---
updated-dependencies:
- dependency-name: Moq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 12:31:57 -07:00
dependabot[bot]
b4a4fdf86f Bump xunit from 2.4.1 to 2.4.2 (#966)
Bumps [xunit](https://github.com/xunit/xunit) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/xunit/xunit/releases)
- [Commits](https://github.com/xunit/xunit/compare/2.4.1...2.4.2)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 12:29:58 -07:00
Vitor Moreira
82497863e0 fix(StringQuotingEmitter): add missing patterns for double quoting (#957)
* fix(StringQuotingEmitter): add missing patterns to regex for double quotes to be applied when serializing

* added missing bool patterns, updated unit test

* added bool spec 1.1 url as a comment to StringQuotingEmitter
2022-07-21 11:09:55 -07:00
dependabot[bot]
17411bcb09 Bump System.IO.Abstractions.TestingHelpers from 17.0.21 to 17.0.23 (#955)
Bumps [System.IO.Abstractions.TestingHelpers](https://github.com/TestableIO/System.IO.Abstractions) from 17.0.21 to 17.0.23.
- [Release notes](https://github.com/TestableIO/System.IO.Abstractions/releases)
- [Commits](https://github.com/TestableIO/System.IO.Abstractions/compare/v17.0.21...v17.0.23)

---
updated-dependencies:
- dependency-name: System.IO.Abstractions.TestingHelpers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-18 16:53:23 -07:00
Moim HA
6f323d82fd Added KubernetesYaml.SerializeAll method (#947) 2022-07-13 10:07:37 -07:00
dependabot[bot]
bbe2f71f39 Bump System.IO.Abstractions.TestingHelpers from 13.2.47 to 17.0.21 (#941)
Bumps [System.IO.Abstractions.TestingHelpers](https://github.com/TestableIO/System.IO.Abstractions) from 13.2.47 to 17.0.21.
- [Release notes](https://github.com/TestableIO/System.IO.Abstractions/releases)
- [Commits](https://github.com/TestableIO/System.IO.Abstractions/compare/v13.2.47...v17.0.21)

---
updated-dependencies:
- dependency-name: System.IO.Abstractions.TestingHelpers
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-11 08:59:48 -07:00
dependabot[bot]
7bc8fe729a Bump Moq from 4.17.2 to 4.18.1 (#927)
Bumps [Moq](https://github.com/moq/moq4) from 4.17.2 to 4.18.1.
- [Release notes](https://github.com/moq/moq4/releases)
- [Changelog](https://github.com/moq/moq4/blob/main/CHANGELOG.md)
- [Commits](https://github.com/moq/moq4/compare/v4.17.2...v4.18.1)

---
updated-dependencies:
- dependency-name: Moq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-09 18:05:47 -07:00
dependabot[bot]
256324c7fb Bump Portable.BouncyCastle from 1.8.10 to 1.9.0 (#929)
Bumps [Portable.BouncyCastle](https://github.com/novotnyllc/bc-csharp) from 1.8.10 to 1.9.0.
- [Release notes](https://github.com/novotnyllc/bc-csharp/releases)
- [Commits](https://github.com/novotnyllc/bc-csharp/compare/pcl-v1.8.10...pcl-v1.9.0)

---
updated-dependencies:
- dependency-name: Portable.BouncyCastle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-09 09:57:46 -07:00
dependabot[bot]
a4abe2d8f4 Bump Microsoft.NET.Test.Sdk from 17.1.0 to 17.2.0 (#931)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.1.0 to 17.2.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Commits](https://github.com/microsoft/vstest/compare/v17.1.0...v17.2.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-09 01:27:47 -07:00
dependabot[bot]
f4f203b313 Bump xunit.runner.visualstudio from 2.4.3 to 2.4.5 (#928)
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.3 to 2.4.5.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/commits)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-08 07:59:46 -07:00
dependabot[bot]
8d3faa4069 Bump MartinCostello.Logging.XUnit from 0.2.0 to 0.3.0 (#921)
Bumps [MartinCostello.Logging.XUnit](https://github.com/martincostello/xunit-logging) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/martincostello/xunit-logging/releases)
- [Commits](https://github.com/martincostello/xunit-logging/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: MartinCostello.Logging.XUnit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-07 09:11:34 -07:00
dependabot[bot]
9c1dd59156 Bump FluentAssertions from 6.1.0 to 6.7.0 (#915)
Bumps [FluentAssertions](https://github.com/fluentassertions/fluentassertions) from 6.1.0 to 6.7.0.
- [Release notes](https://github.com/fluentassertions/fluentassertions/releases)
- [Changelog](https://github.com/fluentassertions/fluentassertions/blob/develop/AcceptApiChanges.ps1)
- [Commits](https://github.com/fluentassertions/fluentassertions/compare/6.1.0...6.7.0)

---
updated-dependencies:
- dependency-name: FluentAssertions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-07 08:11:36 -07:00
Manuel Menegazzo
8026ccdc14 Consolidated coverlet.msbuild, Microsoft.NET.Test.Sdk, Xunit.StaFact, Moq package versions (#910) 2022-07-06 07:02:50 -07:00
KLazarov
877587e898 Updated CertificateValidationCallBack to build the CaCert bundle with respect to the rootChain certs to verify that they are correct. (#860)
* Updated CertificateValidationCallBack to build the CaCert bundle with respect to the rootChain certs to verify that they are correct.

* Added a test cases and assets for when all the certs files are in the same file.

* Removed the hardcoded first cert as the chosen root cert
2022-05-23 20:07:10 -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
Zhiwei Liu
4db390f3af fix obsolete warning about KubernetesYaml (#839) 2022-04-22 15:17:36 -07:00
Boshi Lian
262e16671c testcase to check http2 set (#836)
* add test to ensure http2 ver set

* remove comment
2022-04-22 15:15:37 -07:00
Boshi Lian
8575548cd9 Kubernetes.Classic: add support for netstandard2.0 and net48 (#808)
* support gh nuget (#11)

* trim to fit net48

* add net48 support

* add very test framework

* add test body

* Revert "support gh nuget (#11)"

This reverts commit 5cdaf59690170be44e4554485fb2e89785a6a1cf.
2022-04-03 16:35:42 -07:00
stan-sz
9e6e2f0baa Standardize TargetFramwork for VisualStudio IDE (#810)
* Follow up on unused using cleanup

* Revert

* Package upgrades

* LF

* Update README.md

Co-authored-by: Boshi Lian <farmer1992@gmail.com>

Co-authored-by: Boshi Lian <farmer1992@gmail.com>
2022-03-29 13:01:26 -07:00
Boshi Lian
57037f0070 move kubectl config and yaml related to model module (#806)
* move yaml and config to models module

* better naming

* address comments
2022-03-28 16:57:12 -07:00
Boshi Lian
8e8619130a netstandard2 extendable lib model, basic rest (#793)
* first lib model

* add missing files

* happy test

* add vanilla rest for extend

* fix new url pattern

* address comments

* add v to tag

* bump ver

* add missing file when ren

* support multi pkg

* fix gh action

* fix env var

* ren title

* use gh action to set ver

* remove unused

* remove unused
2022-03-23 16:25:20 -07:00
stan-sz
624ee292f7 Enable some of the unnecessary code rules (#799)
* CA1823 Avoid unused private fields
* CA1847 Use string.Contains(char) instead of string.Contains(string) with single characters
* IDE0005 Remove unnecessary import
* IDE0051 Private member is unused
* IDE0052 Private member is unread
2022-03-21 19:17:45 -07:00
Boshi Lian
e6ee874bf3 fix build warning (#786) 2022-02-25 13:35:22 -08:00
Boshi Lian
0d719f1fc6 7.1 remove old autorest (#785)
* init removal

* clean up warning

* bump ver to 7.1

* fix build

* custom http client no long supported

* cleanup unused types

* fix npe

* remove service client

* modern ssl settings

* fix test

* fix client cert null

* fix ctor

* cleanup
2022-02-25 13:33:23 -08:00
Boshi Lian
8a39035055 fix flaky logger (#782)
* fix flaky logger

* update env related dep

* build info
2022-02-20 14:34:10 -08:00
Brendan Burns
8f4ee45cf3 Add environment variable checking for in cluster configs. (#766) 2022-02-01 10:41:42 -08:00
Boshi Lian
3278e8b418 eat There is no currently active test (#770) 2022-01-26 11:09:35 -08:00
Boshi Lian
eca9898902 API v1.23.0 + system.text.json + remove WatchXXX API (#750)
* gen v1.23.0

* fix converter

* bump ver

* update readme runtime

* fix warning

* update dep ver

* newtonjson -> system.text.json

* generate for new json api

* readme lf

* dotnet fmt

* dotnet fmt tests/

* dotnet fmt

* Revert "dotnet fmt"

This reverts commit e14c59076143fe2218ed899295a00762f0ea2bd6.

* fix err introduce by dotnet fmt

* fix test

* remove deprecated /watch api

* generate code after /watch removed

* remove /watch related code

* trim Microsoft.Rest.Serialization
2021-12-13 07:31:59 -08:00
Binyang2014
6c539873b5 Fix x-kubernetes-int-or-string in CRD can not be desterilized correctly. (#747)
* bug fix

* add ut
2021-12-03 10:00:29 -08:00
Boshi Lian
e45fa773ba add net6 targets (#745)
* add net6 targets

* move to net6 builtin format

* e2e target

* make codeql happy
2021-11-15 19:39:25 -08:00
David Dieruf
4ff1ea49b8 Ported GenericKubernetesApi from java along with other utilities (#682)
* 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
2021-11-03 10:52:34 -07:00
Boshi Lian
3643250f40 use net5 certificate api instead of 3rd api (#733)
* use net api for cert loading

* codeql happy?
2021-10-20 06:57:58 -07:00
Bliamoh
2d8915dff7 Update customResource example + bump nuget packages versions (#720)
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>
2021-10-14 09:02:51 -07:00
Boshi Lian
bc11d3aec2 httpclient to support different timeout for watch and regular api (#725)
* api for httpclient timeout

* testcases for global timeout

* update timeout to honor token

* generated files
2021-10-11 12:55:02 -07:00
Remi Gaudin
3f178a7b78 Upgrade Microsoft.Rest.ClientRuntime from 2.3.10 to 2.3.23 (#702)
* Upgrade Microsoft.Rest.ClientRuntime from 2.3.10 to 2.3.23 (#699)

* Fix unit tests by setting kubernetesMock.CallBase = true (#699)
2021-09-29 05:21:45 -07:00
Boshi Lian
4e29dff8d2 expose IAsyncEnumerable API for watcher (#586)
* 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
2021-09-17 08:19:01 -07:00
Boshi Lian
d66c914c86 Gen v1.22.0 (#677)
* generator to support bool?

* gen v1.22.0

* trim version convertor

* bump ver
2021-08-15 09:01:46 -07:00
Boshi Lian
72afeafe96 fix flaky leader election tests (#676)
* force max thread

* add log

* use countdown to sync

* add logs

* add thread
2021-08-09 07:25:32 -07:00
David Dieruf
af53bf3cec Initial port of cache functions from java client (#665)
* 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 :(
2021-08-04 07:51:25 -07:00
Brendan Burns
762c8af640 Add support for loading namespaces from pod configuration. (#640) 2021-06-14 16:22:08 -07:00
Jarrett Confrey
ac0f43b576 fix: oidc (#633)
* fix: oidc

* revert: verbose oidc logs

* fix: actually commit changes

* chore: cleanup var name

* chore: address pr feedback
2021-05-24 09:33:39 -07:00
Boshi Lian
225bb1f59b Gen v1.21.0 (#603)
* gen v1.21.0

* update version converter

* bump version to 5

* remove support of netstandard2.0

* update test dependency
2021-04-09 13:37:17 -07:00
Benjamin Burns
57aef03afe Default type map for YAML deserialization (#599)
* Affects Yaml.LoadAllFrom* methods
* Doesn't require user to explicitly pass a mapping for known types
* Allows user to specify a mapping for custom types, if required
2021-04-05 12:43:19 -07:00
Boshi Lian
655a42c6bd add tcp keep alive hack to net5 target (#560)
* add tcp keep alive hack to net5 target

* remove unused code

* fix ep

* Update buildtest.yaml

* fix netstandard21

* fix space

* fix net5 warning

* more comment
2021-03-11 09:32:22 -08:00
Alex Meyer-Gleaves
d48e93c1f6 Support IgnoreUnmatchedProperties in YAML serialization (#574)
* Support IgnoreUnmatchedProperties in YAML serialization

* Remove unnecessary null-conditional operator
2021-03-02 12:35:20 -08:00
Alex Meyer-Gleaves
a4350d6c8f Fix ObjectDisposedException thrown when calling Yaml.LoadAllFromFileAsync (#573) 2021-02-26 23:21:43 -08:00
Frederik Carlier
4e58609159 Support wildcard IPv4 and IPv6 addresses (#550)
Some tools can generate kubeconfig files which use wildcard IPv4 or IPv6 addresses. For example, using k3d with --api-server=https://0.0.0.0:6433/ would generate a kubeconfig file like this:

```
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: (...)
    server: https://0.0.0.0:6433
  name: k3d-k3s-default
```

Standard Kubernetes tools (like kubectl or Helm) correctly parse the 0.0.0.0 IP address and transform it 127.0.0.1; 3rd party tools like curl or wget will do the same on Unix systems.

This is default behavior on Unix but not on Windows. As a result, the .NET Kubernetes client will fail to work with kubeconfig files like this and you'll get HTTP exceptions.

Go has explicit workarounds for this (see 1a0b1cca4c), and this PR attemps to replicate these workarounds in the .NET client.
2021-01-28 00:19:48 -08:00
Frederik Carlier
6f5706d753 Fix kubeconfig extension handling (#556)
Extensions on kubeconfig files are stored as a list of NamedExtension objects, not a dictionary.
2021-01-27 08:57:40 -08:00