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

Issue 338: CRD template refactor to accommodate different api versions #339

Merged

Conversation

lspecian-olx
Copy link
Contributor

Change log description

In order to accommodate the both api versions schemas apiextensions.k8s.io/v1 and apiextensions.k8s.io/v1beta1

  • moved openAPIV3Schema as a named template in _helpers.tpl since the schema change moved the object
  • the schema change also moved the object additionalPrinterColumns which needed two versions as named templates since the attribute JSONPath was changed to jsonPath

Purpose of the change

Closes #338

What the code does

The code is checking .Capabilities.APIVersions.Has "apiextensions.k8s.io/v1" and adapting the template output accordingly to the support for the apiVersion

How to verify it

Chart is able to install in eks clusters that support both apiVersions apiextensions.k8s.io/v1 and apiextensions.k8s.io/v1beta1

@codecov-commenter
Copy link

codecov-commenter commented May 29, 2021

Codecov Report

Merging #339 (a8a585b) into master (23888a5) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #339   +/-   ##
=======================================
  Coverage   84.90%   84.90%           
=======================================
  Files          11       11           
  Lines        1358     1358           
=======================================
  Hits         1153     1153           
  Misses        135      135           
  Partials       70       70           

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 23888a5...a8a585b. Read the comment docs.

@anishakj
Copy link
Contributor

@lspecian-olx , how you have generated crd file? Is there any tools used

@lspecian-olx
Copy link
Contributor Author

lspecian-olx commented May 31, 2021

@lspecian-olx , how you have generated crd file? Is there any tools used

hello @anishakj, I used only helm templates, not sure if I understood the question

@anishakj
Copy link
Contributor

anishakj commented May 31, 2021

@lspecian-olx , how you have generated crd file? Is there any tools used

hello @anishakj, I used only helm templates, not sure if I understood the question

Have you used any commands like operator-sdk generate crds ,but have seen that operator-sdk generate crd with v1beta1 version

@anishakj anishakj requested a review from SrishT May 31, 2021 15:33
@anishakj
Copy link
Contributor

anishakj commented Jun 3, 2021

@lspecian-olx, could you please resolve the conflict?

@lspecian-olx lspecian-olx force-pushed the issue-338-crd-apiversion-template-fix branch from 4461c77 to b203bc1 Compare June 3, 2021 08:17
@anishakj
Copy link
Contributor

anishakj commented Jun 3, 2021

@lspecian-olx Looks like there is parse error after conflicts are resolved. Getting below error while try to install

Error: YAML parse error on zookeeper-operator/templates/zookeeper.pravega.io_zookeeperclusters_crd.yaml: error converting YAML to JSON: yaml: line 70: could not find expected ':'

@hansh0801
Copy link

thanks!

Copy link
Contributor

@SrishT SrishT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a very minor comment needs to be addressed, otherwise LGTM

charts/zookeeper-operator/templates/_helpers.tpl Outdated Show resolved Hide resolved
Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@SrishT SrishT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anishakj anishakj merged commit 19d8ef9 into pravega:master Jun 7, 2021
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.

Fix unknown field problems after change to CRD apiVersion check
5 participants