Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1833411: Add README for OCS Plugin #5330

Merged
merged 1 commit into from
May 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
80 changes: 80 additions & 0 deletions frontend/packages/ceph-storage-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# OCS UI Features

The OCS UI requires some annotations in the OCS Operator CSV to perform various actions.

Following table maps the annotation to its use case and accepted values:
bipuladh marked this conversation as resolved.
Show resolved Hide resolved
|Annotation Name|Purpose|Accepted Values |
|---------------------------------------|---------------------------|--------|
| `features.ocs.openshift.io/enabled`| Activate UI Features | "external", "snapshot" |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `features.ocs.openshift.io/enabled`| Activate UI Features | "external", "snapshot" |
| `features.ocs.openshift.io/enabled`| Supported features from OCS backend | Array of supported features |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You pass these to activate the console features.

| `external.features.ocs.openshift.io/validation`| Mininum required keys to be supplied by the admin to connect to an external cluster | Array of Keys that need to be validated in UI |
||||

## Enabling Features in UI

UI features are activated based on the values in `features.ocs.openshift.io/enabled` annotation. The following table maps a feature and the respective annotation required to activate it.
| Feature |Feature guard|
|------------------------------|------------|
| External Cluster Installation| `external` |
| Volume Snapshots| `snapshot`

#### Example

"features.ocs.openshift.io/enabled": `["external"]`

## JSON validation (Independent Mode)

This is used to perform validation of the JSON file uploaded by the user during Independent mode installation. The values in `external.ocs.openshift.io/validation` annotation needs to be a stringified JSON. The JSON object should have the following keys and values:
| Key | Accepted Values | Validation Performed |
|------|-----------|-------------|
| `secrets` | Array of String| JSON should contain all the `secrets` defined in the array. The `data.userKey` /`data.adminKey` field should be Base64 encoded and non-empty.
|`configMaps`| Array of String| JSON should contain all the `configMaps` defined in the array. `data` field should be non-empty.
| `storageClasses`| Array of String| JSON should contain all the `storageClasses` defined in the array. `data` field should be non-empty.
bipuladh marked this conversation as resolved.
Show resolved Hide resolved

#### Example (CSV Annotataton)

external.features.ocs.openshift.io/validation: '{"secrets":["rook-ceph-operator-creds",

"rook-csi-rbd-node", "rook-csi-rbd-provisioner", "rook-csi-cephfs-node", rook-csi-cephfs-provisioner"],

"configMaps": ["rook-ceph-mon-endpoints", "rook-ceph-mon"], "storageClasses":

["rook-ceph-retain-bucket"]}'

#### Example (User Uploaded JSON)

Excerpt of the JSON uploaded by the user.

[
{
"kind": "ConfigMap",
"data": {
"maxMonId": "0",
"data": "a=10.106.31.93:6789",
"mapping": {}
},
"name": "rook-ceph-mon-endpoints"
},
{
"kind": "Secret",
"data": {
"userKey": "AQBI8bteZd52HxAAAgHS3TJGEfgZurN+gVvDNQ==",
"userID": "client.aaaa"
},
"name": "rook-ceph-operator-creds"
},
{
"kind": "Secret",
"data": {
"adminID": "csi-cephfs-provisioner",
"adminKey": "AQBV66pefnqmERAAKYhoO2XK5mUIGKSN4J/URw=="
},
"name": "rook-csi-cephfs-provisioner"
},
{
"kind": "StorageClass",
"data": {
"pool": "device_health_metrics"
},
"name": "ceph-rbd"
},
]