mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
address comments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user