Skip to content

Commit 41a86bc

Browse files
committed
Improve ClusterServiceVersion schema
Fixes #167 Add descriptions for kind, name, and version properties of APIResourceReference schema.
1 parent 37561c9 commit 41a86bc

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

crds/operators.coreos.com_clusterserviceversions.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,13 @@ spec:
127127
- version
128128
properties:
129129
kind:
130+
description: Kind of the referent
130131
type: string
131132
name:
133+
description: Name of the CustomResourceDefinition for the referent, or an empty string when the referent is not a custom resource
132134
type: string
133135
version:
136+
description: API version of the referent
134137
type: string
135138
specDescriptors:
136139
type: array
@@ -237,10 +240,13 @@ spec:
237240
- version
238241
properties:
239242
kind:
243+
description: Kind of the referent
240244
type: string
241245
name:
246+
description: Name of the CustomResourceDefinition for the referent, or an empty string when the referent is not a custom resource
242247
type: string
243248
version:
249+
description: API version of the referent
244250
type: string
245251
specDescriptors:
246252
type: array
@@ -351,10 +357,13 @@ spec:
351357
- version
352358
properties:
353359
kind:
360+
description: Kind of the referent
354361
type: string
355362
name:
363+
description: Name of the CustomResourceDefinition for the referent, or an empty string when the referent is not a custom resource
356364
type: string
357365
version:
366+
description: API version of the referent
358367
type: string
359368
specDescriptors:
360369
type: array
@@ -453,10 +462,13 @@ spec:
453462
- version
454463
properties:
455464
kind:
465+
description: Kind of the referent
456466
type: string
457467
name:
468+
description: Name of the CustomResourceDefinition for the referent, or an empty string when the referent is not a custom resource
458469
type: string
459470
version:
471+
description: API version of the referent
460472
type: string
461473
specDescriptors:
462474
type: array

crds/zz_defs.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/operators/v1alpha1/clusterserviceversion_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,11 @@ type APIServiceDescription struct {
148148
// APIResourceReference is a Kubernetes resource type used by a custom resource
149149
// +k8s:openapi-gen=true
150150
type APIResourceReference struct {
151+
// Name of the CustomResourceDefinition for the referent, or an empty string when the referent is not a custom resource
151152
Name string `json:"name"`
153+
// Kind of the referent
152154
Kind string `json:"kind"`
155+
// API version of the referent
153156
Version string `json:"version"`
154157
}
155158

0 commit comments

Comments
 (0)