Skip to content

Commit 36145b1

Browse files
authored
Improve ClusterServiceVersion schema. (#168)
Add descriptions for kind, name, and version properties of APIResourceReference type as well as DisplayName, Description, Keywords, Maintainers, Provider, Links, and Icon properties of ClusterServiceVersionSpec.
1 parent 0131a63 commit 36145b1

File tree

3 files changed

+58
-16
lines changed

3 files changed

+58
-16
lines changed

crds/operators.coreos.com_clusterserviceversions.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,21 @@ spec:
119119
resources:
120120
type: array
121121
items:
122-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
122+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
123123
type: object
124124
required:
125125
- kind
126126
- name
127127
- version
128128
properties:
129129
kind:
130+
description: Kind of the referenced resource type.
130131
type: string
131132
name:
133+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
132134
type: string
133135
version:
136+
description: API Version of the referenced resource type.
134137
type: string
135138
specDescriptors:
136139
type: array
@@ -229,18 +232,21 @@ spec:
229232
resources:
230233
type: array
231234
items:
232-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
235+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
233236
type: object
234237
required:
235238
- kind
236239
- name
237240
- version
238241
properties:
239242
kind:
243+
description: Kind of the referenced resource type.
240244
type: string
241245
name:
246+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
242247
type: string
243248
version:
249+
description: API Version of the referenced resource type.
244250
type: string
245251
specDescriptors:
246252
type: array
@@ -343,18 +349,21 @@ spec:
343349
resources:
344350
type: array
345351
items:
346-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
352+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
347353
type: object
348354
required:
349355
- kind
350356
- name
351357
- version
352358
properties:
353359
kind:
360+
description: Kind of the referenced resource type.
354361
type: string
355362
name:
363+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
356364
type: string
357365
version:
366+
description: API Version of the referenced resource type.
358367
type: string
359368
specDescriptors:
360369
type: array
@@ -445,18 +454,21 @@ spec:
445454
resources:
446455
type: array
447456
items:
448-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
457+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
449458
type: object
450459
required:
451460
- kind
452461
- name
453462
- version
454463
properties:
455464
kind:
465+
description: Kind of the referenced resource type.
456466
type: string
457467
name:
468+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
458469
type: string
459470
version:
471+
description: API Version of the referenced resource type.
460472
type: string
461473
specDescriptors:
462474
type: array
@@ -505,10 +517,13 @@ spec:
505517
version:
506518
type: string
507519
description:
520+
description: Description of the operator. Can include the features, limitations or use-cases of the operator.
508521
type: string
509522
displayName:
523+
description: The name of the operator in display format.
510524
type: string
511525
icon:
526+
description: The icon for this operator.
512527
type: array
513528
items:
514529
type: object
@@ -4908,6 +4923,7 @@ spec:
49084923
description: InstallModeType is a supported type of install mode for CSV installation
49094924
type: string
49104925
keywords:
4926+
description: A list of keywords describing the operator.
49114927
type: array
49124928
items:
49134929
type: string
@@ -4917,6 +4933,7 @@ spec:
49174933
additionalProperties:
49184934
type: string
49194935
links:
4936+
description: A list of links related to the operator.
49204937
type: array
49214938
items:
49224939
type: object
@@ -4926,6 +4943,7 @@ spec:
49264943
url:
49274944
type: string
49284945
maintainers:
4946+
description: A list of organizational entities maintaining the operator.
49294947
type: array
49304948
items:
49314949
type: object
@@ -4955,6 +4973,7 @@ spec:
49554973
version:
49564974
type: string
49574975
provider:
4976+
description: The publishing entity behind the operator.
49584977
type: object
49594978
properties:
49604979
name:

crds/zz_defs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/operators/v1alpha1/clusterserviceversion_types.go

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,13 @@ type APIServiceDescription struct {
145145
ActionDescriptor []ActionDescriptor `json:"actionDescriptors,omitempty"`
146146
}
147147

148-
// APIResourceReference is a Kubernetes resource type used by a custom resource
149-
// +k8s:openapi-gen=true
148+
// APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
150149
type APIResourceReference struct {
151-
Name string `json:"name"`
152-
Kind string `json:"kind"`
150+
// Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
151+
Name string `json:"name"`
152+
// Kind of the referenced resource type.
153+
Kind string `json:"kind"`
154+
// API Version of the referenced resource type.
153155
Version string `json:"version"`
154156
}
155157

@@ -279,13 +281,34 @@ type ClusterServiceVersionSpec struct {
279281
WebhookDefinitions []WebhookDescription `json:"webhookdefinitions,omitempty"`
280282
NativeAPIs []metav1.GroupVersionKind `json:"nativeAPIs,omitempty"`
281283
MinKubeVersion string `json:"minKubeVersion,omitempty"`
282-
DisplayName string `json:"displayName"`
283-
Description string `json:"description,omitempty"`
284-
Keywords []string `json:"keywords,omitempty"`
285-
Maintainers []Maintainer `json:"maintainers,omitempty"`
286-
Provider AppLink `json:"provider,omitempty"`
287-
Links []AppLink `json:"links,omitempty"`
288-
Icon []Icon `json:"icon,omitempty"`
284+
285+
// The name of the operator in display format.
286+
DisplayName string `json:"displayName"`
287+
288+
// Description of the operator. Can include the features, limitations or use-cases of the
289+
// operator.
290+
// +optional
291+
Description string `json:"description,omitempty"`
292+
293+
// A list of keywords describing the operator.
294+
// +optional
295+
Keywords []string `json:"keywords,omitempty"`
296+
297+
// A list of organizational entities maintaining the operator.
298+
// +optional
299+
Maintainers []Maintainer `json:"maintainers,omitempty"`
300+
301+
// The publishing entity behind the operator.
302+
// +optional
303+
Provider AppLink `json:"provider,omitempty"`
304+
305+
// A list of links related to the operator.
306+
// +optional
307+
Links []AppLink `json:"links,omitempty"`
308+
309+
// The icon for this operator.
310+
// +optional
311+
Icon []Icon `json:"icon,omitempty"`
289312

290313
// InstallModes specify supported installation types
291314
// +optional

0 commit comments

Comments
 (0)