@@ -494,10 +494,10 @@ type of the field. There are several types of fields:
494
494
- * primitive* : A field of type string, integer, or boolean.
495
495
For example, ` image ` and ` replicas ` are primitive fields. ** Action:** Replace.
496
496
497
- - * map* , also called * object* : A field of type map or a complex type that contains subfields. For example ` labels `
498
- and ` annotations ` are maps; ` spec ` and ` metadata ` are complex types . ** Action:** Merge elements or subfields.
497
+ - * map* , also called * object* : A field of type map or a complex type that contains subfields. For example, ` labels ` ,
498
+ ` annotations ` , ` spec ` and ` metadata ` are all maps . ** Action:** Merge elements or subfields.
499
499
500
- - * list* : A field containing a list of items that can be either primitive types, maps, or complex types .
500
+ - * list* : A field containing a list of items that can be either primitive types or maps .
501
501
For example, ` containers ` , ` ports ` , and ` args ` are lists. ** Action:** Varies.
502
502
503
503
When ` kubectl apply ` updates a map or list field, it typically does
@@ -508,7 +508,7 @@ and merged.
508
508
509
509
### Merging changes to primitive fields
510
510
511
- Primative fieldss are replaced or cleared.
511
+ Primitive fields are replaced or cleared.
512
512
513
513
** Note:** '-' is used for "not applicable" because the value is not used.
514
514
@@ -519,9 +519,9 @@ Primative fieldss are replaced or cleared.
519
519
| No | - | Yes | Clear from live configuration. |
520
520
| No | - | No | Do nothing. Keep live value. |
521
521
522
- ### Merging changes to map or complex fields
522
+ ### Merging changes to map fields
523
523
524
- Fields that represent maps or complex-types are merged by comparing each of the sub fields or elements of of the map / complex-type :
524
+ Fields that represent maps are merged by comparing each of the subfields or elements of of the map:
525
525
526
526
** Note:** '-' is used for "not applicable" because the value is not used.
527
527
@@ -577,11 +577,11 @@ Add, delete, or update individual elements. This does not preserve ordering.
577
577
This merge strategy uses a special tag on each field called a ` patchMergeKey`. The
578
578
`patchMergeKey` is defined for each field in the Kubernetes source code :
579
579
[types.go](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L2119)
580
- When merging a list of complex elements , the field specified as the `patchMergeKey` for a given element
580
+ When merging a list of maps , the field specified as the `patchMergeKey` for a given element
581
581
is used like a map key for that element.
582
582
583
583
**Example:** Use `kubectl apply` to update the `containers` field of a PodSpec.
584
- This merges the list as though `containers` was a map where each element is keyed
584
+ This merges the list as though it was a map where each element is keyed
585
585
by `name`.
586
586
587
587
` ` ` yaml
0 commit comments