diff --git a/docs/api-reference/glossary/index.html b/docs/api-reference/glossary/index.html index 1b61705ae..20b312b8a 100644 --- a/docs/api-reference/glossary/index.html +++ b/docs/api-reference/glossary/index.html @@ -3,7 +3,7 @@
- + @@ -29,8 +29,7 @@ - +"> @@ -912,8 +911,8 @@ absolute path, or by relative path.A may contain B, but in this case it might be -simplest to have A directly depend on B’s -resources and eliminate B’s kustomization.yaml file +simplest to have A directly depend on B‘s +resources and eliminate B‘s kustomization.yaml file (i.e. absorb B into A).
Conventionally, B is in a directory that’s sibling to A, or B is off in a completely independent diff --git a/docs/api-reference/index.html b/docs/api-reference/index.html index 041c7ee8e..9a6c56f21 100644 --- a/docs/api-reference/index.html +++ b/docs/api-reference/index.html @@ -3,7 +3,7 @@
- + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/bases/index.html b/docs/api-reference/kustomization/bases/index.html index fbb3e4546..acf87fd40 100644 --- a/docs/api-reference/kustomization/bases/index.html +++ b/docs/api-reference/kustomization/bases/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/commonannotations/index.html b/docs/api-reference/kustomization/commonannotations/index.html index 67b19a8e7..3232a543b 100644 --- a/docs/api-reference/kustomization/commonannotations/index.html +++ b/docs/api-reference/kustomization/commonannotations/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/commonlabels/index.html b/docs/api-reference/kustomization/commonlabels/index.html index 32883cc88..83c604a28 100644 --- a/docs/api-reference/kustomization/commonlabels/index.html +++ b/docs/api-reference/kustomization/commonlabels/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/components/index.html b/docs/api-reference/kustomization/components/index.html index e78c92912..50b2a9df4 100644 --- a/docs/api-reference/kustomization/components/index.html +++ b/docs/api-reference/kustomization/components/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/configmapgenerator/index.html b/docs/api-reference/kustomization/configmapgenerator/index.html index d81124afc..5ce457c58 100644 --- a/docs/api-reference/kustomization/configmapgenerator/index.html +++ b/docs/api-reference/kustomization/configmapgenerator/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/crds/index.html b/docs/api-reference/kustomization/crds/index.html index 202ca4abb..9dca62f93 100644 --- a/docs/api-reference/kustomization/crds/index.html +++ b/docs/api-reference/kustomization/crds/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/generatoroptions/index.html b/docs/api-reference/kustomization/generatoroptions/index.html index 407f88259..d4c66222f 100644 --- a/docs/api-reference/kustomization/generatoroptions/index.html +++ b/docs/api-reference/kustomization/generatoroptions/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/images/index.html b/docs/api-reference/kustomization/images/index.html index 062f213a2..e2d7df59d 100644 --- a/docs/api-reference/kustomization/images/index.html +++ b/docs/api-reference/kustomization/images/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/index.html b/docs/api-reference/kustomization/index.html index 979677d0a..6778097a7 100644 --- a/docs/api-reference/kustomization/index.html +++ b/docs/api-reference/kustomization/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/index.xml b/docs/api-reference/kustomization/index.xml index c9c010e62..eef7f7ea2 100644 --- a/docs/api-reference/kustomization/index.xml +++ b/docs/api-reference/kustomization/index.xml @@ -855,7 +855,7 @@ resources.</p> supported. No ints, bools, arrays etc. It’s not possible to, say, extract the name of the image in container number 2 of some pod template.</p> -<p>A variable reference, i.e. the string ‘$(FOO)’, +<p>A variable reference, i.e. the string ‘$(FOO)', can only be placed in particular fields of particular objects as specified by kustomize’s configuration data.</p> diff --git a/docs/api-reference/kustomization/nameprefix/index.html b/docs/api-reference/kustomization/nameprefix/index.html index 2614a7af0..a1a1f3808 100644 --- a/docs/api-reference/kustomization/nameprefix/index.html +++ b/docs/api-reference/kustomization/nameprefix/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/namespace/index.html b/docs/api-reference/kustomization/namespace/index.html index 70d883496..4e38923d7 100644 --- a/docs/api-reference/kustomization/namespace/index.html +++ b/docs/api-reference/kustomization/namespace/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/namesuffix/index.html b/docs/api-reference/kustomization/namesuffix/index.html index 47c96908d..ffac039fc 100644 --- a/docs/api-reference/kustomization/namesuffix/index.html +++ b/docs/api-reference/kustomization/namesuffix/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/api-reference/kustomization/patches/index.html b/docs/api-reference/kustomization/patches/index.html index ac3f83966..d198f79dd 100644 --- a/docs/api-reference/kustomization/patches/index.html +++ b/docs/api-reference/kustomization/patches/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> @@ -507,10 +506,10 @@A variable reference, i.e. the string ‘$(FOO)’, +
A variable reference, i.e. the string ‘$(FOO)', can only be placed in particular fields of particular objects as specified by kustomize’s configuration data.
diff --git a/docs/blog/2018/05/21/v1.0.1/index.html b/docs/blog/2018/05/21/v1.0.1/index.html index ce906d1cc..9deb25efd 100644 --- a/docs/blog/2018/05/21/v1.0.1/index.html +++ b/docs/blog/2018/05/21/v1.0.1/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/02/05/v2.0.0/index.html b/docs/blog/2019/02/05/v2.0.0/index.html index 8efbfa54e..b6df152c6 100644 --- a/docs/blog/2019/02/05/v2.0.0/index.html +++ b/docs/blog/2019/02/05/v2.0.0/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/06/18/v2.1.0/index.html b/docs/blog/2019/06/18/v2.1.0/index.html index 6f9bf74ac..255550940 100644 --- a/docs/blog/2019/06/18/v2.1.0/index.html +++ b/docs/blog/2019/06/18/v2.1.0/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/07/03/v3.0.0/index.html b/docs/blog/2019/07/03/v3.0.0/index.html index 8494146bd..4f2737810 100644 --- a/docs/blog/2019/07/03/v3.0.0/index.html +++ b/docs/blog/2019/07/03/v3.0.0/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/07/26/v3.1.0/index.html b/docs/blog/2019/07/26/v3.1.0/index.html index 15505a4ed..5dd070eb1 100644 --- a/docs/blog/2019/07/26/v3.1.0/index.html +++ b/docs/blog/2019/07/26/v3.1.0/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/09/17/v3.2.0/index.html b/docs/blog/2019/09/17/v3.2.0/index.html index a6619345c..6a91b03ad 100644 --- a/docs/blog/2019/09/17/v3.2.0/index.html +++ b/docs/blog/2019/09/17/v3.2.0/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/09/26/v3.2.1/index.html b/docs/blog/2019/09/26/v3.2.1/index.html index 4152c8a05..c93645e6f 100644 --- a/docs/blog/2019/09/26/v3.2.1/index.html +++ b/docs/blog/2019/09/26/v3.2.1/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/2019/10/24/v3.3.0/index.html b/docs/blog/2019/10/24/v3.3.0/index.html index a9a4b7c16..ac9705420 100644 --- a/docs/blog/2019/10/24/v3.3.0/index.html +++ b/docs/blog/2019/10/24/v3.3.0/index.html @@ -3,7 +3,7 @@ - + @@ -30,14 +30,13 @@ - + - - + diff --git a/docs/blog/index.html b/docs/blog/index.html index 752f8c36a..4d8e5aaea 100644 --- a/docs/blog/index.html +++ b/docs/blog/index.html @@ -3,7 +3,7 @@ - + @@ -27,8 +27,7 @@ - - + diff --git a/docs/blog/releases/index.html b/docs/blog/releases/index.html index 52a56b620..001f6ac7b 100644 --- a/docs/blog/releases/index.html +++ b/docs/blog/releases/index.html @@ -3,7 +3,7 @@ - + @@ -27,8 +27,7 @@ - - + diff --git a/docs/contributing/bugs/index.html b/docs/contributing/bugs/index.html index 26b7100e5..c43ace328 100644 --- a/docs/contributing/bugs/index.html +++ b/docs/contributing/bugs/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/contributing/community/index.html b/docs/contributing/community/index.html index 557959ea6..5d9cec41c 100644 --- a/docs/contributing/community/index.html +++ b/docs/contributing/community/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/contributing/docs/index.html b/docs/contributing/docs/index.html index 8720cdb42..30908fcc2 100644 --- a/docs/contributing/docs/index.html +++ b/docs/contributing/docs/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/contributing/features/index.html b/docs/contributing/features/index.html index 88f59e870..48a3b7c3e 100644 --- a/docs/contributing/features/index.html +++ b/docs/contributing/features/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/contributing/howitworks/index.html b/docs/contributing/howitworks/index.html index 4bda42780..657b09f25 100644 --- a/docs/contributing/howitworks/index.html +++ b/docs/contributing/howitworks/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/contributing/index.html b/docs/contributing/index.html index 483edfae7..f963deabd 100644 --- a/docs/contributing/index.html +++ b/docs/contributing/index.html @@ -3,7 +3,7 @@ - + @@ -27,8 +27,7 @@ - - + diff --git a/docs/contributing/mac/index.html b/docs/contributing/mac/index.html index 5a153627a..ed6f294a1 100644 --- a/docs/contributing/mac/index.html +++ b/docs/contributing/mac/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/contributing/windows/index.html b/docs/contributing/windows/index.html index 3cc3f4ba1..dfd340618 100644 --- a/docs/contributing/windows/index.html +++ b/docs/contributing/windows/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/faq/eschewedfeatures/index.html b/docs/faq/eschewedfeatures/index.html index 14a66cc6e..83b969d81 100644 --- a/docs/faq/eschewedfeatures/index.html +++ b/docs/faq/eschewedfeatures/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/faq/index.html b/docs/faq/index.html index 53be265c8..8b3b3a7c9 100644 --- a/docs/faq/index.html +++ b/docs/faq/index.html @@ -3,7 +3,7 @@ - + @@ -27,8 +27,7 @@ - - + diff --git a/docs/faq/versioningpolicy/index.html b/docs/faq/versioningpolicy/index.html index 59bf92413..158d7dccf 100644 --- a/docs/faq/versioningpolicy/index.html +++ b/docs/faq/versioningpolicy/index.html @@ -3,7 +3,7 @@ - + @@ -36,8 +36,7 @@ - - + - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/guides/components/index.html b/docs/guides/components/index.html index c508d7679..d246f2501 100644 --- a/docs/guides/components/index.html +++ b/docs/guides/components/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/guides/index.html b/docs/guides/index.html index ecbb4dd54..a06127275 100644 --- a/docs/guides/index.html +++ b/docs/guides/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/guides/offtheshelf/index.html b/docs/guides/offtheshelf/index.html index 15a08d797..bf3849a2c 100644 --- a/docs/guides/offtheshelf/index.html +++ b/docs/guides/offtheshelf/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/guides/plugins/builtins/index.html b/docs/guides/plugins/builtins/index.html index 454f4edfc..5356a32c9 100644 --- a/docs/guides/plugins/builtins/index.html +++ b/docs/guides/plugins/builtins/index.html @@ -3,7 +3,7 @@ - + @@ -34,8 +34,7 @@ - - + diff --git a/docs/guides/plugins/execpluginguidedexample/index.html b/docs/guides/plugins/execpluginguidedexample/index.html index 631cdf852..f5ba0ab40 100644 --- a/docs/guides/plugins/execpluginguidedexample/index.html +++ b/docs/guides/plugins/execpluginguidedexample/index.html @@ -3,7 +3,7 @@ - + @@ -34,8 +34,7 @@ - - + diff --git a/docs/guides/plugins/goplugincaveats/index.html b/docs/guides/plugins/goplugincaveats/index.html index 17b6e4a48..9b6f73a6a 100644 --- a/docs/guides/plugins/goplugincaveats/index.html +++ b/docs/guides/plugins/goplugincaveats/index.html @@ -3,7 +3,7 @@ - + @@ -34,8 +34,7 @@ - - + diff --git a/docs/guides/plugins/gopluginguidedexample/index.html b/docs/guides/plugins/gopluginguidedexample/index.html index 6171a677e..004ea9f45 100644 --- a/docs/guides/plugins/gopluginguidedexample/index.html +++ b/docs/guides/plugins/gopluginguidedexample/index.html @@ -3,7 +3,7 @@ - + @@ -34,8 +34,7 @@ - - + diff --git a/docs/guides/plugins/index.html b/docs/guides/plugins/index.html index f5a4a49d0..859990af9 100644 --- a/docs/guides/plugins/index.html +++ b/docs/guides/plugins/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/index.html b/docs/index.html index 8dd6086dc..3f61d163c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ - + @@ -27,8 +27,7 @@ - - + diff --git a/docs/index.json b/docs/index.json index 756265f35..09f44bc6c 100644 --- a/docs/index.json +++ b/docs/index.json @@ -3,7 +3,7 @@ - + @@ -32,8 +32,7 @@ - - + diff --git a/docs/installation/binaries/index.html b/docs/installation/binaries/index.html index 6417ea3a9..2f13e08a4 100644 --- a/docs/installation/binaries/index.html +++ b/docs/installation/binaries/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/installation/chocolatey/index.html b/docs/installation/chocolatey/index.html index 72614be6b..c16ca87cf 100644 --- a/docs/installation/chocolatey/index.html +++ b/docs/installation/chocolatey/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/installation/homebrew/index.html b/docs/installation/homebrew/index.html index 24ad9e411..5b1b4e2c9 100644 --- a/docs/installation/homebrew/index.html +++ b/docs/installation/homebrew/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/installation/index.html b/docs/installation/index.html index 68147be84..4bd842ac4 100644 --- a/docs/installation/index.html +++ b/docs/installation/index.html @@ -3,7 +3,7 @@ - + @@ -27,8 +27,7 @@ - - + diff --git a/docs/installation/source/index.html b/docs/installation/source/index.html index e79308f61..656eacb29 100644 --- a/docs/installation/source/index.html +++ b/docs/installation/source/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/search/index.html b/docs/search/index.html index 567d5f3df..7c11a9466 100644 --- a/docs/search/index.html +++ b/docs/search/index.html @@ -3,7 +3,7 @@ - + @@ -32,8 +32,7 @@ - - + diff --git a/docs/zh/api-reference/glossary/index.html b/docs/zh/api-reference/glossary/index.html index 61b692dcb..624d0b21d 100644 --- a/docs/zh/api-reference/glossary/index.html +++ b/docs/zh/api-reference/glossary/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/index.html b/docs/zh/api-reference/index.html index 459159435..959629ee7 100644 --- a/docs/zh/api-reference/index.html +++ b/docs/zh/api-reference/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/bases/index.html b/docs/zh/api-reference/kustomization/bases/index.html index 938fda5af..51655623c 100644 --- a/docs/zh/api-reference/kustomization/bases/index.html +++ b/docs/zh/api-reference/kustomization/bases/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/commonannotations/index.html b/docs/zh/api-reference/kustomization/commonannotations/index.html index 21a14fd58..f817d5d14 100644 --- a/docs/zh/api-reference/kustomization/commonannotations/index.html +++ b/docs/zh/api-reference/kustomization/commonannotations/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/commonlabels/index.html b/docs/zh/api-reference/kustomization/commonlabels/index.html index 8a756291c..46f415990 100644 --- a/docs/zh/api-reference/kustomization/commonlabels/index.html +++ b/docs/zh/api-reference/kustomization/commonlabels/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/components/index.html b/docs/zh/api-reference/kustomization/components/index.html index 1fa16a648..b22fe38b3 100644 --- a/docs/zh/api-reference/kustomization/components/index.html +++ b/docs/zh/api-reference/kustomization/components/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/configmapgenerator/index.html b/docs/zh/api-reference/kustomization/configmapgenerator/index.html index 76ec5697e..b19905621 100644 --- a/docs/zh/api-reference/kustomization/configmapgenerator/index.html +++ b/docs/zh/api-reference/kustomization/configmapgenerator/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/crds/index.html b/docs/zh/api-reference/kustomization/crds/index.html index 8ad9adb4b..3c9a3dc39 100644 --- a/docs/zh/api-reference/kustomization/crds/index.html +++ b/docs/zh/api-reference/kustomization/crds/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/generatoroptions/index.html b/docs/zh/api-reference/kustomization/generatoroptions/index.html index e8686ecb0..fa6a61479 100644 --- a/docs/zh/api-reference/kustomization/generatoroptions/index.html +++ b/docs/zh/api-reference/kustomization/generatoroptions/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/images/index.html b/docs/zh/api-reference/kustomization/images/index.html index 234c398e0..671b0e287 100644 --- a/docs/zh/api-reference/kustomization/images/index.html +++ b/docs/zh/api-reference/kustomization/images/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/index.html b/docs/zh/api-reference/kustomization/index.html index 5f51d23d7..71b460dcc 100644 --- a/docs/zh/api-reference/kustomization/index.html +++ b/docs/zh/api-reference/kustomization/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/index.xml b/docs/zh/api-reference/kustomization/index.xml index d1e591406..316937285 100644 --- a/docs/zh/api-reference/kustomization/index.xml +++ b/docs/zh/api-reference/kustomization/index.xml @@ -452,7 +452,78 @@ </span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>MyKind<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labelSelector</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">"env=dev"</span><span style="color:#f8f8f8;text-decoration:underline"> </span></code></pre></div><p>patch 目标选择器的 <code>name</code> 和 <code>namespace</code> 字段是自动锚定的正则表达式。这意味着 <code>myapp</code> 的值相当于 <code>^myapp$</code>。</p> - +<p>示例 1 和示例 2 都将使用以下 <code>deployment.yaml</code>:</p> +<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apps/v1<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">replicas</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-container<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>registry/conatiner<span style="color:#000;font-weight:bold">:</span>latest<span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div><h2 id="示例1">示例1</h2> +<h3 id="目的">目的</h3> +<p>将容器镜像指向特定版本,代替 latest 版本。</p> +<h3 id="文件输入">文件输入</h3> +<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#8f5902;font-style:italic"># kustomization.yaml</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">resources</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span>- deployment.yaml<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">patches</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">path</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>patch.yaml<span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#8f5902;font-style:italic"># patch.yaml</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apps/v1<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-container<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>registry/conatiner<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.0.0</span><span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div><h3 id="构建输出">构建输出</h3> +<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apps/v1<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">replicas</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>registry/conatiner<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.0.0</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-container<span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div><h2 id="示例2">示例2</h2> +<h3 id="目的-1">目的</h3> +<p>同上。</p> +<h3 id="文件输入-1">文件输入</h3> +<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#8f5902;font-style:italic"># kustomization.yaml</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">resources</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span>- deployment.yaml<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">patches</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">target</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">path</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>patch.json<span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#8f5902;font-style:italic"># patch.json</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000;font-weight:bold">[</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span>{<span style="color:#204a87;font-weight:bold">"op": "replace", "path": "/spec/template/containers/0/image", "value": </span><span style="color:#4e9a06">"registry/conatiner:1.0.0"</span>}<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000;font-weight:bold">]</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div><h3 id="构建输出-1">构建输出</h3> +<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apps/v1<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-deployment<span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">replicas</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>registry/conatiner<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.0.0</span><span style="color:#f8f8f8;text-decoration:underline"> +</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>the-container<span style="color:#f8f8f8;text-decoration:underline"> +</span></code></pre></div> diff --git a/docs/zh/api-reference/kustomization/nameprefix/index.html b/docs/zh/api-reference/kustomization/nameprefix/index.html index 5a1654304..fb45b551c 100644 --- a/docs/zh/api-reference/kustomization/nameprefix/index.html +++ b/docs/zh/api-reference/kustomization/nameprefix/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/namespace/index.html b/docs/zh/api-reference/kustomization/namespace/index.html index 8f18d0c38..208b90473 100644 --- a/docs/zh/api-reference/kustomization/namespace/index.html +++ b/docs/zh/api-reference/kustomization/namespace/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/namesuffix/index.html b/docs/zh/api-reference/kustomization/namesuffix/index.html index 114c6cde6..b3bcdcddf 100644 --- a/docs/zh/api-reference/kustomization/namesuffix/index.html +++ b/docs/zh/api-reference/kustomization/namesuffix/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> diff --git a/docs/zh/api-reference/kustomization/patches/index.html b/docs/zh/api-reference/kustomization/patches/index.html index 3ba8f22be..2075b56c6 100644 --- a/docs/zh/api-reference/kustomization/patches/index.html +++ b/docs/zh/api-reference/kustomization/patches/index.html @@ -3,7 +3,7 @@ - + @@ -29,8 +29,7 @@ - +"> @@ -507,10 +506,10 @@patch 目标选择器的 name 和 namespace 字段是自动锚定的正则表达式。这意味着 myapp 的值相当于 ^myapp$。
示例 1 和示例 2 都将使用以下 deployment.yaml:
apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: the-deployment
+spec:
+ replicas: 5
+ template:
+ containers:
+ - name: the-container
+ image: registry/conatiner:latest
+将容器镜像指向特定版本,代替 latest 版本。
+# kustomization.yaml
+resources:
+- deployment.yaml
+
+patches:
+- path: patch.yaml
+# patch.yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: the-deployment
+spec:
+ template:
+ containers:
+ - name: the-container
+ image: registry/conatiner:1.0.0
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: the-deployment
+spec:
+ replicas: 5
+ template:
+ containers:
+ - image: registry/conatiner:1.0.0
+ name: the-container
+同上。
+# kustomization.yaml
+resources:
+- deployment.yaml
+
+patches:
+- target:
+ kind: Deployment
+ name: the-deployment
+ path: patch.json
+# patch.json
+[
+ {"op": "replace", "path": "/spec/template/containers/0/image", "value": "registry/conatiner:1.0.0"}
+]
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: the-deployment
+spec:
+ replicas: 5
+ template:
+ containers:
+ - image: registry/conatiner:1.0.0
+ name: the-container
+