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

apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "example.com/v1alpha1",
"kind": "Wordpress",
"metadata "name": "wordpress-sample"
},
"spec": {
"affinity": {},
"autoscaling": {
"enabled": false,
"maxReplicas": 100,
"minReplicas": 1,
"targetCPUUtilizationPercentage": 80
},
"fullnameOverride": "",
"image": {
"pullPolicy": "IfNotPresent",
"repository": "nginx",
"tag": ""
},
"imagePullSecrets": [],
"ingress": {
]
capabilities: Basic Install
categories: "Database"
description: A brief description about this Wordpress Operator
containerImage: quay.io/rhc4tp/wordpress-operator:v0.0.1
createdAt: 2020-09-03T12:59:59Z
support: Red Hat Connect Team
repository: https://github.com/rch4tp/wordpress-operator
operators.operatorframework.io/builder: operator-sdk-v1.0.0
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
name: wordpress.v0.0.1
namespace: placeholder
spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- kind: Wordpress
name: wordpresses.example.com
version: v1alpha1
description: Description ---NEEDS TO BE UPDATED---
displayName: Wordpress-operator
icon:
- 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"
mediatype: "img/png"
install:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- apiGroups:
- ""
resources:
- secrets
verbs:
- '*'
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- example.com
resources:
- wordpresses
- wordpresses/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
- services
- services/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
serviceAccountName: default
deployments:
- name: wordpress-controller-manager
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
strategy: {}
template:
metadata:
labels:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
name: kube-rbac-proxy
- name: RELATED_IMAGE_WORDPRESS
value: docker.io/bitnami/wordpress:5.3.2-debian-10-10
ports:
- containerPort: 8443
name: https
resources: {}
- args:
- --metrics-addr=127.0.0.1:8080
- --enable-leader-election
- --leader-election-id=wordpress
image: controller:latest
name: manager
resources:
limits:
cpu: 100m
memory: 90Mi
requests:
cpu: 100m
memory: 60Mi
terminationGracePeriodSeconds: 10
permissions:
- rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
serviceAccountName: default
strategy: deployment
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: true
type: AllNamespaces
keywords:
- cool
- fun
- easy
links:
- name: Wordpress
url: https://wordpress.domain
maintainers:
name: nhartman
maturity: alpha
provider:
name: Provider Name
version: 0.0.1