cmd/gen-docs/main.go: auto generate docs for CRD

The new make command `make gen-docs` is introduced.
It will build a markdown file from the CRD introduced by Kilo.

The generation of the docs is a requirement for building the website.

Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
leonnicolas
2021-05-17 09:55:45 +02:00
parent 5d33c94d04
commit 51f1ae94ef
6 changed files with 387 additions and 4 deletions

View File

@@ -84,7 +84,8 @@ type PeerSpec struct {
// PeerEndpoint represents a WireGuard enpoint, which is a ip:port tuple.
type PeerEndpoint struct {
DNSOrIP
// DNSOrIP is a DNS name or an IP address.
DNSOrIP `json:"dnsOrIP"`
// Port must be a valid port number.
Port uint32 `json:"port"`
}
@@ -172,6 +173,9 @@ func (p *Peer) Validate() error {
// PeerList is a list of peers.
type PeerList struct {
metav1.TypeMeta `json:",inline"`
// Standard list metadata.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
// +optional
metav1.ListMeta `json:"metadata,omitempty"`
// List of peers.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md