From 0da9134f1545804e9198a66b850ae9cc7c00bc21 Mon Sep 17 00:00:00 2001 From: Anshul Ahuja Date: Wed, 2 Aug 2023 10:35:01 +0530 Subject: [PATCH] Update restore-resource-modifiers.md Fix indent in resource modifier docs Signed-off-by: Anshul Ahuja Fix --- .../docs/main/restore-resource-modifiers.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/site/content/docs/main/restore-resource-modifiers.md b/site/content/docs/main/restore-resource-modifiers.md index 538237641..a7aa3a669 100644 --- a/site/content/docs/main/restore-resource-modifiers.md +++ b/site/content/docs/main/restore-resource-modifiers.md @@ -25,22 +25,22 @@ Below is the two-step of using resource modifiers to modify the resources during **YAML template** - Yaml template: - ```yaml - version: v1 - resourceModifierRules: - - conditions: - groupKind: persistentvolumeclaims - resourceNameRegex: "^mysql.*$" - namespaces: - - bar - - foo - patches: - - operation: replace - path: "/spec/storageClassName" - value: "premium" - - operation: remove - path: "/metadata/labels/test" - ``` +```yaml +version: v1 +resourceModifierRules: +- conditions: + groupKind: persistentvolumeclaims + resourceNameRegex: "^mysql.*$" + namespaces: + - bar + - foo + patches: + - operation: replace + path: "/spec/storageClassName" + value: "premium" + - operation: remove + path: "/metadata/labels/test" + ``` - The above configmap will apply the JSON Patch to all the PVCs in the namespaces bar and foo with name starting with mysql. The JSON Patch will replace the storageClassName with "premium" and remove the label "test" from the PVCs. - You can specify multiple JSON Patches for a particular resource. The patches will be applied in the order specified in the configmap. A subsequent patch is applied in order and if multiple patches are specified for the same path, the last patch will override the previous patches.