Skip to content

Commit de0e723

Browse files
committed
feat: generate CRD ref docs
Signed-off-by: Mateusz Urbanek <[email protected]>
1 parent 40867d0 commit de0e723

File tree

13 files changed

+327
-16
lines changed

13 files changed

+327
-16
lines changed

.github/workflows/docs.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,19 @@ jobs:
5454
- name: Setup Pages
5555
id: pages
5656
uses: actions/configure-pages@v5
57+
- uses: actions/setup-go@v5
58+
with:
59+
go-version-file: ./hack/tools/go.mod
60+
- name: Install crd-ref-docs
61+
run: |
62+
go install github.com/elastic/crd-ref-docs@latest
5763
- name: Build with mdBook
5864
run: |
65+
crd-ref-docs \
66+
--config=./docs/.crd-ref-docs.yaml \
67+
--source-path=./client/apis \
68+
--renderer=markdown \
69+
--output-path=./docs/src/api/
5970
cd docs
6071
mdbook build
6172
- name: Upload artifact

docs/.crd-ref-docs.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
processor:
2+
# RE2 regular expressions describing types that should be excluded from the generated documentation.
3+
ignoreTypes: []
4+
# RE2 regular expressions describing type fields that should be excluded from the generated documentation.
5+
ignoreFields: []
6+
render:
7+
# Version of Kubernetes to use when generating links to Kubernetes API documentation.
8+
kubernetesVersion: '1.32'

docs/src/SUMMARY.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
- [Quick Start](./quick-start.md)
55
- [Tasks](./operations/tasks.md)
66
- [Installing COSI Driver](./operations/installing-driver.md)
7+
- [Monitoring](./operations/monitoring.md)
78
- [Troubleshooting](./operations/troubleshooting.md)
89
- [Developer guide](./developing/guide.md)
910
- [Developing "core" COSI](./developing/core.md)
11+
- [Controller](./developing/core/controller.md)
12+
- [Sidecar](./developing/core/sidecar.md)
13+
- [Documentation](./developing/core/docs.md)
1014
- [Developing a COSI Driver](./developing/drivers.md)
1115
- [Developing client applications](./developing/clients.md)
1216
- [Go](./developing/clients/go.md)
13-
- [Java](./developing/clients/java.md)
14-
- [Python](./developing/clients/python.md)
17+
<!-- TODO(guides): add new guides here -->
1518
- [Drivers](./drivers.md)
16-
- [API Reference](./api.md)
19+
- [API Reference](./api/out.md)

docs/src/api.md

-3
This file was deleted.

docs/src/api/out.md

+289
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
# API Reference
2+
3+
## Packages
4+
- [objectstorage.k8s.io/v1alpha1](#objectstoragek8siov1alpha1)
5+
6+
7+
## objectstorage.k8s.io/v1alpha1
8+
9+
10+
11+
12+
#### AuthenticationType
13+
14+
_Underlying type:_ _string_
15+
16+
17+
18+
19+
20+
_Appears in:_
21+
- [BucketAccessClass](#bucketaccessclass)
22+
23+
| Field | Description |
24+
| --- | --- |
25+
| `Key` | |
26+
| `IAM` | |
27+
28+
29+
#### Bucket
30+
31+
32+
33+
34+
35+
36+
37+
_Appears in:_
38+
- [BucketList](#bucketlist)
39+
40+
| Field | Description | Default | Validation |
41+
| --- | --- | --- | --- |
42+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
43+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
44+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
45+
| `spec` _[BucketSpec](#bucketspec)_ | | | |
46+
| `status` _[BucketStatus](#bucketstatus)_ | | | |
47+
48+
49+
#### BucketAccess
50+
51+
52+
53+
54+
55+
56+
57+
_Appears in:_
58+
- [BucketAccessList](#bucketaccesslist)
59+
60+
| Field | Description | Default | Validation |
61+
| --- | --- | --- | --- |
62+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
63+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
64+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
65+
| `spec` _[BucketAccessSpec](#bucketaccessspec)_ | | | |
66+
| `status` _[BucketAccessStatus](#bucketaccessstatus)_ | | | |
67+
68+
69+
#### BucketAccessClass
70+
71+
72+
73+
74+
75+
76+
77+
_Appears in:_
78+
- [BucketAccessClassList](#bucketaccessclasslist)
79+
80+
| Field | Description | Default | Validation |
81+
| --- | --- | --- | --- |
82+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
83+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
84+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
85+
| `driverName` _string_ | DriverName is the name of driver associated with<br />this BucketAccess | | |
86+
| `authenticationType` _[AuthenticationType](#authenticationtype)_ | AuthenticationType denotes the style of authentication<br />It can be one of<br />Key - access, secret tokens based authentication<br />IAM - implicit authentication of pods to the OSP based on service account mappings | | |
87+
| `parameters` _object (keys:string, values:string)_ | Parameters is an opaque map for passing in configuration to a driver<br />for granting access to a bucket | | |
88+
89+
90+
91+
92+
93+
94+
#### BucketAccessSpec
95+
96+
97+
98+
99+
100+
101+
102+
_Appears in:_
103+
- [BucketAccess](#bucketaccess)
104+
105+
| Field | Description | Default | Validation |
106+
| --- | --- | --- | --- |
107+
| `bucketClaimName` _string_ | BucketClaimName is the name of the BucketClaim. | | |
108+
| `protocol` _[Protocol](#protocol)_ | Protocol is the name of the Protocol<br />that this access credential is supposed to support<br />If left empty, it will choose the protocol supported<br />by the bucket. If the bucket supports multiple protocols,<br />the end protocol is determined by the driver. | | |
109+
| `bucketAccessClassName` _string_ | BucketAccessClassName is the name of the BucketAccessClass | | |
110+
| `credentialsSecretName` _string_ | CredentialsSecretName is the name of the secret that COSI should populate<br />with the credentials. If a secret by this name already exists, then it is<br />assumed that credentials have already been generated. It is not overridden.<br />This secret is deleted when the BucketAccess is delted. | | |
111+
| `serviceAccountName` _string_ | ServiceAccountName is the name of the serviceAccount that COSI will map<br />to the OSP service account when IAM styled authentication is specified | | |
112+
113+
114+
#### BucketAccessStatus
115+
116+
117+
118+
119+
120+
121+
122+
_Appears in:_
123+
- [BucketAccess](#bucketaccess)
124+
125+
| Field | Description | Default | Validation |
126+
| --- | --- | --- | --- |
127+
| `accountID` _string_ | AccountID is the unique ID for the account in the OSP. It will be populated<br />by the COSI sidecar once access has been successfully granted. | | |
128+
| `accessGranted` _boolean_ | AccessGranted indicates the successful grant of privileges to access the bucket | | |
129+
130+
131+
#### BucketClaim
132+
133+
134+
135+
136+
137+
138+
139+
_Appears in:_
140+
- [BucketClaimList](#bucketclaimlist)
141+
142+
| Field | Description | Default | Validation |
143+
| --- | --- | --- | --- |
144+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
145+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
146+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
147+
| `spec` _[BucketClaimSpec](#bucketclaimspec)_ | | | |
148+
| `status` _[BucketClaimStatus](#bucketclaimstatus)_ | | | |
149+
150+
151+
152+
153+
#### BucketClaimSpec
154+
155+
156+
157+
158+
159+
160+
161+
_Appears in:_
162+
- [BucketClaim](#bucketclaim)
163+
164+
| Field | Description | Default | Validation |
165+
| --- | --- | --- | --- |
166+
| `bucketClassName` _string_ | Name of the BucketClass | | |
167+
| `protocols` _[Protocol](#protocol) array_ | Protocols are the set of data API this bucket is required to support.<br />The possible values for protocol are:<br />- S3: Indicates Amazon S3 protocol<br />- Azure: Indicates Microsoft Azure BlobStore protocol<br />- GCS: Indicates Google Cloud Storage protocol | | |
168+
| `existingBucketName` _string_ | Name of a bucket object that was manually<br />created to import a bucket created outside of COSI<br />If unspecified, then a new Bucket will be dynamically provisioned | | |
169+
170+
171+
#### BucketClaimStatus
172+
173+
174+
175+
176+
177+
178+
179+
_Appears in:_
180+
- [BucketClaim](#bucketclaim)
181+
182+
| Field | Description | Default | Validation |
183+
| --- | --- | --- | --- |
184+
| `bucketReady` _boolean_ | BucketReady indicates that the bucket is ready for consumpotion<br />by workloads | | |
185+
| `bucketName` _string_ | BucketName is the name of the provisioned Bucket in response<br />to this BucketClaim. It is generated and set by the COSI controller<br />before making the creation request to the OSP backend. | | |
186+
187+
188+
#### BucketClass
189+
190+
191+
192+
193+
194+
195+
196+
_Appears in:_
197+
- [BucketClassList](#bucketclasslist)
198+
199+
| Field | Description | Default | Validation |
200+
| --- | --- | --- | --- |
201+
| `kind` _string_ | Kind is a string value representing the REST resource this object represents.<br />Servers may infer this from the endpoint the client submits requests to.<br />Cannot be updated.<br />In CamelCase.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | | |
202+
| `apiVersion` _string_ | APIVersion defines the versioned schema of this representation of an object.<br />Servers should convert recognized schemas to the latest internal value, and<br />may reject unrecognized values.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | | |
203+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
204+
| `driverName` _string_ | DriverName is the name of driver associated with this bucket | | |
205+
| `deletionPolicy` _[DeletionPolicy](#deletionpolicy)_ | DeletionPolicy is used to specify how COSI should handle deletion of this<br />bucket. There are 2 possible values:<br /> - Retain: Indicates that the bucket should not be deleted from the OSP<br /> - Delete: Indicates that the bucket should be deleted from the OSP<br /> once all the workloads accessing this bucket are done | Retain | |
206+
| `parameters` _object (keys:string, values:string)_ | Parameters is an opaque map for passing in configuration to a driver<br />for creating the bucket | | |
207+
208+
209+
210+
211+
212+
213+
#### BucketSpec
214+
215+
216+
217+
218+
219+
220+
221+
_Appears in:_
222+
- [Bucket](#bucket)
223+
224+
| Field | Description | Default | Validation |
225+
| --- | --- | --- | --- |
226+
| `driverName` _string_ | DriverName is the name of driver associated with this bucket | | |
227+
| `bucketClassName` _string_ | Name of the BucketClass specified in the BucketRequest | | |
228+
| `bucketClaim` _[ObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectreference-v1-core)_ | Name of the BucketClaim that resulted in the creation of this Bucket<br />In case the Bucket object was created manually, then this should refer<br />to the BucketClaim with which this Bucket should be bound | | |
229+
| `protocols` _[Protocol](#protocol) array_ | Protocols are the set of data APIs this bucket is expected to support.<br />The possible values for protocol are:<br />- S3: Indicates Amazon S3 protocol<br />- Azure: Indicates Microsoft Azure BlobStore protocol<br />- GCS: Indicates Google Cloud Storage protocol | | |
230+
| `parameters` _object (keys:string, values:string)_ | | | |
231+
| `deletionPolicy` _[DeletionPolicy](#deletionpolicy)_ | DeletionPolicy is used to specify how COSI should handle deletion of this<br />bucket. There are 2 possible values:<br /> - Retain: Indicates that the bucket should not be deleted from the OSP (default)<br /> - Delete: Indicates that the bucket should be deleted from the OSP<br /> once all the workloads accessing this bucket are done | Retain | |
232+
| `existingBucketID` _string_ | ExistingBucketID is the unique id of the bucket in the OSP. This field should be<br />used to specify a bucket that has been created outside of COSI.<br />This field will be empty when the Bucket is dynamically provisioned by COSI. | | |
233+
234+
235+
#### BucketStatus
236+
237+
238+
239+
240+
241+
242+
243+
_Appears in:_
244+
- [Bucket](#bucket)
245+
246+
| Field | Description | Default | Validation |
247+
| --- | --- | --- | --- |
248+
| `bucketReady` _boolean_ | BucketReady is a boolean condition to reflect the successful creation<br />of a bucket. | | |
249+
| `bucketID` _string_ | BucketID is the unique id of the bucket in the OSP. This field will be<br />populated by COSI. | | |
250+
251+
252+
#### DeletionPolicy
253+
254+
_Underlying type:_ _string_
255+
256+
257+
258+
259+
260+
_Appears in:_
261+
- [BucketClass](#bucketclass)
262+
- [BucketSpec](#bucketspec)
263+
264+
| Field | Description |
265+
| --- | --- |
266+
| `Retain` | |
267+
| `Delete` | |
268+
269+
270+
#### Protocol
271+
272+
_Underlying type:_ _string_
273+
274+
275+
276+
277+
278+
_Appears in:_
279+
- [BucketAccessSpec](#bucketaccessspec)
280+
- [BucketClaimSpec](#bucketclaimspec)
281+
- [BucketSpec](#bucketspec)
282+
283+
| Field | Description |
284+
| --- | --- |
285+
| `S3` | |
286+
| `Azure` | |
287+
| `GCP` | |
288+
289+

docs/src/developing/clients.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ For more details, refer to the [Kubernetes Versioning and Deprecation Policy](ht
2020

2121
For guidance on developing clients, refer to our language-specific documentation:
2222
- [Go Client Guide](./clients/go.md)
23-
- [Java Client Guide](./clients/java.md)
24-
- [Python Client Guide](./clients/python.md)
23+
<!-- TODO(guides): add new guides -->
2524

2625
If additional client guides are needed, we welcome contributions from the community.
2726

docs/src/developing/clients/java.md

-3
This file was deleted.

docs/src/developing/clients/python.md

-3
This file was deleted.

docs/src/developing/core.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
# Developing "core" COSI
22

33
With “core” COSI we refer to the common set of API and controllers that are required to run any COSI driver.
4-
5-
// TODO
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Controller
2+
3+
// TODO

docs/src/developing/core/docs.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Documentation
2+
3+
// TODO

docs/src/developing/core/sidecar.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Sidecar
2+
3+
// TODO

docs/src/operations/monitoring.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Monitoring
2+
3+
// TODO

0 commit comments

Comments
 (0)