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

feat: add CRD docs auto generator tooling #884

Merged
merged 15 commits into from
Feb 23, 2023

Conversation

mowies
Copy link
Member

@mowies mowies commented Feb 20, 2023

This PR

  • adds a script to automatically generate docs from our CRD APIs
    • the script generates every API group and version into a separate file together with the index files needed to show everything correctly on the docs website
    • the script uses https://github.com/elastic/crd-ref-docs as auto-generation tool
    • the script works with go templates that are also part of this PR. they can be adjusted in the future and were customized slighty from their source in the generator tool repo
  • adds a pipeline to validate if the CRD docs are up to date
  • adds the auto generated docs

Fixes #656

…s, add custom templates for docs generation

Signed-off-by: Moritz Wiesinger <[email protected]>
@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #884 (cb792b3) into main (6a7b0c1) will decrease coverage by 0.08%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #884      +/-   ##
==========================================
- Coverage   58.63%   58.55%   -0.08%     
==========================================
  Files          97       97              
  Lines        7552     7552              
==========================================
- Hits         4428     4422       -6     
- Misses       2934     2938       +4     
- Partials      190      192       +2     
Impacted Files Coverage Δ
...ptnworkloadinstance/reconcile_prepostdeployment.go 81.81% <0.00%> (-9.10%) ⬇️
...lers/lifecycle/keptnworkloadinstance/controller.go 81.16% <0.00%> (-1.35%) ⬇️
Flag Coverage Δ
component-tests 41.52% <ø> (-0.28%) ⬇️
keptn-lifecycle-operator 54.67% <ø> (ø)
klt-cert-manager 67.50% <ø> (ø)
scheduler 21.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Signed-off-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Moritz Wiesinger <[email protected]>

add docs

Signed-off-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Moritz Wiesinger <[email protected]>
@mowies mowies force-pushed the crd-auto-generation branch from 5259d9a to 4ec0fd1 Compare February 21, 2023 10:38
@mowies mowies marked this pull request as ready for review February 21, 2023 11:39
@mowies mowies changed the title feat: add CRD docs auto generator script feat: add CRD docs auto generator tooling Feb 21, 2023
aepfli
aepfli previously approved these changes Feb 21, 2023
Copy link
Member

@aepfli aepfli left a comment

Choose a reason for hiding this comment

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

lgtm, may remarks are improvements and are non-blocking :)

…files, move index template file into templates folder

Signed-off-by: Moritz Wiesinger <[email protected]>
thisthat
thisthat previously approved these changes Feb 21, 2023
@thisthat
Copy link
Member

Great addition 🙌

…n of generator tool to get latest features

Signed-off-by: Moritz Wiesinger <[email protected]>
@netlify
Copy link

netlify bot commented Feb 22, 2023

Deploy Preview for keptn-lifecyle-testing ready!

Name Link
🔨 Latest commit cb792b3
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecyle-testing/deploys/63f71380a44c0800081ecb7b
😎 Deploy Preview https://deploy-preview-884--keptn-lifecyle-testing.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Signed-off-by: Moritz Wiesinger <[email protected]>
Signed-off-by: Moritz Wiesinger <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mowies mowies merged commit 5f63d9a into keptn:main Feb 23, 2023
@mowies mowies deleted the crd-auto-generation branch February 23, 2023 09:00
@keptn-bot keptn-bot mentioned this pull request Feb 23, 2023
Amishakumari544 pushed a commit to Amishakumari544/lifecycle-toolkit that referenced this pull request Feb 27, 2023
aepfli pushed a commit to aepfli/lifecycle-toolkit that referenced this pull request Mar 1, 2023
@keptn-bot keptn-bot mentioned this pull request Mar 16, 2023
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.

Generate documentation from k8s CRDs
4 participants