You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/backup/azure-kubernetes-service-backup-overview.md
+50-50Lines changed: 50 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -244,9 +244,9 @@ To create and apply resource modification, follow these steps:
244
244
245
245
### Operations supported by **Resource Modifier**
246
246
247
-
- **Add**
247
+
- **Add**
248
248
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.
250
250
251
251
```json
252
252
version: v1
@@ -265,30 +265,30 @@ To create and apply resource modification, follow these steps:
265
265
```
266
266
267
267
268
-
- **Remove**
268
+
- **Remove**
269
269
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.
271
271
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**
290
290
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.
292
292
293
293
```json
294
294
version: v1
@@ -308,9 +308,9 @@ To create and apply resource modification, follow these steps:
308
308
value: "premium"
309
309
```
310
310
311
-
- **Copy**
311
+
- **Copy**
312
312
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.
314
314
315
315
```json
316
316
version: v1
@@ -327,31 +327,31 @@ To create and apply resource modification, follow these steps:
327
327
path: "/spec/template/spec/containers/1"
328
328
```
329
329
330
-
- **Test**
330
+
- **Test**
331
331
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.
333
333
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
+
```
351
351
352
-
-**JSON Patch**
352
+
- **JSON Patch**
353
353
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.
355
355
356
356
357
357
```json
@@ -369,9 +369,9 @@ resourceModifierRules:
369
369
value: "12"
370
370
```
371
371
372
-
- **JSON Merge Patch**
372
+
- **JSON Merge Patch**
373
373
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".
375
375
376
376
```json
377
377
version: v1
@@ -393,9 +393,9 @@ resourceModifierRules:
393
393
}
394
394
```
395
395
396
-
- **Strategic Merge Patch**
396
+
- **Strategic Merge Patch**
397
397
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
0 commit comments