Skip to content

Commit 051cd76

Browse files
TheRealJontmshort
authored andcommitted
Improve ClusterServiceVersion schema. (openshift#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. Upstream-repository: api Upstream-commit: 36145b1ddd99eddbba6f6439a7aa896ccac68346
1 parent 0a20493 commit 051cd76

File tree

8 files changed

+141
-38
lines changed

8 files changed

+141
-38
lines changed

manifests/0000_50_olm_00-clusterserviceversions.crd.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,21 @@ spec:
121121
resources:
122122
type: array
123123
items:
124-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
124+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
125125
type: object
126126
required:
127127
- kind
128128
- name
129129
- version
130130
properties:
131131
kind:
132+
description: Kind of the referenced resource type.
132133
type: string
133134
name:
135+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
134136
type: string
135137
version:
138+
description: API Version of the referenced resource type.
136139
type: string
137140
specDescriptors:
138141
type: array
@@ -231,18 +234,21 @@ spec:
231234
resources:
232235
type: array
233236
items:
234-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
237+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
235238
type: object
236239
required:
237240
- kind
238241
- name
239242
- version
240243
properties:
241244
kind:
245+
description: Kind of the referenced resource type.
242246
type: string
243247
name:
248+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
244249
type: string
245250
version:
251+
description: API Version of the referenced resource type.
246252
type: string
247253
specDescriptors:
248254
type: array
@@ -345,18 +351,21 @@ spec:
345351
resources:
346352
type: array
347353
items:
348-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
354+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
349355
type: object
350356
required:
351357
- kind
352358
- name
353359
- version
354360
properties:
355361
kind:
362+
description: Kind of the referenced resource type.
356363
type: string
357364
name:
365+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
358366
type: string
359367
version:
368+
description: API Version of the referenced resource type.
360369
type: string
361370
specDescriptors:
362371
type: array
@@ -447,18 +456,21 @@ spec:
447456
resources:
448457
type: array
449458
items:
450-
description: APIResourceReference is a Kubernetes resource type used by a custom resource
459+
description: APIResourceReference is a reference to a Kubernetes resource type that the referrer utilizes.
451460
type: object
452461
required:
453462
- kind
454463
- name
455464
- version
456465
properties:
457466
kind:
467+
description: Kind of the referenced resource type.
458468
type: string
459469
name:
470+
description: Plural name of the referenced resource type (CustomResourceDefinition.Spec.Names[].Plural). Empty string if the referenced resource type is not a custom resource.
460471
type: string
461472
version:
473+
description: API Version of the referenced resource type.
462474
type: string
463475
specDescriptors:
464476
type: array
@@ -507,10 +519,13 @@ spec:
507519
version:
508520
type: string
509521
description:
522+
description: Description of the operator. Can include the features, limitations or use-cases of the operator.
510523
type: string
511524
displayName:
525+
description: The name of the operator in display format.
512526
type: string
513527
icon:
528+
description: The icon for this operator.
514529
type: array
515530
items:
516531
type: object
@@ -4910,6 +4925,7 @@ spec:
49104925
description: InstallModeType is a supported type of install mode for CSV installation
49114926
type: string
49124927
keywords:
4928+
description: A list of keywords describing the operator.
49134929
type: array
49144930
items:
49154931
type: string
@@ -4919,6 +4935,7 @@ spec:
49194935
additionalProperties:
49204936
type: string
49214937
links:
4938+
description: A list of links related to the operator.
49224939
type: array
49234940
items:
49244941
type: object
@@ -4928,6 +4945,7 @@ spec:
49284945
url:
49294946
type: string
49304947
maintainers:
4948+
description: A list of organizational entities maintaining the operator.
49314949
type: array
49324950
items:
49334951
type: object
@@ -4957,6 +4975,7 @@ spec:
49574975
version:
49584976
type: string
49594977
provider:
4978+
description: The publishing entity behind the operator.
49604979
type: object
49614980
properties:
49624981
name:

pkg/manifests/csv.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
name: packageserver
66
namespace: openshift-operator-lifecycle-manager
77
labels:
8-
olm.version: 0.0.0-666c803e5f2685fe7b88a32defc86168ce759ccd
8+
olm.version: 0.0.0-d4e8df8d130771d303d2ea692f13b3ca7b6e559d
99
olm.clusteroperator.name: operator-lifecycle-manager-packageserver
1010
annotations:
1111
include.release.openshift.io/self-managed-high-availability: "true"
@@ -159,7 +159,7 @@ spec:
159159
- packageserver
160160
topologyKey: "kubernetes.io/hostname"
161161
maturity: alpha
162-
version: 0.0.0-666c803e5f2685fe7b88a32defc86168ce759ccd
162+
version: 0.0.0-d4e8df8d130771d303d2ea692f13b3ca7b6e559d
163163
apiservicedefinitions:
164164
owned:
165165
- group: packages.operators.coreos.com

staging/api/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:

staging/api/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.

staging/api/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)