address comments

This commit is contained in:
jingfangliu
2019-07-23 16:55:58 -07:00
parent b2967d2f77
commit 0e62d759f0

View File

@@ -9,8 +9,7 @@ A kustomization file supports customizing resources via both
[Strategic Merge Patch] and [JSON patches]. Now one patch can be
applied to multiple resources.
The format of doing this is by specifying a patch and a target selector.
It is as the following:
This can be done by specifying a patch and a target selector as follows:
```
patches:
- path: <PatchFile>
@@ -115,6 +114,51 @@ test 2 == \
echo $?
```
The output is as follows:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy1
spec:
template:
metadata:
labels:
old-label: old-value
spec:
containers:
- args:
- proxy
- sidecar
image: docker.io/istio/proxyv2
name: istio-proxy
- args:
- one
- two
image: nginx
name: nginx
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deploy2
spec:
template:
metadata:
labels:
key: value
spec:
containers:
- args:
- proxy
- sidecar
image: docker.io/istio/proxyv2
name: istio-proxy
- image: busybox
name: busybox
```
## Target selector
- Select resources with name matching `name*`
```yaml