Merge pull request #2406 from pwittrock/apply-docs-concepts

Minor wording updates
This commit is contained in:
Phillip Wittrock
2017-02-01 18:12:41 -08:00
committed by GitHub
2 changed files with 9 additions and 9 deletions
@@ -494,10 +494,10 @@ type of the field. There are several types of fields:
- *primitive*: A field of type string, integer, or boolean.
For example, `image` and `replicas` are primitive fields. **Action:** Replace.
- *map*, also called *object*: A field of type map or a complex type that contains subfields. For example `labels`
and `annotations` are maps; `spec` and `metadata` are complex types. **Action:** Merge elements or subfields.
- *map*, also called *object*: A field of type map or a complex type that contains subfields. For example, `labels`,
`annotations`,`spec` and `metadata` are all maps. **Action:** Merge elements or subfields.
- *list*: A field containing a list of items that can be either primitive types, maps, or complex types.
- *list*: A field containing a list of items that can be either primitive types or maps.
For example, `containers`, `ports`, and `args` are lists. **Action:** Varies.
When `kubectl apply` updates a map or list field, it typically does
@@ -508,7 +508,7 @@ and merged.
### Merging changes to primitive fields
Primative fieldss are replaced or cleared.
Primitive fields are replaced or cleared.
**Note:** '-' is used for "not applicable" because the value is not used.
@@ -519,9 +519,9 @@ Primative fieldss are replaced or cleared.
| No | - | Yes | Clear from live configuration. |
| No | - | No | Do nothing. Keep live value. |
### Merging changes to map or complex fields
### Merging changes to map fields
Fields that represent maps or complex-types are merged by comparing each of the sub fields or elements of of the map / complex-type:
Fields that represent maps are merged by comparing each of the subfields or elements of of the map:
**Note:** '-' is used for "not applicable" because the value is not used.
@@ -577,11 +577,11 @@ Add, delete, or update individual elements. This does not preserve ordering.
This merge strategy uses a special tag on each field called a `patchMergeKey`. The
`patchMergeKey` is defined for each field in the Kubernetes source code:
[types.go](https://github.com/kubernetes/kubernetes/blob/master/pkg/api/v1/types.go#L2119)
When merging a list of complex elements, the field specified as the `patchMergeKey` for a given element
When merging a list of maps, the field specified as the `patchMergeKey` for a given element
is used like a map key for that element.
**Example:** Use `kubectl apply` to update the `containers` field of a PodSpec.
This merges the list as though `containers` was a map where each element is keyed
This merges the list as though it was a map where each element is keyed
by `name`.
```yaml
@@ -74,7 +74,7 @@ Setting this aspect may set different fields for different object types:
- `set` <field>: Set an aspect of an object.
**Note**: In Kubernetes version 1.5, not every verb-driven command has an
associated field-driven command.
associated aspect-driven command.
The `kubectl` tool supports these additional ways to update a live object directly,
however they require a better understanding of the Kubernetes object schema.