Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow loading of other k8s API implementations #45

Merged
merged 1 commit into from
Dec 28, 2021
Merged

Conversation

tanmaykm
Copy link
Member

@tanmaykm tanmaykm commented Dec 22, 2021

Refactor to move all code generated from swagger spec into a separate module, named ApiImpl.
KuberContext now optionally takes a module reference to load APIs from. It defaults to the one bundled in Kuber.jl - ApiImpl, but can be replaced with a different module when KuberContext is constructed. This will let Kuber.jl be used with code generated for a different Kubernetes API version, or for a spec with custom APIs (e.g. for CRDs).

Custom CRDs will need some more generalization of the code generator. Will do that in a separate PR.

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2021

Codecov Report

Merging #45 (a9fd9f2) into master (6cba2f1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #45   +/-   ##
======================================
  Coverage    5.16%   5.17%           
======================================
  Files         769     770    +1     
  Lines       36645   36642    -3     
======================================
+ Hits         1894    1897    +3     
+ Misses      34751   34745    -6     
Impacted Files Coverage Δ
src/ApiImpl/api/Kubernetes.jl 100.00% <ø> (ø)
src/ApiImpl/api/api_AdmissionregistrationApi.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_AdmissionregistrationV1Api.jl 0.00% <ø> (ø)
...ApiImpl/api/api_AdmissionregistrationV1beta1Api.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_ApiextensionsApi.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_ApiextensionsV1Api.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_ApiextensionsV1beta1Api.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_ApiregistrationApi.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_ApiregistrationV1Api.jl 0.00% <ø> (ø)
src/ApiImpl/api/api_ApiregistrationV1beta1Api.jl 0.00% <ø> (ø)
... and 1229 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6cba2f1...a9fd9f2. Read the comment docs.

Refactor to move all code generated from swagger spec into a separate module, named `ApiImpl`.
`KuberContext` now optionally takes a module reference to load APIs from. It defaults to the one bundled in Kuber.jl - `ApiImpl`, but can be replaced with a different module when `KuberContext` is constructed. This will let Kuber.jl be used with code generated for a different Kubernetes API version, or for a spec with custom APIs (e.g. for CRDs).
@tanmaykm tanmaykm marked this pull request as ready for review December 22, 2021 11:53
@tanmaykm tanmaykm requested a review from nkottary December 22, 2021 11:54
@nkottary
Copy link
Member

Thanks! I will try this out instead of my branch

@tanmaykm
Copy link
Member Author

Will merge this and continue with some more changes to the code generation.

@tanmaykm tanmaykm merged commit 7465ae9 into master Dec 28, 2021
@delete-merged-branch delete-merged-branch bot deleted the tan/apimodule branch December 28, 2021 05:33
nkottary added a commit that referenced this pull request Jan 5, 2022
Bump version from v0.5.2 to v0.6.0 since we have a new feature implemented in #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants