|
| 1 | +{{- /* https://github.com/grafana/k6-operator/blob/main/docs/crd.tmpl */ -}} |
| 2 | +--- |
| 3 | +title: {{or .Metadata.Title "API Reference"}} |
| 4 | +weight: {{or .Metadata.Weight 1 }} |
| 5 | +{{- if .Metadata.Description}} |
| 6 | +description: {{.Metadata.Description}} |
| 7 | +{{- end}} |
| 8 | +--- |
| 9 | + |
| 10 | + |
| 11 | +Packages: |
| 12 | +{{range .Groups}} |
| 13 | +- [{{.Group}}/{{.Version}}](#{{ anchorize (printf "%s/%s" .Group .Version) }}) |
| 14 | +{{- end -}}{{/* range .Groups */}} |
| 15 | + |
| 16 | +{{- range .Groups }} |
| 17 | +{{- $group := . }} |
| 18 | + |
| 19 | +# {{.Group}}/{{.Version}} |
| 20 | + |
| 21 | +Resource Types: |
| 22 | +{{range .Kinds}} |
| 23 | +- [{{.Name}}](#{{ anchorize .Name }}) |
| 24 | +{{end}}{{/* range .Kinds */}} |
| 25 | + |
| 26 | +{{range .Kinds}} |
| 27 | +{{$kind := .}} |
| 28 | +## {{.Name}} |
| 29 | +<sup><sup>[↩ Parent](#{{ anchorize (printf "%s/%s" $group.Group $group.Version) }} )</sup></sup> |
| 30 | + |
| 31 | +{{range .Types}} |
| 32 | + |
| 33 | +{{if not .IsTopLevel}} |
| 34 | +### {{.Name}} |
| 35 | +{{if .ParentKey}}<sup><sup>[↩ Parent](#{{.ParentKey}})</sup></sup>{{end}} |
| 36 | +{{end}} |
| 37 | + |
| 38 | + |
| 39 | +{{.Description}} |
| 40 | + |
| 41 | +<table> |
| 42 | + <thead> |
| 43 | + <tr> |
| 44 | + <th>Name</th> |
| 45 | + <th>Type</th> |
| 46 | + <th>Description</th> |
| 47 | + <th>Required</th> |
| 48 | + </tr> |
| 49 | + </thead> |
| 50 | + <tbody> |
| 51 | + {{- if .IsTopLevel -}} |
| 52 | + <tr> |
| 53 | + <td><b>apiVersion</b></td> |
| 54 | + <td>string</td> |
| 55 | + <td>{{$group.Group}}/{{$group.Version}}</td> |
| 56 | + <td>true</td> |
| 57 | + </tr> |
| 58 | + <tr> |
| 59 | + <td><b>kind</b></td> |
| 60 | + <td>string</td> |
| 61 | + <td>{{$kind.Name}}</td> |
| 62 | + <td>true</td> |
| 63 | + </tr> |
| 64 | + <tr> |
| 65 | + <td><b><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#objectmeta-v1-meta">metadata</a></b></td> |
| 66 | + <td>object</td> |
| 67 | + <td>Refer to the Kubernetes API documentation for the fields of the `metadata` field.</td> |
| 68 | + <td>true</td> |
| 69 | + </tr> |
| 70 | + {{- end -}} |
| 71 | + {{- range .Fields -}} |
| 72 | + <tr> |
| 73 | + <td><b>{{if .TypeKey}}<a href="#{{.TypeKey}}">{{.Name}}</a>{{else}}{{.Name}}{{end}}</b></td> |
| 74 | + <td>{{.Type}}</td> |
| 75 | + <td> |
| 76 | + {{.Description}}<br/> |
| 77 | + {{- if or .Schema.XValidations .Schema.Format .Schema.Enum .Schema.Default .Schema.Minimum .Schema.Maximum }} |
| 78 | + <br/> |
| 79 | + {{- end}} |
| 80 | + {{- if .Schema.XValidations }} |
| 81 | + <i>Validations</i>: |
| 82 | + {{- range .Schema.XValidations -}} |
| 83 | + <li>{{ .Rule }}: {{ .Message }}</li> |
| 84 | + {{- end -}} |
| 85 | + {{- end }} |
| 86 | + {{- if .Schema.Format }} |
| 87 | + <i>Format</i>: {{ .Schema.Format }}<br/> |
| 88 | + {{- end }} |
| 89 | + {{- if .Schema.Enum }} |
| 90 | + <i>Enum</i>: {{ .Schema.Enum | toStrings | join ", " }}<br/> |
| 91 | + {{- end }} |
| 92 | + {{- if .Schema.Default }} |
| 93 | + <i>Default</i>: {{ .Schema.Default }}<br/> |
| 94 | + {{- end }} |
| 95 | + {{- if .Schema.Minimum }} |
| 96 | + <i>Minimum</i>: {{ .Schema.Minimum }}<br/> |
| 97 | + {{- end }} |
| 98 | + {{- if .Schema.Maximum }} |
| 99 | + <i>Maximum</i>: {{ .Schema.Maximum }}<br/> |
| 100 | + {{- end }} |
| 101 | + </td> |
| 102 | + <td>{{.Required}}</td> |
| 103 | + </tr> |
| 104 | + {{- end -}} |
| 105 | + </tbody> |
| 106 | +</table> |
| 107 | + |
| 108 | +{{- end}}{{/* range .Types */}} |
| 109 | +{{- end}}{{/* range .Kinds */}} |
| 110 | +{{- end}}{{/* range .Groups */}} |
0 commit comments