Skip to content

Commit ebca67a

Browse files
author
AbhishekMallick-MS
committed
minor changes
1 parent 138284e commit ebca67a

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

articles/backup/azure-kubernetes-service-backup-overview.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ To create and apply resource modification, follow these steps:
244244

245245
### Operations supported by **Resource Modifier**
246246

247-
- **Add**
247+
- **Add**
248248

249-
You can use the **Add** operation to add a new block to the resource json. In the example below, the operation add a new container details to the spec with a deployment.
249+
You can use the **Add** operation to add a new block to the resource json. In the example below, the operation add a new container details to the spec with a deployment.
250250

251251
```json
252252
version: v1
@@ -265,30 +265,30 @@ To create and apply resource modification, follow these steps:
265265
```
266266

267267

268-
- **Remove**
268+
- **Remove**
269269

270-
You can use the **Remove** operation to remove a key from the resource json. In the example below, the operation removes the label with test as key.
270+
You can use the **Remove** operation to remove a key from the resource json. In the example below, the operation removes the label with test as key.
271271

272-
```json
273-
version: v1
274-
resourceModifierRules:
275-
- conditions:
276-
groupResource: persistentvolumeclaims
277-
resourceNameRegex: "^mysql.*$"
278-
namespaces:
279-
- bar
280-
- foo
281-
labelSelector:
282-
matchLabels:
283-
foo: bar
284-
patches:
285-
- operation: remove
286-
path: "/metadata/labels/test"
287-
```
288-
289-
- **Replace**
272+
```json
273+
version: v1
274+
resourceModifierRules:
275+
- conditions:
276+
groupResource: persistentvolumeclaims
277+
resourceNameRegex: "^mysql.*$"
278+
namespaces:
279+
- bar
280+
- foo
281+
labelSelector:
282+
matchLabels:
283+
foo: bar
284+
patches:
285+
- operation: remove
286+
path: "/metadata/labels/test"
287+
```
288+
289+
- **Replace**
290290

291-
You can use the **Replace** operation to replace a value for the path mentioned to an alternate one. In the example below, the operation replaces the storageClassName in the persistent volume claim with premium.
291+
You can use the **Replace** operation to replace a value for the path mentioned to an alternate one. In the example below, the operation replaces the storageClassName in the persistent volume claim with premium.
292292

293293
```json
294294
version: v1
@@ -308,9 +308,9 @@ To create and apply resource modification, follow these steps:
308308
value: "premium"
309309
```
310310

311-
- **Copy**
311+
- **Copy**
312312

313-
You can use the **Copy** operation to copy a value from one path from the resources defined to another path.
313+
You can use the **Copy** operation to copy a value from one path from the resources defined to another path.
314314

315315
```json
316316
version: v1
@@ -327,31 +327,31 @@ To create and apply resource modification, follow these steps:
327327
path: "/spec/template/spec/containers/1"
328328
```
329329

330-
- **Test**
330+
- **Test**
331331

332-
You can use the **Test** operation to check if a particular value is present in the resource. If the value is present, the patch is applied. If the value isn't present, the patch isn't applied. In the example below, the operation checks whether the persistent volume claims have premium as StorageClassName and replaces if with standard, if true.
332+
You can use the **Test** operation to check if a particular value is present in the resource. If the value is present, the patch is applied. If the value isn't present, the patch isn't applied. In the example below, the operation checks whether the persistent volume claims have premium as StorageClassName and replaces if with standard, if true.
333333

334-
```json
335-
version: v1
336-
resourceModifierRules:
337-
- conditions:
338-
groupResource: persistentvolumeclaims
339-
resourceNameRegex: ".*"
340-
namespaces:
341-
- bar
342-
- foo
343-
patches:
344-
- operation: test
345-
path: "/spec/storageClassName"
346-
value: "premium"
347-
- operation: replace
348-
path: "/spec/storageClassName"
349-
value: "standard"
350-
```
334+
```json
335+
version: v1
336+
resourceModifierRules:
337+
- conditions:
338+
groupResource: persistentvolumeclaims
339+
resourceNameRegex: ".*"
340+
namespaces:
341+
- bar
342+
- foo
343+
patches:
344+
- operation: test
345+
path: "/spec/storageClassName"
346+
value: "premium"
347+
- operation: replace
348+
path: "/spec/storageClassName"
349+
value: "standard"
350+
```
351351

352-
- **JSON Patch**
352+
- **JSON Patch**
353353

354-
This *configmap* applies the JSON patch to all the deployments in the namespaces by default and ``nginx` with the name that starts with `nginxdep`. The JSON patch updates the replica count to *12* for all such deployments.
354+
This *configmap* applies the JSON patch to all the deployments in the namespaces by default and ``nginx` with the name that starts with `nginxdep`. The JSON patch updates the replica count to *12* for all such deployments.
355355

356356

357357
```json
@@ -369,9 +369,9 @@ resourceModifierRules:
369369
value: "12"
370370
```
371371

372-
- **JSON Merge Patch**
372+
- **JSON Merge Patch**
373373

374-
This config map will apply the JSON Merge Patch to all the deployments in the namespaces default and nginx with the name starting with nginxdep. The JSON Merge Patch will add/update the label "app" with the value "nginx1".
374+
This config map will apply the JSON Merge Patch to all the deployments in the namespaces default and nginx with the name starting with nginxdep. The JSON Merge Patch will add/update the label "app" with the value "nginx1".
375375

376376
```json
377377
version: v1
@@ -393,9 +393,9 @@ resourceModifierRules:
393393
}
394394
```
395395

396-
- **Strategic Merge Patch**
396+
- **Strategic Merge Patch**
397397

398-
This config map will apply the Strategic Merge Patch to all the pods in the namespace default with the name starting with nginx. The Strategic Merge Patch will update the image of container nginx to mcr.microsoft.com/cbl-mariner/base/nginx:1.22
398+
This config map will apply the Strategic Merge Patch to all the pods in the namespace default with the name starting with nginx. The Strategic Merge Patch will update the image of container nginx to mcr.microsoft.com/cbl-mariner/base/nginx:1.22
399399

400400
```json
401401
version: v1

0 commit comments

Comments
 (0)