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 api docs #13

Merged
merged 2 commits into from
Dec 31, 2024
Merged

feat: add api docs #13

merged 2 commits into from
Dec 31, 2024

Conversation

daviderli614
Copy link
Contributor

@daviderli614 daviderli614 commented Dec 25, 2024

Add etcd-operator api documentation, reference tool: https://github.com/elastic/crd-ref-docs
We can make api-docs to generate the latest api documentation.
Preview: docs.md

Makefile Outdated Show resolved Hide resolved

## Tool Versions
KUSTOMIZE_VERSION ?= v5.5.0
CONTROLLER_TOOLS_VERSION ?= v0.16.4
ENVTEST_VERSION ?= release-0.19
GOLANGCI_LINT_VERSION ?= v1.61.0
CRD_REF_DOCS_VERSION ?= v0.1.0
Copy link
Member

Choose a reason for hiding this comment

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

It means that we need to manually maintain the tool's version. A better way is to leverage dependabot to automatically bump it. Refer to https://github.com/etcd-io/etcd/tree/main/tools/mod

But it's good enough in the very first step. We can continue to enhance it in next step.

Copy link
Contributor Author

@daviderli614 daviderli614 Dec 27, 2024

Choose a reason for hiding this comment

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

Now need to set the tool version manually, can use dependabot to automatically bump it later.

@ahrtr
Copy link
Member

ahrtr commented Dec 27, 2024

Thanks @daviderli614 for the contribution. The generated docs looks great.

cc @jmhbnz @hakman @jberkus @justinsb

Makefile Outdated
@@ -190,6 +203,10 @@ envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.
$(ENVTEST): $(LOCALBIN)
$(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,$(ENVTEST_VERSION))

.PHONY: crd-ref-docs
crd-ref-docs: ## Install crd-ref-docs.
GOBIN=$(LOCALBIN) GO111MODULE=on go install github.com/elastic/crd-ref-docs@$(CRD_REF_DOCS_VERSION)
Copy link
Member

Choose a reason for hiding this comment

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

I see that there is already a go-install-tool defined in the Makefile. We need to have a consistent way to manage all the tools per https://github.com/etcd-io/etcd-operator/pull/13/files#r1898432778. This can be enhanced in followup PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, I changed the command to the following:

.PHONY: crd-ref-docs
crd-ref-docs: $(CRD_REF_DOCS) ## Install crd-ref-docs tool, ref: https://github.com/elastic/crd-ref-docs.
$(CRD_REF_DOCS): $(LOCALBIN)
	$(call go-install-tool,$(CRD_REF_DOCS),github.com/elastic/crd-ref-docs@$(CRD_REF_DOCS_VERSION))

@ahrtr
Copy link
Member

ahrtr commented Dec 27, 2024

@daviderli614 please rebase this PR instead of merging the changes from main.

@ahrtr
Copy link
Member

ahrtr commented Dec 27, 2024

@daviderli614 please rebase this PR instead of merging the changes from main.

Please rebase and squash the commits. Search "git rebase and squash" on google.

@daviderli614
Copy link
Contributor Author

@daviderli614 please rebase this PR instead of merging the changes from main.

Please rebase and squash the commits. Search "git rebase and squash" on google.

I know, give me some time.

@daviderli614 daviderli614 force-pushed the feat/api-docs branch 2 times, most recently from 4785f66 to 2d5ec62 Compare December 28, 2024 08:51
Priyankasaggu11929 and others added 2 commits December 28, 2024 16:56
Signed-off-by: liyang <[email protected]>

Update Makefile

Co-authored-by: Benjamin Wang <[email protected]>
Signed-off-by: liyang <[email protected]>
@daviderli614
Copy link
Contributor Author

Hi @ahrtr
I have made some changes. Please review it again, thank you.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, daviderli614

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

@ahrtr ahrtr merged commit 62c37a3 into etcd-io:main Dec 31, 2024
1 check passed
@daviderli614 daviderli614 deleted the feat/api-docs branch January 1, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants