From 0e62d759f063696154d56a6e1ddb0ebf9d6aac7c Mon Sep 17 00:00:00 2001 From: jingfangliu Date: Tue, 23 Jul 2019 16:55:58 -0700 Subject: [PATCH] address comments --- examples/patchMultipleObjects.md | 48 ++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/examples/patchMultipleObjects.md b/examples/patchMultipleObjects.md index 4d97983a9..c9b87f316 100644 --- a/examples/patchMultipleObjects.md +++ b/examples/patchMultipleObjects.md @@ -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: @@ -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