Skip to content

Commit 77fc3d0

Browse files
authored
Add alm-examples-metadata
Add extended metadata for `alm-examples` to be able to extend the capabilities of UI creating CRs. Can be used to identify, for example, different backend technologies (eg storage), different HA options, different deployment sizes (small, medium, large, or example workload based sizings)
1 parent 2b93a4b commit 77fc3d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/design/building-your-csv.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,17 @@ The Lifecycle Manager will check against the available CRDs and Operators in the
169169
description: Represents a cluster of etcd nodes.
170170
```
171171
## CRD Templates
172-
Users of your Operator will need to be aware of which options are required vs optional. You can provide templates for each of your CRDs with a minimum set of configuration as an annotation named `alm-examples`. Compatible UIs will pre-enter this template for users to further customize.
172+
Users of your Operator will need to be aware of which options are required vs optional. You can provide templates for each of your CRDs with a minimum set of configuration as an annotation named `alm-examples`. Metadata for each template, for exmaple an expanded description, can be included in an annotation named `alm-examples-metadata`, which should match the ordering of the `alm-examples` list. Compatible UIs will pre-enter the `alm-examples` template for users to further customize, and use the `alm-examples-metadata` to help users decide which template to select.
173173

174174
The annotation consists of a list of the `kind`, eg. the CRD name, and the corresponding `metadata` and `spec` of the Kubernetes object. Here’s a full example that provides templates for `EtcdCluster`, `EtcdBackup` and `EtcdRestore`:
175175

176176
```yaml
177177
metadata:
178178
annotations:
179+
alm-examples-metadata: >-
180+
[{"description":"Example EtcdCluster CR"},{"description":"Example EtcdRestore CR that restores data from S3"},{"description":"Example EtcdBackup CR that stores backups on S3"}]
179181
alm-examples: >-
180182
[{"apiVersion":"etcd.database.coreos.com/v1beta2","kind":"EtcdCluster","metadata":{"name":"example","namespace":"default"},"spec":{"size":3,"version":"3.2.13"}},{"apiVersion":"etcd.database.coreos.com/v1beta2","kind":"EtcdRestore","metadata":{"name":"example-etcd-cluster"},"spec":{"etcdCluster":{"name":"example-etcd-cluster"},"backupStorageType":"S3","s3":{"path":"<full-s3-path>","awsSecret":"<aws-secret>"}}},{"apiVersion":"etcd.database.coreos.com/v1beta2","kind":"EtcdBackup","metadata":{"name":"example-etcd-cluster-backup"},"spec":{"etcdEndpoints":["<etcd-cluster-endpoints>"],"storageType":"S3","s3":{"path":"<full-s3-path>","awsSecret":"<aws-secret>"}}}]
181-
182183
```
183184

184185
## Your API Services

0 commit comments

Comments
 (0)