Adjusting the ClusterServiceVersion
The operator-sdk will generate most of the pieces of information you will need to get through certification, though some manual adjustments will need to be made.
In YAML, you don't need to place key names in any specific order, as long as the keys stay at the proper indentation level

Editing the CSV

Below is a list of other changes you need to make to the CSV as the command will not automatically create these necessary bits.

Fields to add under metadata.annotations

  • categories - Comma separated string of these applicable category names
  • description - Short description of the operator
  • containerImage - The full location (registry, repository, name and tag) of the operator image
  • createdAt - A rough (to the day) timestamp of when the operator image was created
  • support - Name of the supporting vendor (eg: ExampleCo)
  • repository - URL of the operator's source code repository (this field is optional)
The annotations above have been truncated to show you where the fields need to be added

Fields to adjust under spec

The Operator-SDK will generate the following fields but you will need to adjust them for certification
  • description - Long description of the operator's owned customresourcedefinitions in Markdown format. Usage instructions and relevant info for the user goes here
  • icon.base64data - A base64 encoded PNG, JPEG or SVG image will need to be added
  • icon.medatype - The corresponding MIME type of the image (eg: image/png)
The base64data was truncated in the example above to show you placement

Example CSV

1
apiVersion: operators.coreos.com/v1alpha1
2
kind: ClusterServiceVersion
3
metadata:
4
annotations:
5
alm-examples: |-
6
[
7
{
8
"apiVersion": "example.com/v1alpha1",
9
"kind": "Wordpress",
10
"metadata "name": "wordpress-sample"
11
},
12
"spec": {
13
"affinity": {},
14
"autoscaling": {
15
"enabled": false,
16
"maxReplicas": 100,
17
"minReplicas": 1,
18
"targetCPUUtilizationPercentage": 80
19
},
20
"fullnameOverride": "",
21
"image": {
22
"pullPolicy": "IfNotPresent",
23
"repository": "nginx",
24
"tag": ""
25
},
26
"imagePullSecrets": [],
27
"ingress": {
28
29
]
30
capabilities: Basic Install
31
categories: "Database"
32
description: A brief description about this Wordpress Operator
33
containerImage: quay.io/rhc4tp/wordpress-operator:v0.0.1
34
createdAt: 2020-09-03T12:59:59Z
35
support: Red Hat Connect Team
36
repository: https://github.com/rch4tp/wordpress-operator
37
operators.operatorframework.io/builder: operator-sdk-v1.0.0
38
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
39
name: wordpress.v0.0.1
40
namespace: placeholder
41
spec:
42
apiservicedefinitions: {}
43
customresourcedefinitions:
44
owned:
45
- kind: Wordpress
46
name: wordpresses.example.com
47
version: v1alpha1
48
description: Description ---NEEDS TO BE UPDATED---
49
displayName: Wordpress-operator
50
icon:
51
- base64data: "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAGBGCm0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAmFlJREFUeNpi/P//PwN9ARMD3QFdrZy56iCQZKRpwC7bejK3bfm7j18Z/gGtAqH/V2bTykqgTV9uH0qxYmFmYvj7j2HByT8hBswBc35+vzCbhRb22cV3TXF58lmUxWbiD0dV5lw7FqC3BDgZnx+eSJOA/fnrz8Ulhb//ogiyAb1mWmyqo0CT5MNvkIFmX93236aJkyH2AQGVA5ZZL+1QISeyyIE7//aum0GrTPL7z99aN3Q/1Gz+RcN8yaaf4arOjCa4a24hraxk1Ek9XMCBnpT+MLhaatHESibdtKMFHIwY4hMO/sZUTGnycU3tk/5z+3AeO9a8tvnyX+pY+fz1R//cKafP3F+bzdFgxojHkCBXIyxRQHxRoO5Tc+v6i025HCI8jP+I0AQsbrRjJpFpJTBpNHiyuaiRFvGu035+Oz+LnIBVtE47ks9BcgJmZPj++z859eWcluwlCexkxHfayl+bpuSQbKWkZZqmOOHAtOn8AWe/+gKm/jOYyTIZaMiSZiWLbvqaJOL8x4aURGf+4GRlzFrzK9mSZdbqQ8RauW7POUbt1EP5UJNYmBj6D/72m/0zaO7PyIU/zz7+x8vOyALTFzr/p4MarJD7D0obxj3fp4WC9LbM2Io9miEp1sQzHagOrdIBVugOU/78OD8dq85Lt56EFs249eDl4XxouQOskIHtDEgKZwAW5v/+21ipHl5Ujt3Kos5V/bN3HylHpMyslb8u7plJOGVqph4pAumymfDj/9XZxMQDNJPs27sXaB8wZQtwMFpP/OFub3JxTxpBzVzGWUD7mBgZrPp+XNnUSGxq/k8uuHzrSVBkOoNWin18F0kaGUdb6zS18vwWlPJ31+RcAs3wYmes4idWdgOlgGjv9GJkxUB0fFkHSvJZWuSEHMNoXOLB6XWT4GygNWimfX3/CkhCfalg7HLv9E4Ie+fEHGQHXtu/8sLWOceWtn1592JjS9SqSi9wMOTBFbx/dndLZ8KtI+vRfBzZs2dFuQec++TKUXYefkS+VLX03TejVMnUHcj++u65gXcqkPHn14+o3r0QBUD2jy8fgIyw9m1wU1aUuUMU+JQvWFsfrGYTiGbrvz/Qts/2vvT3T++Ed26HWvnn109RRR0g//axTe+f3g1qXPsTbPrNw+u0naOgRQYblirz398/cLaeewKWsokJGoqeRTMhQQJ0IkjozcOrEInTaye+uHUGyGDnEfj44gHQviOLmyFSQE9gmmibgChxTq+dgCa7pjYgsns39gLv8Pz60LbNQAY8GMFeXG8WWmgdUwNJnECpr+9eMLGwQkt8MENW1+bq3mUXt83l5BM2CwE1kZmYWFZWeDEyMkqoGoU0b4ApZgMKSmmYQswfGaUPQADR25dMwzZIV2w/TfPwBLbrbz8ElW0i3Ixvvv4X5OOilX3ARtqZUo5ff4CNHgY2Zob6Hb8aPdg+amYx0ciyIwUc6y/+tZoAatPuuP4v0YzVeeIPF0tN6vuPUSP1SDFKWQhs7fnP+fn65Czqj0Q4JHQfK+FA7oIBLfOay/jh5CyajHz8eH3n3382ZBFrWCOW+vYBm8VoH"
52
mediatype: "img/png"
53
install:
54
spec:
55
clusterPermissions:
56
- rules:
57
- apiGroups:
58
- ""
59
resources:
60
- namespaces
61
verbs:
62
- get
63
- apiGroups:
64
- ""
65
resources:
66
- secrets
67
verbs:
68
- '*'
69
- apiGroups:
70
- ""
71
resources:
72
- events
73
verbs:
74
- create
75
- apiGroups:
76
- example.com
77
resources:
78
- wordpresses
79
- wordpresses/status
80
verbs:
81
- create
82
- delete
83
- get
84
- list
85
- patch
86
- update
87
- watch
88
- apiGroups:
89
- ""
90
resources:
91
- pods
92
- services
93
- services/finalizers
94
- endpoints
95
- persistentvolumeclaims
96
- events
97
- configmaps
98
- secrets
99
verbs:
100
- create
101
- delete
102
- get
103
- list
104
- patch
105
- update
106
- watch
107
- apiGroups:
108
- apps
109
resources:
110
- deployments
111
- daemonsets
112
- replicasets
113
- statefulsets
114
verbs:
115
- create
116
- delete
117
- get
118
- list
119
- patch
120
- update
121
- watch
122
- apiGroups:
123
- authentication.k8s.io
124
resources:
125
- tokenreviews
126
verbs:
127
- create
128
- apiGroups:
129
- authorization.k8s.io
130
resources:
131
- subjectaccessreviews
132
verbs:
133
- create
134
serviceAccountName: default
135
deployments:
136
- name: wordpress-controller-manager
137
spec:
138
replicas: 1
139
selector:
140
matchLabels:
141
control-plane: controller-manager
142
strategy: {}
143
template:
144
metadata:
145
labels:
146
control-plane: controller-manager
147
spec:
148
containers:
149
- args:
150
- --secure-listen-address=0.0.0.0:8443
151
- --upstream=http://127.0.0.1:8080/
152
- --logtostderr=true
153
- --v=10
154
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
155
name: kube-rbac-proxy
156
- name: RELATED_IMAGE_WORDPRESS
157
value: docker.io/bitnami/wordpress:5.3.2-debian-10-10
158
ports:
159
- containerPort: 8443
160
name: https
161
resources: {}
162
- args:
163
- --metrics-addr=127.0.0.1:8080
164
- --enable-leader-election
165
- --leader-election-id=wordpress
166
image: controller:latest
167
name: manager
168
resources:
169
limits:
170
cpu: 100m
171
memory: 90Mi
172
requests:
173
cpu: 100m
174
memory: 60Mi
175
terminationGracePeriodSeconds: 10
176
permissions:
177
- rules:
178
- apiGroups:
179
- ""
180
resources:
181
- configmaps
182
verbs:
183
- get
184
- list
185
- watch
186
- create
187
- update
188
- patch
189
- delete
190
- apiGroups:
191
- ""
192
resources:
193
- events
194
verbs:
195
- create
196
- patch
197
serviceAccountName: default
198
strategy: deployment
199
installModes:
200
- supported: true
201
type: OwnNamespace
202
- supported: true
203
type: SingleNamespace
204
- supported: false
205
type: MultiNamespace
206
- supported: true
207
type: AllNamespaces
208
keywords:
209
- cool
210
- fun
211
- easy
212
links:
213
- name: Wordpress
214
url: https://wordpress.domain
215
maintainers:
216
217
name: nhartman
218
maturity: alpha
219
provider:
220
name: Provider Name
221
version: 0.0.1
Copied!