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

Trust manager API doc generation #1170

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

SgtCoDFish
Copy link
Member

@SgtCoDFish SgtCoDFish commented Jan 23, 2023

This uses crdoc instead of the tool we use for cert-manager. crdoc might be a candidate for use instead of our current tool (at least in part due to issues with #1168)

This is a prerequisite for #1160 , which will be updated to include docs generated from trust-manager 0.4.0 (when it's tagged)

Preview: https://deploy-preview-1170--cert-manager-website.netlify.app/docs/projects/trust-manager-api-ref/

@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 23, 2023
@netlify
Copy link

netlify bot commented Jan 23, 2023

Deploy Preview for cert-manager-website ready!

Name Link
🔨 Latest commit efefbf7
🔍 Latest deploy log https://app.netlify.com/sites/cert-manager-website/deploys/63cfe9f82151a800099bd407
😎 Deploy Preview https://deploy-preview-1170--cert-manager-website.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.

@SgtCoDFish SgtCoDFish force-pushed the trust-manager-api-docs branch 2 times, most recently from ad81f28 to 0a40d22 Compare January 24, 2023 09:52
Comment on lines 347 to 350
},
{
"title": "trust-manager API Docs",
"path": "/docs/projects/trust-manager-api-ref.md"
Copy link
Member Author

Choose a reason for hiding this comment

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

note: I couldn't decide between /projects and /reference

Copy link
Member

Choose a reason for hiding this comment

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

we might need a API ref page for approval-policy too

Copy link
Member

Choose a reason for hiding this comment

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

I would like to have it all in a separate subsection (eg /docs/projects/reference or /docs/reference/projects)

Copy link
Member

Choose a reason for hiding this comment

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

I suppose it depends whether we are trying to make all these projects appear as an integrated suite of software or whether we'd rather keep each project more self container.
I think for now, I'd prefer it in /docs/projects/trust-manager/api-reference.md. My 2c

Copy link
Member Author

Choose a reason for hiding this comment

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

I think for now, I'd prefer it in /docs/projects/trust-manager/api-reference.md. My 2c

Totally reasonable, yeah. I'll go for making trust-manager its own section, then, as in:

Projects
-> approver-policy
-> ...
-> trust-manager
---> Introduction
---> API Reference Docs

(I think it's a valuable long-term goal for trust-manager to be able to run entirely independently of cert-manager, to the point where it could live in its own independent docs site like https://trust-manager.cert-manager.io. I think a lot of the other subprojects won't reasonably exist independently of cert-manager, but trust-manager is useful even if you never install cert-manager)

set -o nounset
set -o pipefail

# This script downloads a crdoc binary for local use if such a binary doesn't already exist.
Copy link
Member Author

Choose a reason for hiding this comment

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

note: this is copied from the htmltest script in the same directory. It could obviously be improved (multi arch support, etc) but this works well.

@SgtCoDFish SgtCoDFish force-pushed the trust-manager-api-docs branch 2 times, most recently from 9f2a4eb to 7552def Compare January 24, 2023 14:06
Uses trust-manager 0.3.0 for generation.

Also adds custom template for trust-manager, which might be applicable
to cert-manager in the future.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
Copy link
Member

@inteon inteon left a comment

Choose a reason for hiding this comment

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

/lgtm
I tested the script locally and it re-created the api-reference.md file.
All remaining links to the ../projects/trust-manager.md file are for old version.

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2023
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon, SgtCoDFish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot merged commit a0eead8 into cert-manager:master Jan 24, 2023
@SgtCoDFish SgtCoDFish deleted the trust-manager-api-docs branch January 24, 2023 14:40
@SgtCoDFish
Copy link
Member Author

Thanks both for the reviews / comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants