diff --git a/Makefile b/Makefile index 397402c..d5544dc 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ kubernetes: all: manager # Run tests -test: generate fmt vet manifests lint +test: generate fmt vet manifests lint api-docs go test ./... -coverprofile cover.out # Build manager binary @@ -87,6 +87,26 @@ docker-build: docker-push: docker push ${IMG} +# Generate API reference documentation +api-docs: gen-crd-api-reference-docs + $(API_REF_GEN) -api-dir=./pkg/api/v1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/sipcluster.md + +# Find or download gen-crd-api-reference-docs +gen-crd-api-reference-docs: +ifeq (, $(shell which gen-crd-api-reference-docs)) + @{ \ + set -e ;\ + API_REF_GEN_TMP_DIR=$$(mktemp -d) ;\ + cd $$API_REF_GEN_TMP_DIR ;\ + go mod init tmp ;\ + go get github.com/ahmetb/gen-crd-api-reference-docs@v0.2.0 ;\ + rm -rf $$API_REF_GEN_TMP_DIR ;\ + } +API_REF_GEN=$(GOBIN)/gen-crd-api-reference-docs +else +API_REF_GEN=$(shell which gen-crd-api-reference-docs) +endif + # find or download controller-gen # download controller-gen if necessary controller-gen: diff --git a/docs/api/sipcluster.md b/docs/api/sipcluster.md new file mode 100644 index 0000000..e638bf4 --- /dev/null +++ b/docs/api/sipcluster.md @@ -0,0 +1,461 @@ +
Packages:
+Package v1 contains API Schema definitions for the airship v1 API group
+Resource Types: ++(Appears on: +SIPClusterSpec) +
+Field | +Description | +
---|---|
+serviceType + + +InfraService + + + |
++ | +
+optional + + +OptsConfig + + + |
++ | +
+image + +string + + |
++ | +
+nodelabels + +map[string]string + + |
++ | +
+nodePort + +int + + |
++ | +
+nodeInterfaceId + +string + + |
++ | +
string
alias)+(Appears on: +InfraConfig) +
+InfraService describes the type of infrastructure service that should be deployed when a sub-cluster is provisioned.
++(Appears on: +SIPClusterSpec) +
+NodeSet are the the list of Nodes objects workers, +or master that definee eexpectations +for the Tenant Clusters +Includes artifacts to associate with each defined namespace +Such as : +- Roles for the Nodes +- Flavor for theh Nodes image +- Scheduling expectations +- Scale of the group of Nodes
+Field | +Description | +
---|---|
+vm-flavor + +string + + |
+
+ VMFlavor is essentially a Flavor label identifying the +type of Node that meets the construction reqirements + |
+
+spreadTopology + + +SpreadTopology + + + |
+
+ PlaceHolder until we define the real expected +Implementation +Scheduling define constraints the allows the SIP Scheduler +to identify the required BMH’s to allow CAPI to build a cluster + |
+
+count + + +VMCount + + + |
+
+ Count defines the scale expectations for the Nodes + |
+
+(Appears on: +InfraConfig) +
+Field | +Description | +
---|---|
+sshkey + +string + + |
++ | +
+clusterIP + +string + + |
++ | +
SIPCluster is the Schema for the sipclusters API
+Field | +Description | +||||||
---|---|---|---|---|---|---|---|
+metadata + + +Kubernetes meta/v1.ObjectMeta + + + |
+
+Refer to the Kubernetes API documentation for the fields of the
+metadata field.
+ |
+||||||
+spec + + +SIPClusterSpec + + + |
+
+ + +
|
+||||||
+status + + +SIPClusterStatus + + + |
++ | +
+(Appears on: +SIPCluster) +
+SIPClusterSpec defines the desired state of a SIPCluster
+Field | +Description | +
---|---|
+cluster-name + +string + + |
+
+ ClusterName is the name of the cluster to associate machines with + |
+
+nodes + + +map[./pkg/api/v1.VMRoles]./pkg/api/v1.NodeSet + + + |
+
+ Nodes are the list of Nodes objects workers, or master that definee eexpectations
+of the Tenant cluster
+VMRole is either Control or Workers
+VMRole VMRoles |
+
+infra + + +[]InfraConfig + + + |
+
+ InfraServices is a list of services that are deployed when a SIPCluster is provisioned. + |
+
+(Appears on: +SIPCluster) +
+SIPClusterStatus defines the observed state of SIPCluster
+Field | +Description | +
---|---|
+conditions + + +[]Kubernetes meta/v1.Condition + + + |
++ | +
string
alias)+(Appears on: +NodeSet) +
++(Appears on: +NodeSet) +
+VMCount
+Field | +Description | +
---|---|
+active + +int + + |
+
+ INSERT ADDITIONAL STATUS FIELD - define observed state of cluster +Important: Run “make” to regenerate code after modifying this file + |
+
+standby + +int + + |
++ | +
string
alias)VMRoles defines the states the provisioner will report +the tenant has having.
+This page was automatically generated with gen-crd-api-reference-docs
{{ fieldName . }}
+ (Members of {{ fieldName . }}
are embedded into this type.)
+
metadata
field.
+ {{ end }}
+
+ {{ if or (eq (fieldName .) "spec") }}
+ Packages:
+This page was automatically generated with gen-crd-api-reference-docs
{{.Underlying}}
alias){{ end -}}
+ + (Appears on: + {{- $prev := "" -}} + {{- range . -}} + {{- if $prev -}}, {{ end -}} + {{ $prev = . }} + {{ typeDisplayName . }} + {{- end -}} + ) +
+ {{ end }} + + {{ with .CommentLines }} + {{ safe (renderComments .) }} + {{ end }} + + {{ if .Members }} +Field | +Description | +
---|---|
+ apiVersion + string |
+
+ {{ apiGroup . }}
+ |
+
+ kind + string + |
+
+ {{ .Name.Name }}
+ |
+