generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use API discovery to determine the preferred API versions for Gateway…
… API types. Clusters may not always have the v1 CRDs installed. This means gwctl will have to use whatever version is available in the cluster. Hence, we will use API Discovery to determine the "preferred" API version as per the kube-apiserver and then use a dynamic client to fetch that specific versioned resource. Once that specific versioned resource is fetched (e.g. v1beta1.Gateway), it will be converted to a concrete type used within gwctl (eg. v1.Gateway), which will usually be a more newer/stable version. For most cases, this conversion should not result in any losses. If in the future, a need arises for such special cases, we should be able to extend the approach by configuring some conversion functions (eg. conversion function for v1beta1.Gateway -> v1.Gateway).
- Loading branch information
1 parent
2d41da5
commit 6cf42ae
Showing
5 changed files
with
195 additions
and
63 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
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
Oops, something went wrong.