Skip to content

Commit c7b91e9

Browse files
committed
Add indentation to yamls
1 parent fd9c195 commit c7b91e9

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

content/en/blog/_posts/2022-05-18-prevent-unauthorised-volume-mode-conversion.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ created PVC in the given namespace.
5454
2. Identify the `VolumeSnapshotContent` bound to the above `VolumeSnapshot`.
5555

5656
```
57-
kubectl get volumesnapshot -n <namespace>
57+
kubectl get volumesnapshot -n <namespace>
5858
```
5959

6060
3. Add the annotation [`snapshot.storage.kubernetes.io/allowVolumeModeChange`](/docs/reference/labels-annotations-taints/#snapshot-storage-kubernetes-io-allowvolumemodechange)
@@ -64,11 +64,11 @@ to the `VolumeSnapshotContent`.
6464
user. The `VolumeSnapshotContent` annotation must look like following manifest fragment:
6565

6666
```yaml
67-
kind: VolumeSnapshotContent
68-
metadata:
69-
annotations:
70-
- snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"
71-
...
67+
kind: VolumeSnapshotContent
68+
metadata:
69+
annotations:
70+
- snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"
71+
...
7272
```
7373

7474
**Note**: For pre-provisioned `VolumeSnapshotContents`, you must take an extra
@@ -78,21 +78,21 @@ depending on the mode of the volume from which this snapshot was taken.
7878
An example is shown below:
7979

8080
```yaml
81-
apiVersion: snapshot.storage.k8s.io/v1
82-
kind: VolumeSnapshotContent
83-
metadata:
84-
annotations:
85-
- snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"
86-
name: new-snapshot-content-test
87-
spec:
88-
deletionPolicy: Delete
89-
driver: hostpath.csi.k8s.io
90-
source:
91-
snapshotHandle: 7bdd0de3-aaeb-11e8-9aae-0242ac110002
92-
sourceVolumeMode: Filesystem
93-
volumeSnapshotRef:
94-
name: new-snapshot-test
95-
namespace: default
81+
apiVersion: snapshot.storage.k8s.io/v1
82+
kind: VolumeSnapshotContent
83+
metadata:
84+
annotations:
85+
- snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"
86+
name: new-snapshot-content-test
87+
spec:
88+
deletionPolicy: Delete
89+
driver: hostpath.csi.k8s.io
90+
source:
91+
snapshotHandle: 7bdd0de3-aaeb-11e8-9aae-0242ac110002
92+
sourceVolumeMode: Filesystem
93+
volumeSnapshotRef:
94+
name: new-snapshot-test
95+
namespace: default
9696
```
9797
9898
Repeat steps 1 to 3 for all `VolumeSnapshotContents` whose volume mode needs to be

0 commit comments

Comments
 (0)