-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change is a POC for adding apply patch support to the fake client. This relies on the upstream support for this which is implemented in a new [FieldManagedObjectTracker][0]. There are two major problems with this for us though: 1. It requires a [type converter][1] which gets initialized with a [parser][2] that knows how the type look like. It doesn't look like it is possible to pass multiple parsers, which means the resulting client can only deals with the set of types the parser knows about, for example what is in client-go but it will not work with CRDs 2. We have some code that wants to look at the object after it was patched to check if its valid - Since this is implemented in the tracker, it doesn't look like its possible to dry run the patch [0]: https://github.com/kubernetes/kubernetes/blob/4dc7a48ac6fb631a84e1974772bf7b8fd0bb9c59/staging/src/k8s.io/client-go/testing/fixture.go#L643 [1]: https://github.com/kubernetes/kubernetes/blob/4dc7a48ac6fb631a84e1974772bf7b8fd0bb9c59/staging/src/k8s.io/client-go/applyconfigurations/utils.go#L1739 [2]: https://github.com/kubernetes/kubernetes/blob/4dc7a48ac6fb631a84e1974772bf7b8fd0bb9c59/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go#L28
- Loading branch information
1 parent
5af6ffa
commit ac5705d
Showing
2 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters