Skip to content

Commit

Permalink
lint: update markdown files with prettier --write
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen M <[email protected]>
  • Loading branch information
iPraveenParihar authored and mergify[bot] committed Aug 21, 2024
1 parent 6165a50 commit 892bad1
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 87 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ regularly participate in the project. There are two GitHub teams that contain
members who can approve changes:

- @csi-addons/kubernetes-csi-addons-contributors: regular contributors,
sending Pull-Requests, designing new features
sending Pull-Requests, designing new features
- @csi-addons/kubernetes-csi-addons-reviewers: contributors to the general
CSI-Addons project, sharing expertise and domain knowledge
CSI-Addons project, sharing expertise and domain knowledge

For changes that are related to the integration with other components or affect
the user interface (Pull-Requests with the `api` label), an approval from
Expand Down
2 changes: 1 addition & 1 deletion cmd/csi-addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ The following operations are supported:

The above command assumes the running `csi-backend-nodeplugin` Pod has the
`quay.io/csiaddons/k8s-sidecar` as a container named `csi-addons`. Executing
the `csi-addons -h` command then shows the help text.
the `csi-addons -h` command then shows the help text.
10 changes: 5 additions & 5 deletions docs/csi-addons-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ CSI-Addons Operator can consume configuration from a ConfigMap named `csi-addons
in the same namespace as the operator. This enables configuration of the operator to persist across
upgrades. The ConfigMap can support the following configuration options:

| Option | Default value | Description |
| ----------------------------- | --------------- | --------------------------------------------- |
| `reclaim-space-timeout` | `"3m"` | Timeout for reclaimspace operation |
| `max-concurrent-reconciles` | `"100"` | Maximum number of concurrent reconciles |
| Option | Default value | Description |
| --------------------------- | ------------- | --------------------------------------- |
| `reclaim-space-timeout` | `"3m"` | Timeout for reclaimspace operation |
| `max-concurrent-reconciles` | `"100"` | Maximum number of concurrent reconciles |

[`csi-addons-config` ConfigMap](../deploy/controller/csi-addons-config.yaml) is provided as an example.

> Note: The operator pod needs to be restarted for any change in configuration to take effect.
> Note: The operator pod needs to be restarted for any change in configuration to take effect.
17 changes: 9 additions & 8 deletions docs/csiaddonsnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ kind: CSIAddonsNode
metadata:
name: csiaddonsnode-sample
spec:
driver:
name: driver.csi.example.io
endpoint: pod://csiaddonsnode-sample.csi-addons-system:9070
nodeID: node-1
driver:
name: driver.csi.example.io
endpoint: pod://csiaddonsnode-sample.csi-addons-system:9070
nodeID: node-1
```
+ `driver` contains the required information about the CSI driver.
+ `name` contains the name of the driver. The name of the driver is in the format: `driver.csi.example.io`
+ `endpoint` contains the URL that contains the name of the Pod and its Namespace that can be used by the controller to connect to.
+ `nodeID` contains the ID of node to identify on which node the side-car is running.
- `driver` contains the required information about the CSI driver.
- `name` contains the name of the driver. The name of the driver is in the format: `driver.csi.example.io`
- `endpoint` contains the URL that contains the name of the Pod and its Namespace that can be used by the controller to connect to.
- `nodeID` contains the ID of node to identify on which node the side-car is running.
36 changes: 18 additions & 18 deletions docs/deploy-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ The CSI-Addons Controller can be deployed by different ways:

**Available command-line arguments:**

| Option | Default value | Description |
| ----------------------------- | --------------- | --------------------------------------------- |
| `--metrics-bind-address` | `:8080` | The address the metric endpoint binds to. |
| `--health-probe-bind-address` | `:8081` | The address the probe endpoint binds to. |
| `--leader-elect` | `false` | Enable leader election for controller manager.|
| `--reclaim-space-timeout` | `3m` | Timeout for reclaimspace operation |
| `--max-concurrent-reconciles` | 100 | Maximum number of concurrent reconciles |
| Option | Default value | Description |
| ----------------------------- | ------------- | ---------------------------------------------- |
| `--metrics-bind-address` | `:8080` | The address the metric endpoint binds to. |
| `--health-probe-bind-address` | `:8081` | The address the probe endpoint binds to. |
| `--leader-elect` | `false` | Enable leader election for controller manager. |
| `--reclaim-space-timeout` | `3m` | Timeout for reclaimspace operation |
| `--max-concurrent-reconciles` | 100 | Maximum number of concurrent reconciles |

> Note: Some of the above configuration options can also be configured using [`"csi-addons-config"` configmap](./csi-addons-config.md).
Expand All @@ -24,7 +24,7 @@ The latest CSI-Addons Controller can be installed using the YAML files in `deplo

The versioned deployment of the CSI-Addons Controller can be installed using the specific version's YAML files as shown below:

>Note: set the `RELEASE` variable to the required version.
> Note: set the `RELEASE` variable to the required version.
```console
$ export RELEASE="v0.8.0"
Expand Down Expand Up @@ -56,11 +56,11 @@ deployment.apps/csi-addons-controller-manager created

This is the recommended and easiest way to deploy the controller.

* The "crds.yaml" create the required crds for csi-addons operations.
- The "crds.yaml" create the required crds for csi-addons operations.

* The "rbac.yaml" creates the required rbac.
- The "rbac.yaml" creates the required rbac.

* The "setup-controller.yaml" creates the csi-addons-controller-manager.
- The "setup-controller.yaml" creates the csi-addons-controller-manager.

## Installation by operator-sdk

Expand Down Expand Up @@ -126,11 +126,11 @@ requirements of the cluster after observation. The default resource requirements
for the CSI-Addons Controller are as follows:

```yaml
resources:
limits:
cpu: 1000m
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
resources:
limits:
cpu: 1000m
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
```
35 changes: 17 additions & 18 deletions docs/encryptionkeyrotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ spec:
timeout: 600
```
+ `target` represents volume target on which the operation will be performed.
+ `persistentVolumeClaim` contains a string indicating the name of `PersistentVolumeClaim`.
+ `backOfflimit` specifies the number of retries before marking key rotation operation as failed. If not specified, defaults to 6. Maximum allowed value is 60 and minimum allowed value is 0.
+ `retryDeadlineSeconds` specifies the duration in seconds relative to the start time that the operation may be retried; value must be positive integer. If not specified, defaults to 600 seconds. Maximum allowed value is 1800.
+ `timeout` specifies the timeout in seconds for the grpc request sent to the CSI driver. If not specified, defaults to global timeout of 3 minutes. Minimum allowed value is 60.
- `target` represents volume target on which the operation will be performed.
- `persistentVolumeClaim` contains a string indicating the name of `PersistentVolumeClaim`.
- `backOfflimit` specifies the number of retries before marking key rotation operation as failed. If not specified, defaults to 6. Maximum allowed value is 60 and minimum allowed value is 0.
- `retryDeadlineSeconds` specifies the duration in seconds relative to the start time that the operation may be retried; value must be positive integer. If not specified, defaults to 600 seconds. Maximum allowed value is 1800.
- `timeout` specifies the timeout in seconds for the grpc request sent to the CSI driver. If not specified, defaults to global timeout of 3 minutes. Minimum allowed value is 60.

## EncryptionKeyRotationCronJob

Expand All @@ -44,22 +44,22 @@ spec:
retryDeadlineSeconds: 600
target:
persistentVolumeClaim: data-pvc
schedule: '@weekly'
schedule: "@weekly"
successfulJobsHistoryLimit: 3
```

+ `concurrencyPolicy` describes what happens when a new `EncryptionKeyRotationJob` is
- `concurrencyPolicy` describes what happens when a new `EncryptionKeyRotationJob` is
scheduled by the `EncryptionKeyRotationCronJob`, while a previous `EncryptionKeyRotationJob` is
still running. The default `Forbid` prevents starting new job, whereas
`Replace` can be used to delete the running job (potentially in a failure
state) and create a new one.
+ `failedJobsHistoryLimit` keeps at most the number of failed
- `failedJobsHistoryLimit` keeps at most the number of failed
`EncryptionKeyRotationJobs` around for troubleshooting
+ `jobTemplate` contains the `EncryptionKeyRotationJob.spec` structure, which describes
- `jobTemplate` contains the `EncryptionKeyRotationJob.spec` structure, which describes
the details of the requested `EncryptionKeyRotationJob` operation.
+ `schedule` is in the same [format as Kubernetes CronJobs][batch_cronjob] that
- `schedule` is in the same [format as Kubernetes CronJobs][batch_cronjob] that
sets the and/or interval of the recurring operation request.
+ `successfulJobsHistoryLimit` can be used to keep at most number of successful
- `successfulJobsHistoryLimit` can be used to keep at most number of successful
`EncryptionKeyRotationJob` operations.

## Annotating PersistentVolumeClaims
Expand Down Expand Up @@ -88,18 +88,17 @@ NAME SCHEDULE SUSPEND ACTIVE LASTSCHEDULE AGE
data-pvc-1642664617 */1 * * * * 3s
```

+ Upon adding annotation as shown above, a `EncryptionKeyRotationCronJob` with name
- Upon adding annotation as shown above, a `EncryptionKeyRotationCronJob` with name
`"<pvc-name>-xxxxxxx"` is created (pvc name suffixed with current time hash when
the job was created).
+ `schedule` value is in the same [format as Kubernetes CronJobs][batch_cronjob]
- `schedule` value is in the same [format as Kubernetes CronJobs][batch_cronjob]
that sets the and/or interval of the recurring operation request.
+ Default schedule value `"@weekly"` is used if `schedule` value is empty or in invalid format.
+ `EncryptionKeyRotationCronJob` is recreated when `schedule` is modified and deleted when
- Default schedule value `"@weekly"` is used if `schedule` value is empty or in invalid format.
- `EncryptionKeyRotationCronJob` is recreated when `schedule` is modified and deleted when
the annotation is removed.

[batch_cronjob]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
[go_cron]:
https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format
[go_cron]: https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format

## Annotating Namespace

Expand Down Expand Up @@ -147,4 +146,4 @@ storageclass.storage.k8s.io/rbd-sc annotated
over StorageClass annotation. The kubernetes-csi-addons only generate a `EncryptionKeyRotationCronJob`
if the annotation exists on the StorageClass. If an admin needs to modify or delete the
annotation on the StorageClass, they must perform the same action on all the PersistentVolumeClaims
created from this StorageClass.
created from this StorageClass.
12 changes: 6 additions & 6 deletions docs/networkfence.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ spec:
> **Note**: Creation of a NetworkFence CR blocks access to the corresponding CIDR block; which is then unblocked the CR deletion.
+ `provisioner`: specifies the name of storage provisioner.
+ `cidrs`: refers to the CIDR blocks on which the mentioned fence/unfence operation is to be performed.
+ `secret`: refers to the kubernetes secret required for network fencing operation.
+ `name`: specifies the name of the secret
+ `namespace`: specifies the namespace in which the secret is located.
+ `parameters`: specifies storage provider specific parameters.
- `provisioner`: specifies the name of storage provisioner.
- `cidrs`: refers to the CIDR blocks on which the mentioned fence/unfence operation is to be performed.
- `secret`: refers to the kubernetes secret required for network fencing operation.
- `name`: specifies the name of the secret
- `namespace`: specifies the namespace in which the secret is located.
- `parameters`: specifies storage provider specific parameters.
35 changes: 17 additions & 18 deletions docs/reclaimspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ spec:
timeout: 600
```
+ `target` represents volume target on which the operation will be performed.
+ `persistentVolumeClaim` contains a string indicating the name of `PersistentVolumeClaim`.
+ `backOfflimit` specifies the number of retries before marking reclaim space operation as failed. If not specified, defaults to 6. Maximum allowed value is 60 and minimum allowed value is 0.
+ `retryDeadlineSeconds` specifies the duration in seconds relative to the start time that the operation may be retried; value must be positive integer. If not specified, defaults to 600 seconds. Maximum allowed value is 1800.
+ `timeout` specifies the timeout in seconds for the grpc request sent to the CSI driver. If not specified, defaults to global reclaimspace timeout. Minimum allowed value is 60.
- `target` represents volume target on which the operation will be performed.
- `persistentVolumeClaim` contains a string indicating the name of `PersistentVolumeClaim`.
- `backOfflimit` specifies the number of retries before marking reclaim space operation as failed. If not specified, defaults to 6. Maximum allowed value is 60 and minimum allowed value is 0.
- `retryDeadlineSeconds` specifies the duration in seconds relative to the start time that the operation may be retried; value must be positive integer. If not specified, defaults to 600 seconds. Maximum allowed value is 1800.
- `timeout` specifies the timeout in seconds for the grpc request sent to the CSI driver. If not specified, defaults to global reclaimspace timeout. Minimum allowed value is 60.

## ReclaimSpaceCronJob

Expand All @@ -44,22 +44,22 @@ spec:
retryDeadlineSeconds: 600
target:
persistentVolumeClaim: data-pvc
schedule: '@weekly'
schedule: "@weekly"
successfulJobsHistoryLimit: 3
```

+ `concurrencyPolicy` describes what happens when a new `ReclaimSpaceJob` is
- `concurrencyPolicy` describes what happens when a new `ReclaimSpaceJob` is
scheduled by the `ReclaimSpaceCronJob`, while a previous `ReclaimSpaceJob` is
still running. The default `Forbid` prevents starting new job, whereas
`Replace` can be used to delete the running job (potentially in a failure
state) and create a new one.
+ `failedJobsHistoryLimit` keeps at most the number of failed
- `failedJobsHistoryLimit` keeps at most the number of failed
`ReclaimSpaceJobs` around for troubleshooting
+ `jobTemplate` contains the `ReclaimSpaceJob.spec` structure, which describes
- `jobTemplate` contains the `ReclaimSpaceJob.spec` structure, which describes
the details of the requested `ReclaimSpaceJob` operation.
+ `schedule` is in the same [format as Kubernetes CronJobs][batch_cronjob] that
- `schedule` is in the same [format as Kubernetes CronJobs][batch_cronjob] that
sets the and/or interval of the recurring operation request.
+ `successfulJobsHistoryLimit` can be used to keep at most number of successful
- `successfulJobsHistoryLimit` can be used to keep at most number of successful
`ReclaimSpaceJob` operations.

## Annotating PerstentVolumeClaims
Expand Down Expand Up @@ -88,18 +88,17 @@ NAME SCHEDULE SUSPEND ACTIVE LASTSCHEDULE AGE
data-pvc-1642664617 */1 * * * * 3s
```

+ Upon adding annotation as shown above, a `ReclaimSpaceCronJob` with name
- Upon adding annotation as shown above, a `ReclaimSpaceCronJob` with name
`"<pvc-name>-xxxxxxx"` is created (pvc name suffixed with current time hash when
the job was created).
+ `schedule` value is in the same [format as Kubernetes CronJobs][batch_cronjob]
- `schedule` value is in the same [format as Kubernetes CronJobs][batch_cronjob]
that sets the and/or interval of the recurring operation request.
+ Default schedule value `"@weekly"` is used if `schedule` value is empty or in invalid format.
+ `ReclaimSpaceCronJob` is recreated when `schedule` is modified and deleted when
- Default schedule value `"@weekly"` is used if `schedule` value is empty or in invalid format.
- `ReclaimSpaceCronJob` is recreated when `schedule` is modified and deleted when
the annotation is removed.

[batch_cronjob]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
[go_cron]:
https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format
[go_cron]: https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format

## Annotating Namespace

Expand Down Expand Up @@ -144,4 +143,4 @@ storageclass.storage.k8s.io/rbd-sc annotated
over StorageClass annotation. The kubernetes-csi-addons only generate a `ReclaimSpaceCronJob`
if the annotation exists on the StorageClass. If an admin needs to modify or delete the
annotation on the StorageClass, they must perform the same action on all the PersistentVolumeClaims
created from this StorageClass.
created from this StorageClass.
15 changes: 7 additions & 8 deletions docs/volumereplication.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ VolumeReplication is a namespaced resource that contains references to storage o

`replicationState` is the state of the volume being referenced. Possible values are `primary`, `secondary` and `resync`.

+ `primary` denotes that the volume is primary
+ `secondary` denotes that the volume is secondary
+ `resync` denotes that the volume needs to be resynced
- `primary` denotes that the volume is primary
- `secondary` denotes that the volume is secondary
- `resync` denotes that the volume needs to be resynced

`dataSource` contains typed reference to the source being replicated.

+ `apiGroup` is the group for the resource being referenced. If apiGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, apiGroup is required.
+ `kind` is the kind of resource being replicated. For eg. PersistentVolumeClaim
+ `name` is the name of the resource
- `apiGroup` is the group for the resource being referenced. If apiGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, apiGroup is required.
- `kind` is the kind of resource being replicated. For eg. PersistentVolumeClaim
- `name` is the name of the resource

`replicationHandle` (optional) is an existing (but new) replication ID.


``` yaml
```yaml
apiVersion: replication.storage.openshift.io/v1alpha1
kind: VolumeReplication
metadata:
Expand Down
6 changes: 3 additions & 3 deletions docs/volumereplicationclass.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

## Reserved parameter keys

+ `replication.storage.openshift.io/replication-secret-name`
+ `replication.storage.openshift.io/replication-secret-namespace`
- `replication.storage.openshift.io/replication-secret-name`
- `replication.storage.openshift.io/replication-secret-namespace`

``` yaml
```yaml
apiVersion: replication.storage.openshift.io/v1alpha1
kind: VolumeReplicationClass
metadata:
Expand Down

0 comments on commit 892bad1

Please sign in to comment.