Docs: Auto-fix markdownlint issues

This commit is contained in:
Prachi Pendse
2020-07-16 12:57:18 -07:00
parent 0b359d0ef0
commit f9ee578aed
76 changed files with 308 additions and 304 deletions

View File

@@ -33,5 +33,4 @@ We do a [Pull Request](https://github.com/kubernetes-sigs/kustomize/pulls) contr
New users are always welcome!
{{% /blocks/feature %}}
{{< /blocks/section >}}

View File

@@ -8,6 +8,7 @@ description: >
---
# Glossary
[CRD spec]: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
[CRD]: #custom-resource-definition
[DAM]: #declarative-application-management
@@ -67,7 +68,6 @@ dashboards.
[kustomize] configures k8s resources, and the proposed
application resource is just another resource.
## apply
The verb _apply_ in the context of k8s refers to a
@@ -100,7 +100,6 @@ dedicated to that purpose_. Same with [overlays].
Changes in a repo could generate a build, test and
deploy cycle.
## bespoke configuration
A _bespoke_ configuration is a [kustomization] and some
@@ -133,17 +132,17 @@ a set of best practices around managing k8s clusters.
In brief, kustomize should
* Work with any configuration, be it bespoke,
* Work with any configuration, be it bespoke,
off-the-shelf, stateless, stateful, etc.
* Support common customizations, and creation of
* Support common customizations, and creation of
[variants] (e.g. _development_ vs.
_staging_ vs. _production_).
* Expose and teach native k8s APIs, rather than
* Expose and teach native k8s APIs, rather than
hide them.
* Add no friction to version control integration to
* Add no friction to version control integration to
support reviews and audit trails.
* Compose with other tools in a unix sense.
* Eschew crossing the line into templating, domain
* Compose with other tools in a unix sense.
* Eschew crossing the line into templating, domain
specific languages, etc., frustrating the other
goals.
@@ -152,7 +151,6 @@ In brief, kustomize should
A generator makes resources that can be used as is,
or fed into a [transformer].
## gitops
Devops or CICD workflows that use a git repository as a
@@ -171,31 +169,30 @@ data that doesn't require a URL specification).
I.e. if someone gives you a _kustomization_ for use
with [kustomize], it could be in the form of
* one file called `kustomization.yaml`,
* a tarball (containing that YAML file plus what it references),
* a git archive (ditto),
* a URL to a git repo (ditto), etc.
* one file called `kustomization.yaml`,
* a tarball (containing that YAML file plus what it references),
* a git archive (ditto),
* a URL to a git repo (ditto), etc.
A kustomization file contains [fields](fields.md)
falling into four categories:
* _resources_ - what existing [resources] are to be customized.
* _resources_ - what existing [resources] are to be customized.
Example fields: _resources_, _crds_.
* _generators_ - what _new_ resources should be created.
* _generators_ - what _new_ resources should be created.
Example fields: _configMapGenerator_ (legacy),
_secretGenerator_ (legacy), _generators_ (v2.1).
* _transformers_ - what to _do_ to the aforementioned resources.
* _transformers_ - what to _do_ to the aforementioned resources.
Example fields: _namePrefix_, _nameSuffix_, _images_,
_commonLabels_, _patchesJson6902_, etc. and the more
general _transformers_ (v2.1) field.
* _meta_ - fields which may influence all or some of
* _meta_ - fields which may influence all or some of
the above. Example fields: _vars_, _namespace_,
_apiVersion_, _kind_, etc.
## kustomization root
The directory that immediately contains a
@@ -222,8 +219,8 @@ absolute path, or by relative path.
If kustomization __A__ depends on kustomization __B__, then
* __B__ may not _contain_ __A__.
* __B__ may not _depend on_ __A__, even transitively.
* __B__ may not _contain_ __A__.
* __B__ may not _depend on_ __A__, even transitively.
__A__ may contain __B__, but in this case it might be
simplest to have __A__ directly depend on __B__'s
@@ -234,7 +231,6 @@ Conventionally, __B__ is in a directory that's sibling
to __A__, or __B__ is off in a completely independent
git repository, referencable from any kustomization.
A common layout is
> ```
@@ -291,7 +287,6 @@ resource patching.
kustomize is an implementation of [DAM].
## off-the-shelf configuration
An _off-the-shelf_ configuration is a kustomization and

View File

@@ -14,4 +14,3 @@ Move entries into the [resources](/kustomize/api-reference/kustomization/resourc
field. This allows bases - which are still a
[central concept](/kustomize/api-reference/kustomization/glossary#base) - to be
ordered relative to other input resources.

View File

@@ -55,4 +55,3 @@ metadata:
spec:
...
```

View File

@@ -10,6 +10,7 @@ Each entry in this list results in the creation of
one ConfigMap resource (it's a generator of n maps).
The example below creates four ConfigMaps:
- first, with the names and contents of the given files
- second, with key/value as data using key/value pairs from files
- third, also with key/value as data, directly specified using `literals`

View File

@@ -22,12 +22,13 @@ with namePrefix, nameSuffix, or hashing in the
same way.
The annotations can be put into openAPI definitions are:
- "x-kubernetes-annotation": ""
- "x-kubernetes-label-selector": ""
- "x-kubernetes-identity": ""
- "x-kubernetes-object-ref-api-version": "v1",
- "x-kubernetes-object-ref-kind": "Secret",
- "x-kubernetes-object-ref-name-key": "name",
- "x-kubernetes-annotation": ""
- "x-kubernetes-label-selector": ""
- "x-kubernetes-identity": ""
- "x-kubernetes-object-ref-api-version": "v1",
- "x-kubernetes-object-ref-kind": "Secret",
- "x-kubernetes-object-ref-name-key": "name",
```yaml
apiVersion: kustomize.config.k8s.io/v1beta1

View File

@@ -28,10 +28,10 @@ spec:
one can change the `image` in the following ways:
- `postgres:8` to `my-registry/my-postgres:v1`,
- nginx tag `1.7.9` to `1.8.0`,
- image name `my-demo-app` to `my-app`,
- alpine's tag `3.7` to a digest value
- `postgres:8` to `my-registry/my-postgres:v1`,
- nginx tag `1.7.9` to `1.8.0`,
- image name `my-demo-app` to `my-app`,
- alpine's tag `3.7` to a digest value
all with the following *kustomization*:

View File

@@ -32,6 +32,7 @@ patchesStrategicMerge:
```
The patch content can be a inline string as well.
```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -8,7 +8,7 @@ description: >
Each entry in this list should resolve to a kubernetes object and a JSON patch that will be applied
to the object.
The JSON patch is documented at https://tools.ietf.org/html/rfc6902
The JSON patch is documented at <https://tools.ietf.org/html/rfc6902>
target field points to a kubernetes object within the same kustomization
by the object's group, version, kind, name and namespace.

View File

@@ -35,6 +35,7 @@ be modified at the same time.
As this declaration does not take in a `kind:` nor a `group:`
it will match any `group` and `kind` that has a matching name and
that is one of:
- `Deployment`
- `ReplicationController`
- `ReplicaSet`

View File

@@ -81,5 +81,3 @@ job. E.g., a Deployment may reference a ConfigMap
by name, and if kustomize changes the name of a
ConfigMap, it knows to change the name reference
in the Deployment.

View File

@@ -10,13 +10,13 @@ Initial release after move from github.com/kubernetes/kubectl to github.com/kube
History
* May 2018: v1.0 after move to github.com/kubernetes-sigs/kubectl
* May 2018: v1.0 after move to github.com/kubernetes-sigs/kubectl
from github.com/kubernetes/kubectl.
Has kustomization file, bases, overlays, basic transforms.
* Apr 2018: s/kinflate/kustomize/, s/manifest/kustomization/
* Oct 2017: s/kexpand/kinflate/
* Sep 2017: kexpand [starts](https://github.com/kubernetes/kubectl/pull/65)
* Apr 2018: s/kinflate/kustomize/, s/manifest/kustomization/
* Oct 2017: s/kexpand/kinflate/
* Sep 2017: kexpand [starts](https://github.com/kubernetes/kubectl/pull/65)
in github.com/kubernetes/kubectl
* Aug 2017: [DAM] authored by Brian Grant
* Aug 2017: [DAM] authored by Brian Grant
[DAM]: https://docs.google.com/document/d/1cLPGweVEYrVqQvBLJg6sxV-TrE5Rm2MNOBA_cxZP2WU

View File

@@ -164,7 +164,6 @@ orphaned cluster resources.
For more information see the
[kustomize inventory object documentation].
## Field changes / deprecations
### `resources` expanded, `bases` deprecated

View File

@@ -17,7 +17,7 @@ floor on a stable API for [plugin] developers
(both _Go_ plugin developers and _exec_ plugin
developers who happen to use Go).
### Why so soon after v2.1.0?
### Why so soon after v2.1.0
[semantic versioning]: https://semver.org
[Go modules doc]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
@@ -70,6 +70,3 @@ Aside - the set of kustomize packages outside
by package use, this API surface must shrink.
Such shrinkage will trigger a major version
increment.

View File

@@ -7,6 +7,7 @@ description: >
---
## Extended patches
Since this version, Kustomize allows applying one patch to multiple resources. This works for both Strategic Merge Patch and JSON Patch. Take a look at [patch multiple objects](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/patchMultipleObjects.md).
## Improved Resource Matching
@@ -52,7 +53,6 @@ spec:
value: PRODVALUE
```
### Variable resolution improvement
It is possible to add namespace field to the variable declaration. In the following example,
@@ -88,6 +88,7 @@ vars:
Kustomize is now able to deal with simultaneous changes of name and namespace.
Special attention has been paid the handling of:
- ClusterRoleBinding/RoleBinding "subjects" field,
- ValidatingWebhookConfiguration "webhooks" field.
@@ -106,7 +107,7 @@ resources:
...
```
### Resource and Kustomize Context matching.
### Resource and Kustomize Context matching
Kustomize is now able to support more aggregation patterns.

View File

@@ -7,6 +7,7 @@ description: >
---
## Inline Patch
Since this version, Kustomize allows inline patches in all three of `patchesStrategicMerge`, `patchesJson6902` and `patches`. Take a look at [inline patch](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/examples/inlinePatch.md).
## New Subcommand
@@ -14,11 +15,13 @@ Since this version, Kustomize allows inline patches in all three of `patchesStra
Since this version, one can create a kustomization.yaml file in a directory through a `create` subcommand.
Create a new overlay from the base ../base
```
kustomize create --resources ../base
```
Create a new kustomization detecing resources in the current directory
```
kustomize create --autodetect
```
@@ -30,5 +33,5 @@ kustomize create --autodetect --recursive
```
### New Example Generator
A new example generator of using go-getter to download resources is added. Take a look at [go-getter generator](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/goGetterGeneratorPlugin.md).
A new example generator of using go-getter to download resources is added. Take a look at [go-getter generator](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/goGetterGeneratorPlugin.md).

View File

@@ -12,7 +12,7 @@ description: >
## Summary of changes
### First release of the Go API-only module.
### First release of the Go API-only module
Many of the PRs since the last vrelease were
around restructuring the _sigs.k8s.io/kustomize_
@@ -43,7 +43,6 @@ any other client.
The new semver-able API will begin with `v4.0.0` (not
yet released) and be a clean break with `v3` etc.
### Change log since v3.2.0
```

View File

@@ -14,10 +14,10 @@ description: >
File issues as desired, but if you've found a problem
with how `kustomize build` works, please report
* the output of `kustomize version`,
* the input (the content of `kustomization.yaml`
* the output of `kustomize version`,
* the input (the content of `kustomization.yaml`
and any files it refers to),
* the expected YAML output.
* the expected YAML output.
## If you have `go` installed

View File

@@ -21,5 +21,3 @@ If you are interested in contributing towards Kustomize or getting more involved
- join the [mailing list] and reach out
- join the [slack channel] and reach out
- attend one of the [bi-weekly meetings] (alternating Wednesdays at 9:00am Pacific Time)

View File

@@ -79,4 +79,3 @@ Changes must be pushed to the fork's **master branch** to be served as the fork'
4. Commit and push the changes to the *remote fork's* **master branch**
5. After a few minutes, the docs should be served from the fork's GitHub Page
- e.g. [https://pwittrock.github.io/kustomize/](https://pwittrock.github.io/kustomize/)

View File

@@ -15,7 +15,6 @@ description: >
[eschewed feature list]: https://kubernetes-sigs.github.io/kustomize/faq/eschewedfeatures/
[kind/feature]: https://github.com/kubernetes-sigs/kustomize/labels/kind%2Ffeature
Following is the process for proposing a new Kustomize feature:
1. Check the [eschewed feature list] to see if the feature has already been proposed

View File

@@ -9,30 +9,34 @@ description: >
This is the PowerShell script to run all go tests for Kustomize on a windows based platform which mimics /build/pre-commit.sh
## Pre-Reqs:
- PowerShell installed
## Pre-Reqs
- PowerShell installed
- PowerShell Core is supported
- go installed
- golangci-lint installed
- mdrip installed
- go installed
- golangci-lint installed
- mdrip installed
This script should output to the current console and return an exit code if all tests are successful(0) or any failed(1).
### If you are tryin to run these tests locally you can follow these instructions.
### If you are tryin to run these tests locally you can follow these instructions
Assume:
- Running a stock Windows 10 system
- Local Admin rights.
- You can open [PowerShell as administrator](http://lmgtfy.com/?iie=1&q=How+to+open+powershell+as+administrator)
- You should be knowledgeable enough to pull source for packages into your GO ```src``` directory
- Running a stock Windows 10 system
- Local Admin rights.
- You can open [PowerShell as administrator](http://lmgtfy.com/?iie=1&q=How+to+open+powershell+as+administrator)
- You should be knowledgeable enough to pull source for packages into your GO ```src``` directory
- Yes, this means you also need to know a bit about **git** usually
#### Step 1 - Install Go
- [Install Go](https://golang.org/dl/) - please use the msi
- [Install Go](https://golang.org/dl/) - please use the msi
- If you use chocolatey - it's using the zip not msi and assumptions on where go is located are made for you.
#### Step 2 - Install Go Packages
- Open new PowerShell Administrative window
- Open new PowerShell Administrative window
- Install golangci-lint
- ```go get -u github.com/golangci/golangci-lint/cmd/golangci-lint```
- Install mdrip
@@ -51,6 +55,7 @@ Usage: C:\_go\bin\mdrip.exe {fileName}...
```
#### Step 3 - Get Source and Test
- In your GoRoot src
- ```Example: C:\_go\src```
- Navigate to the Kustomize `travis` directory

View File

@@ -132,7 +132,6 @@ kustomize edit set image nginx:$MY_NGINX_VERSION
as part of some encapsulating work flow executed before
`kustomize build`.
## Globs in kustomization files
`kustomize` supports the best practice of storing one's

View File

@@ -118,10 +118,8 @@ itself is an API client requiring this module.
The clients and API will evolve independently.
## Kustomization File Versioning
The kustomization file is a struct that is part of
the kustomize Go API (the `sigs.k8s.io/kustomize`
module), but it also evolves as a k8s API object -

View File

@@ -57,6 +57,7 @@ Run kustomize, and pipe the output to [apply].
> ```
You can also use [kubectl-v1.14.0] to apply your [variants].
>
> ```
> kubectl apply -k ~/ldap/overlays/staging
> kubectl apply -k ~/ldap/overlays/production
@@ -78,4 +79,3 @@ You can also use [kubectl-v1.14.0] to apply your [variants].
[workflowBespoke]: /kustomize/images/workflowBespoke.jpg
[workflowOts]: /kustomize/images/workflowOts.jpg
[kubectl-v1.14.0]:https://kubernetes.io/blog/2019/03/25/kubernetes-1-14-release-announcement/

View File

@@ -10,7 +10,6 @@ description: >
In this workflow, all files are owned by the user and maintained in a repository under their control, but
they are based on an [off-the-shelf] configuration that is periodically consulted for updates.
![off-the-shelf config workflow image][workflowOts]
#### 1) find and [fork] an [OTS] config
@@ -49,6 +48,7 @@ distinct repository.
> ```
You can also use [kubectl-v1.14.0] to apply your [variants].
>
> ```
> kubectl apply -k ~/ldap/overlays/staging
> kubectl apply -k ~/ldap/overlays/production

View File

@@ -18,14 +18,14 @@ or [transformer configs] doesn't meet your needs.
[12-factor]: https://12factor.net
* A _generator_ plugin could be a helm chart
* A _generator_ plugin could be a helm chart
inflator, or a plugin that emits all the
components (deployment, service, scaler,
ingress, etc.) needed by someone's [12-factor]
application, based on a smaller number of free
variables.
* A _transformer_ plugin might perform special
* A _transformer_ plugin might perform special
container command line edits, or any other
transformation beyond those provided by the
builtin (`namePrefix`, `commonLabels`, etc.)
@@ -63,7 +63,6 @@ in-process kustomization run. Each of the
resulting objects is now further interpreted by
kustomize as a _plugin configuration_ object.
## Configuration
A kustomization file could have the following lines:
@@ -112,7 +111,6 @@ browse the unit tests below the [plugins] root,
e.g. the tests for [ChartInflator] or
[NameTransformer].
## Placement
Each plugin gets its own dedicated directory named
@@ -228,11 +226,11 @@ provided in the kustomization file).
#### Examples
* [helm chart inflator] - A generator that inflates a helm chart.
* [bashed config map] - Super simple configMap generation from bash.
* [sed transformer] - Define your unstructured edits using a
* [helm chart inflator] - A generator that inflates a helm chart.
* [bashed config map] - Super simple configMap generation from bash.
* [sed transformer] - Define your unstructured edits using a
plugin like this one.
* [hashicorp go-getter] - Download kustomize layes and build it to generate resources
* [hashicorp go-getter] - Download kustomize layes and build it to generate resources
A generator plugin accepts nothing on `stdin`, but emits
generated resources to `stdout`.
@@ -258,6 +256,7 @@ Resources can be marked as needing to be processed by the internal hash transfor
If this annotation is set on a resource not supported by the hash transformer the build will fail.
Example:
```yaml
apiVersion: v1
kind: ConfigMap
@@ -274,6 +273,7 @@ data:
The `behavior` annotation will influence how conflicts are handled for resources emitted by the plugin. Valid values include "create", "merge", and "replace" with "create" being the default.
Example:
```yaml
apiVersion: v1
kind: ConfigMap
@@ -342,17 +342,17 @@ Do one or the other or both as desired.
#### Examples
* [service generator] - generate a service from a name and port argument.
* [string prefixer] - uses the value in `metadata/name` as the prefix.
* [service generator] - generate a service from a name and port argument.
* [string prefixer] - uses the value in `metadata/name` as the prefix.
This particular example exists to show how a plugin can
transform the behavior of a plugin. See the
`TestTransformedTransformers` test in the `target` package.
* [date prefixer] - prefix the current date to resource names, a simple
* [date prefixer] - prefix the current date to resource names, a simple
example used to modify the string prefixer plugin just mentioned.
* [secret generator] - generate secrets from a toy database.
* [sops encoded secrets] - a more complex secret generator that converts SOPS files into Kubernetes Secrets
* [SOPSGenerator] - another generator that decrypts SOPS files into Secrets
* [All the builtin plugins](https://github.com/kubernetes-sigs/kustomize/tree/master/plugin/builtin).
* [secret generator] - generate secrets from a toy database.
* [sops encoded secrets] - a more complex secret generator that converts SOPS files into Kubernetes Secrets
* [SOPSGenerator] - another generator that decrypts SOPS files into Secrets
* [All the builtin plugins](https://github.com/kubernetes-sigs/kustomize/tree/master/plugin/builtin).
User authored plugins are
on the same footing as builtin operations.
@@ -372,4 +372,3 @@ d=$XDG_CONFIG_HOME/kustomize/plugin\
go build -buildmode plugin \
-o $d/${kind}.so $d/${kind}.go
```

View File

@@ -29,7 +29,6 @@ power as most of the plugins arguments must
be defaulted. The latter method allows for
complete plugin argument specification.
[types.GeneratorOptions]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/generatoroptions.go
[types.SecretArgs]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/secretargs.go
[types.ConfigMapArgs]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/configmapargs.go
@@ -42,6 +41,7 @@ complete plugin argument specification.
[image.Image]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/types/image.go
## _AnnotationTransformer_
### Usage via `kustomization.yaml`
#### field name: `commonAnnotations`
@@ -56,6 +56,7 @@ commonAnnotations:
```
### Usage via plugin
#### Arguments
> Annotations map\[string\]string
@@ -63,6 +64,7 @@ commonAnnotations:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```
> apiVersion: builtin
> kind: AnnotationsTransformer
@@ -76,8 +78,6 @@ commonAnnotations:
> create: true
> ```
## _ConfigMapGenerator_
### Usage via `kustomization.yaml`
@@ -156,11 +156,13 @@ configMapGenerator:
```
### Usage via plugin
#### Arguments
> [types.ConfigMapArgs]
#### Example
>
> ```
> apiVersion: builtin
> kind: ConfigMapGenerator
@@ -174,8 +176,8 @@ configMapGenerator:
> - VEGETABLE=carrot
> ```
## _ImageTagTransformer_
### Usage via `kustomization.yaml`
#### field name: `images`
@@ -198,10 +200,10 @@ containers:
one can change the `image` in the following ways:
- `postgres:8` to `my-registry/my-postgres:v1`,
- nginx tag `1.7.9` to `1.8.0`,
- image name `my-demo-app` to `my-app`,
- alpine's tag `3.7` to a digest value
- `postgres:8` to `my-registry/my-postgres:v1`,
- nginx tag `1.7.9` to `1.8.0`,
- image name `my-demo-app` to `my-app`,
- alpine's tag `3.7` to a digest value
all with the following *kustomization*:
@@ -219,6 +221,7 @@ images:
```
### Usage via plugin
#### Arguments
> ImageTag [image.Image]
@@ -226,6 +229,7 @@ images:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```
> apiVersion: builtin
> kind: ImageTagTransformer
@@ -236,9 +240,8 @@ images:
> newTag: v2
> ```
## _LabelTransformer_
### Usage via `kustomization.yaml`
#### field name: `commonLabels`
@@ -253,6 +256,7 @@ commonLabels:
```
### Usage via plugin
#### Arguments
> Labels map\[string\]string
@@ -260,6 +264,7 @@ commonLabels:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```
> apiVersion: builtin
> kind: LabelTransformer
@@ -273,14 +278,8 @@ commonLabels:
> create: true
> ```
## _NamespaceTransformer_
### Usage via `kustomization.yaml`
#### field name: `namespace`
@@ -292,6 +291,7 @@ namespace: my-namespace
```
### Usage via plugin
#### Arguments
> [types.ObjectMeta]
@@ -299,6 +299,7 @@ namespace: my-namespace
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```
> apiVersion: builtin
> kind: NamespaceTransformer
@@ -316,11 +317,8 @@ namespace: my-namespace
> group: rbac.authorization.k8s.io
> ```
## _PatchesJson6902_
### Usage via `kustomization.yaml`
#### field name: `patchesJson6902`
@@ -328,7 +326,7 @@ namespace: my-namespace
Each entry in this list should resolve to
a kubernetes object and a JSON patch that will be applied
to the object.
The JSON patch is documented at https://tools.ietf.org/html/rfc6902
The JSON patch is documented at <https://tools.ietf.org/html/rfc6902>
target field points to a kubernetes object within the same kustomization
by the object's group, version, kind, name and namespace.
@@ -385,7 +383,9 @@ patchesJson6902:
```
### Usage via plugin
#### Arguments
> Target [types.PatchTarget]
>
> Path string
@@ -393,6 +393,7 @@ patchesJson6902:
> JsonOp string
#### Example
>
> ```
> apiVersion: builtin
> kind: PatchJson6902Transformer
@@ -406,8 +407,8 @@ patchesJson6902:
> path: jsonpatch.json
> ```
## _PatchesStrategicMerge_
### Usage via `kustomization.yaml`
#### field name: `patchesStrategicMerge`
@@ -435,6 +436,7 @@ patchesStrategicMerge:
```
The patch content can be a inline string as well.
```
patchesStrategicMerge:
- |-
@@ -463,8 +465,8 @@ patch that performs all the needed deletions.
>
> Patches string
#### Example
>
> ```
> apiVersion: builtin
> kind: PatchStrategicMergeTransformer
@@ -474,8 +476,8 @@ patch that performs all the needed deletions.
> - patch.yaml
> ```
## _PatchTransformer_
### Usage via `kustomization.yaml`
#### field name: `patches`
@@ -514,6 +516,7 @@ automatically anchored regular expressions. This means that the value `myapp`
is equivalent to `^myapp$`.
### Usage via plugin
#### Arguments
> Path string
@@ -523,6 +526,7 @@ is equivalent to `^myapp$`.
> Target \*[types.Selector]
#### Example
>
> ```
> apiVersion: builtin
> kind: PatchTransformer
@@ -534,10 +538,8 @@ is equivalent to `^myapp$`.
> kind: Deployment
> ```
## _PrefixSuffixTransformer_
### Usage via `kustomization.yaml`
#### field names: `namePrefix`, `nameSuffix`
@@ -558,6 +560,7 @@ The suffix is appended before the content hash if
the resource type is ConfigMap or Secret.
### Usage via plugin
#### Arguments
> Prefix string
@@ -567,6 +570,7 @@ the resource type is ConfigMap or Secret.
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```
> apiVersion: builtin
> kind: PrefixSuffixTransformer
@@ -578,9 +582,8 @@ the resource type is ConfigMap or Secret.
> - path: metadata/name
> ```
## _ReplicaCountTransformer_
### Usage via `kustomization.yaml`
#### field name: `replicas`
@@ -612,6 +615,7 @@ be modified at the same time.
As this declaration does not take in a `kind:` nor a `group:`
it will match any `group` and `kind` that has a matching name and
that is one of:
- `Deployment`
- `ReplicationController`
- `ReplicaSet`
@@ -628,6 +632,7 @@ For more complex use cases, revert to using a patch.
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```
> apiVersion: builtin
> kind: ReplicaCountTransformer
@@ -645,8 +650,6 @@ For more complex use cases, revert to using a patch.
> kind: ReplicationController
> ```
## _SecretGenerator_
### Usage via `kustomization.yaml`

View File

@@ -18,8 +18,7 @@ current setup.
#### requirements
* linux, git, curl, Go 1.13
* linux, git, curl, Go 1.13
## Make a place to work
@@ -128,11 +127,11 @@ EOF
```
Review the files
```
ls -C1 $MYAPP
```
## Make a home for plugins
Plugins must live in a particular place for
@@ -205,6 +204,7 @@ chmod a+x $MY_PLUGIN_DIR/SillyConfigMapGenerator
## Install kustomize
Per the [instructions](/kustomize/installation):
```
curl -s "https://raw.githubusercontent.com/\
kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
@@ -218,7 +218,7 @@ mv kustomize $DEMO/bin
tree $DEMO
```
## Build your app, using the plugin:
## Build your app, using the plugin
```
XDG_CONFIG_HOME=$DEMO $DEMO/bin/kustomize build --enable_alpha_plugins $MYAPP

View File

@@ -57,6 +57,7 @@ accepting a shared plugin _must compile both
kustomize and the plugin_.
This means a one-time run of
```
# Or whatever is appropriate at time of reading
GOPATH=${whatever} GO111MODULE=on go get sigs.k8s.io/kustomize/api
@@ -68,13 +69,14 @@ and then a normal development cycle using
go build -buildmode plugin \
-o ${wherever}/${kind}.so ${wherever}/${kind}.go
```
with paths and the release version tag (e.g. `v3.0.0`)
adjusted as needed.
For comparison, consider what one
must do to write a [tensorflow plugin].
## Why support Go plugins?
## Why support Go plugins
### Safety

View File

@@ -102,7 +102,7 @@ PLUGIN_ROOT=$DEMO/kustomize/plugin
and ephemerally set `XDG_CONFIG_HOME` on a command
line below.
### What apiVersion and kind?
### What apiVersion and kind
At this stage in the development of kustomize
plugins, plugin code doesn't know or care what
@@ -180,12 +180,12 @@ dependency [skew].
On load failure
* be sure to build the plugin with the same
* be sure to build the plugin with the same
version of Go (_go1.13_) on the same `$GOOS`
(_linux_) and `$GOARCH` (_amd64_) used to build
the kustomize being [used in this demo].
* change the plugin's dependencies in its `go.mod`
* change the plugin's dependencies in its `go.mod`
to match the versions used by kustomize (check
kustomize's `go.mod` used in its tagged commit).
@@ -356,7 +356,7 @@ This should look something like:
> └── secGenerator.yaml
> ```
## Build your app, using the plugin:
## Build your app, using the plugin
```shell
XDG_CONFIG_HOME=$DEMO $tmpGoPath/bin/kustomize build --enable_alpha_plugins $MYAPP

View File

@@ -13,5 +13,6 @@ choco install kustomize
For support on the chocolatey package
and prior releases, see:
- [Choco Package](https://chocolatey.org/packages/kustomize)
- [Package Source](https://github.com/kenmaglio/choco-kustomize)

View File

@@ -18,4 +18,3 @@ For [MacPorts](https://www.macports.org) users:
```
sudo port install kustomize
```

View File

@@ -39,5 +39,4 @@ git checkout kustomize/v3.2.3
~/go/bin/kustomize version
```
[Go]: https://golang.org

View File

@@ -28,7 +28,6 @@ linkTitle = "Kustomize"
{{< blocks/section >}}
{{% blocks/feature icon="fab fa-github" title="参与贡献" %}}
欢迎在 **Github** 提交 [RP](https://github.com/kubernetes-sigs/kustomize/pulls),贡献你的力量。
{{% /blocks/feature %}}

View File

@@ -9,6 +9,7 @@ description: >
列表中的每个条目都将生成一个 ConfigMap (合计可以生成 n 个 ConfigMap
以下示例创建四个 ConfigMap
- 第一个使用给定文件的名称和内容创建数据
- 第二个使用文件中的键/值对将数据创建为键/值
- 第三个使用 `literals` 中的键/值对创建数据作为键/值

View File

@@ -27,10 +27,10 @@ spec:
想要将 `image` 做如下更改:
-`postgres:8` 改为 `my-registry/my-postgres:v1`
- 将 nginx tag 从 `1.7.9` 改为 `1.8.0`
- 将镜像名称 `my-demo-app` 改为 `my-app`
- 将 alpine 的 tag `3.7` 改为 digest 值
-`postgres:8` 改为 `my-registry/my-postgres:v1`
- 将 nginx tag 从 `1.7.9` 改为 `1.8.0`
- 将镜像名称 `my-demo-app` 改为 `my-app`
- 将 alpine 的 tag `3.7` 改为 digest 值
只需在 *kustomization* 中添加以下内容:

View File

@@ -9,7 +9,6 @@ description: >
[strategic merge]: /kustomize/zh/api-reference/glossary#patchstrategicmerge
[JSON]: /kustomize/zh/api-reference/glossary#patchjson6902
Patches 在资源上添加或覆盖字段Kustomization 使用 `patches` 字段来提供该功能。
`patches` 字段包含要按指定顺序应用的 patch 列表。

View File

@@ -23,6 +23,7 @@ patchesStrategicMerge:
```
patch 内容也可以是一个inline string
```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -31,6 +31,7 @@ replicas:
该字段内容为列表,所以可以同时修改许多资源。
由于这个声明无法设置 `kind:``group:`,所以他只能匹配如下资源中的一种:
- `Deployment`
- `ReplicationController`
- `ReplicaSet`

View File

@@ -7,6 +7,7 @@ description: >
---
该条目可以是指向本地目录的相对路径,也可以是指向远程仓库中的目录的 URL例如
```yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View File

@@ -10,13 +10,13 @@ Initial release after move from github.com/kubernetes/kubectl to github.com/kube
History
* May 2018: v1.0 after move to github.com/kubernetes-sigs/kubectl
* May 2018: v1.0 after move to github.com/kubernetes-sigs/kubectl
from github.com/kubernetes/kubectl.
Has kustomization file, bases, overlays, basic transforms.
* Apr 2018: s/kinflate/kustomize/, s/manifest/kustomization/
* Oct 2017: s/kexpand/kinflate/
* Sep 2017: kexpand [starts](https://github.com/kubernetes/kubectl/pull/65)
* Apr 2018: s/kinflate/kustomize/, s/manifest/kustomization/
* Oct 2017: s/kexpand/kinflate/
* Sep 2017: kexpand [starts](https://github.com/kubernetes/kubectl/pull/65)
in github.com/kubernetes/kubectl
* Aug 2017: [DAM] authored by Brian Grant
* Aug 2017: [DAM] authored by Brian Grant
[DAM]: https://docs.google.com/document/d/1cLPGweVEYrVqQvBLJg6sxV-TrE5Rm2MNOBA_cxZP2WU

View File

@@ -164,7 +164,6 @@ orphaned cluster resources.
For more information see the
[kustomize inventory object documentation].
## Field changes / deprecations
### `resources` expanded, `bases` deprecated

View File

@@ -17,7 +17,7 @@ floor on a stable API for [plugin] developers
(both _Go_ plugin developers and _exec_ plugin
developers who happen to use Go).
### Why so soon after v2.1.0?
### Why so soon after v2.1.0
[semantic versioning]: https://semver.org
[Go modules doc]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
@@ -70,6 +70,3 @@ Aside - the set of kustomize packages outside
by package use, this API surface must shrink.
Such shrinkage will trigger a major version
increment.

View File

@@ -7,6 +7,7 @@ description: >
---
## Extended patches
Since this version, Kustomize allows applying one patch to multiple resources. This works for both Strategic Merge Patch and JSON Patch. Take a look at [patch multiple objects](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/patchMultipleObjects.md).
## Improved Resource Matching
@@ -52,7 +53,6 @@ spec:
value: PRODVALUE
```
### Variable resolution improvement
It is possible to add namespace field to the variable declaration. In the following example,
@@ -88,6 +88,7 @@ vars:
Kustomize is now able to deal with simultaneous changes of name and namespace.
Special attention has been paid the handling of:
- ClusterRoleBinding/RoleBinding "subjects" field,
- ValidatingWebhookConfiguration "webhooks" field.
@@ -106,7 +107,7 @@ resources:
...
```
### Resource and Kustomize Context matching.
### Resource and Kustomize Context matching
Kustomize is now able to support more aggregation patterns.

View File

@@ -7,6 +7,7 @@ description: >
---
## Inline Patch
Since this version, Kustomize allows inline patches in all three of `patchesStrategicMerge`, `patchesJson6902` and `patches`. Take a look at [inline patch](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/examples/inlinePatch.md).
## New Subcommand
@@ -14,11 +15,13 @@ Since this version, Kustomize allows inline patches in all three of `patchesStra
Since this version, one can create a kustomization.yaml file in a directory through a `create` subcommand.
Create a new overlay from the base ../base
```
kustomize create --resources ../base
```
Create a new kustomization detecing resources in the current directory
```
kustomize create --autodetect
```
@@ -30,5 +33,5 @@ kustomize create --autodetect --recursive
```
### New Example Generator
A new example generator of using go-getter to download resources is added. Take a look at [go-getter generator](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/goGetterGeneratorPlugin.md).
A new example generator of using go-getter to download resources is added. Take a look at [go-getter generator](https://github.com/kubernetes-sigs/kustomize/tree/master/examples/goGetterGeneratorPlugin.md).

View File

@@ -12,7 +12,7 @@ description: >
## Summary of changes
### First release of the Go API-only module.
### First release of the Go API-only module
Many of the PRs since the last vrelease were
around restructuring the _sigs.k8s.io/kustomize_
@@ -43,7 +43,6 @@ any other client.
The new semver-able API will begin with `v4.0.0` (not
yet released) and be a clean break with `v3` etc.
### Change log since v3.2.0
```

View File

@@ -14,10 +14,10 @@ description: >
File issues as desired, but if you've found a problem
with how `kustomize build` works, please report
* the output of `kustomize version`,
* the input (the content of `kustomization.yaml`
* the output of `kustomize version`,
* the input (the content of `kustomization.yaml`
and any files it refers to),
* the expected YAML output.
* the expected YAML output.
## If you have `go` installed

View File

@@ -21,5 +21,3 @@ If you are interested in contributing towards Kustomize or getting more involved
- join the [mailing list] and reach out
- join the [slack channel] and reach out
- attend one of the [bi-weekly meetings] (alternating Wednesdays at 9:00am Pacific Time)

View File

@@ -79,4 +79,3 @@ Changes must be pushed to the fork's **master branch** to be served as the fork'
4. Commit and push the changes to the *remote fork's* **master branch**
5. After a few minutes, the docs should be served from the fork's GitHub Page
- e.g. [https://pwittrock.github.io/kustomize/](https://pwittrock.github.io/kustomize/)

View File

@@ -15,7 +15,6 @@ description: >
[eschewed feature list]: https://kubernetes-sigs.github.io/kustomize/faq/eschewedfeatures/
[kind/feature]: https://github.com/kubernetes-sigs/kustomize/labels/kind%2Ffeature
Following is the process for proposing a new Kustomize feature:
1. Check the [eschewed feature list] to see if the feature has already been proposed

View File

@@ -9,30 +9,34 @@ description: >
This is the PowerShell script to run all go tests for Kustomize on a windows based platform which mimics /build/pre-commit.sh
## Pre-Reqs:
- PowerShell installed
## Pre-Reqs
- PowerShell installed
- PowerShell Core is supported
- go installed
- golangci-lint installed
- mdrip installed
- go installed
- golangci-lint installed
- mdrip installed
This script should output to the current console and return an exit code if all tests are successful(0) or any failed(1).
### If you are tryin to run these tests locally you can follow these instructions.
### If you are tryin to run these tests locally you can follow these instructions
Assume:
- Running a stock Windows 10 system
- Local Admin rights.
- You can open [PowerShell as administrator](http://lmgtfy.com/?iie=1&q=How+to+open+powershell+as+administrator)
- You should be knowledgeable enough to pull source for packages into your GO ```src``` directory
- Running a stock Windows 10 system
- Local Admin rights.
- You can open [PowerShell as administrator](http://lmgtfy.com/?iie=1&q=How+to+open+powershell+as+administrator)
- You should be knowledgeable enough to pull source for packages into your GO ```src``` directory
- Yes, this means you also need to know a bit about **git** usually
#### Step 1 - Install Go
- [Install Go](https://golang.org/dl/) - please use the msi
- [Install Go](https://golang.org/dl/) - please use the msi
- If you use chocolatey - it's using the zip not msi and assumptions on where go is located are made for you.
#### Step 2 - Install Go Packages
- Open new PowerShell Administrative window
- Open new PowerShell Administrative window
- Install golangci-lint
- ```go get -u github.com/golangci/golangci-lint/cmd/golangci-lint```
- Install mdrip
@@ -51,6 +55,7 @@ Usage: C:\_go\bin\mdrip.exe {fileName}...
```
#### Step 3 - Get Source and Test
- In your GoRoot src
- ```Example: C:\_go\src```
- Navigate to the Kustomize `travis` directory

View File

@@ -132,7 +132,6 @@ kustomize edit set image nginx:$MY_NGINX_VERSION
as part of some encapsulating work flow executed before
`kustomize build`.
## Globs in kustomization files
`kustomize` supports the best practice of storing one's

View File

@@ -118,10 +118,8 @@ itself is an API client requiring this module.
The clients and API will evolve independently.
## Kustomization File Versioning
The kustomization file is a struct that is part of
the kustomize Go API (the `sigs.k8s.io/kustomize`
module), but it also evolves as a k8s API object -

View File

@@ -51,6 +51,7 @@ description: >
> ```
也可以在 [kubectl-v1.14.0] 版,使用 ```kubectl``` 命令发布你的 [variants] 。
>
> ```
> kubectl apply -k ~/ldap/overlays/staging
> kubectl apply -k ~/ldap/overlays/production

View File

@@ -45,6 +45,7 @@ description: >
> ```
也可以在 [kubectl-v1.14.0] 版,使用 ```kubectl``` 命令发布你的 [variants] 。
>
> ```bash
> kubectl apply -k ~/ldap/overlays/staging
> kubectl apply -k ~/ldap/overlays/production

View File

@@ -16,8 +16,8 @@ Kustomize 提供一个插件框架,允许用户开发自己的 _生成器_ 和
[12-factor]: https://12factor.net
* _generator_ 插件生成 k8s 资源,比如 [helm chart inflator] 是一个 generator 插件,基于少量自由变量生成一个 [12-factor] 应用所包含的全部组件 deploymentservicescaleringress 等)也是一个 generator 插件。
* _transformer_ 插件转化修改k8s 资源,比如可能会执行对特殊容器命令行的编辑,或为其他内置转换器(`namePrefix``commonLabels` 等)无法转换的内容提供转换。
* _generator_ 插件生成 k8s 资源,比如 [helm chart inflator] 是一个 generator 插件,基于少量自由变量生成一个 [12-factor] 应用所包含的全部组件 deploymentservicescaleringress 等)也是一个 generator 插件。
* _transformer_ 插件转化修改k8s 资源,比如可能会执行对特殊容器命令行的编辑,或为其他内置转换器(`namePrefix``commonLabels` 等)无法转换的内容提供转换。
## `kustomization.yaml` 的格式
@@ -42,7 +42,6 @@ Kustomize 提供一个插件框架,允许用户开发自己的 _生成器_ 和
从磁盘上读取 YAML 文件kustomization 的路径或 URL 会触发 kustomization 的运行。由此产生的每个的对象都会被 kustomize 进一步解析为 _plugin configuration_ 对象。
## 配置
kustomization 文件可以包含如下内容:
@@ -149,10 +148,10 @@ _exec 插件_ 是一个可以在命令行中接收参数可执行文件,该参
#### 示例
* [helm chart inflator] - helm chart inflates 生成器。
* [bashed config map] - 使用 bash 生成十分简单的 configMap。
* [sed transformer] - 使用插件来定义非结构化的编辑。
* [hashicorp go-getter] - 下载 kustomize layes 并通过构建它来生成资源。
* [helm chart inflator] - helm chart inflates 生成器。
* [bashed config map] - 使用 bash 生成十分简单的 configMap。
* [sed transformer] - 使用插件来定义非结构化的编辑。
* [hashicorp go-getter] - 下载 kustomize layes 并通过构建它来生成资源。
生成器插件无需在 `stdin` 上输入任何东西,就会将生成的资源输出到 `stdout`
@@ -173,6 +172,7 @@ kustomize 会使用 exec 插件适配器,为 `stdin` 提供的资源,并获
如果此注释被设置在不受哈希转换器支持的资源上,将导致构建将失败。
示例:
```yaml
apiVersion: v1
kind: ConfigMap
@@ -189,6 +189,7 @@ data:
`behavior` 注释为当资源发生冲突时插件的处理方式,有效值包括:"create"、"merge "和 "replace",默认为 "create"。
示例:
```yaml
apiVersion: v1
kind: ConfigMap
@@ -247,12 +248,12 @@ kustomize 的一个 Go 插件看起来是这样的:
#### 示例
* [service generator] - 使用 name 和 port 参数生成一个 service。
* [string prefixer] - 使用 `metadata/name` 值作为前缀。这个特殊的示例是为了展示插件的转化行为。详见 `target` 包中的 `TestTransformedTransformers` 测试。
* [date prefixer] - 将当前日期作为前缀添加到资源名称上,这是一个用于修改刚才提到的字符串前缀插件的简单示例。
* [secret generator] - 从 toy 数据库生成 secret。
* [sops encoded secrets] - 一个更复杂的 secret 生成器。
* [All the builtin plugins](https://github.com/kubernetes-sigs/kustomize/tree/master/plugin/builtin).
* [service generator] - 使用 name 和 port 参数生成一个 service。
* [string prefixer] - 使用 `metadata/name` 值作为前缀。这个特殊的示例是为了展示插件的转化行为。详见 `target` 包中的 `TestTransformedTransformers` 测试。
* [date prefixer] - 将当前日期作为前缀添加到资源名称上,这是一个用于修改刚才提到的字符串前缀插件的简单示例。
* [secret generator] - 从 toy 数据库生成 secret。
* [sops encoded secrets] - 一个更复杂的 secret 生成器。
* [All the builtin plugins](https://github.com/kubernetes-sigs/kustomize/tree/master/plugin/builtin).
用户自制的插件与内置插件是一样的。
Go 插件既可以是生成器,也可以是转化器。`Generate` 方法将在 `Transform` 方法运行之前与所有其他生成器一起运行。

View File

@@ -50,6 +50,7 @@ commonAnnotations:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: AnnotationsTransformer
@@ -63,8 +64,6 @@ commonAnnotations:
> create: true
> ```
## _ConfigMapGenerator_
### 使用 `kustomization.yaml`
@@ -129,6 +128,7 @@ configMapGenerator:
> [types.ConfigMapArgs]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: ConfigMapGenerator
@@ -142,7 +142,6 @@ configMapGenerator:
> - VEGETABLE=carrot
> ```
## _ImageTagTransformer_
### 使用 `kustomization.yaml`
@@ -165,10 +164,10 @@ containers:
想要将 `image` 做如下更改:
-`postgres:8` 改为 `my-registry/my-postgres:v1`
- 将 nginx tag 从 `1.7.9` 改为 `1.8.0`
- 将镜像名称 `my-demo-app` 改为 `my-app`
- 将 alpine 的 tag `3.7` 改为 digest 值
-`postgres:8` 改为 `my-registry/my-postgres:v1`
- 将 nginx tag 从 `1.7.9` 改为 `1.8.0`
- 将镜像名称 `my-demo-app` 改为 `my-app`
- 将 alpine 的 tag `3.7` 改为 digest 值
只需在 *kustomization* 中添加以下内容:
@@ -194,6 +193,7 @@ images:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: ImageTagTransformer
@@ -204,8 +204,6 @@ images:
> newTag: v2
> ```
## _LabelTransformer_
### 使用 `kustomization.yaml`
@@ -230,6 +228,7 @@ commonLabels:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: LabelTransformer
@@ -264,6 +263,7 @@ namespace: my-namespace
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: NamespaceTransformer
@@ -345,6 +345,7 @@ patchesJson6902:
### 使用插件
#### Arguments
> Target [types.PatchTarget]
>
> Path string
@@ -352,6 +353,7 @@ patchesJson6902:
> JsonOp string
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: PatchJson6902Transformer
@@ -385,6 +387,7 @@ patchesStrategicMerge:
```
patch 内容也可以是一个inline string
```yaml
patchesStrategicMerge:
- |-
@@ -411,6 +414,7 @@ patchesStrategicMerge:
> Patches string
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: PatchStrategicMergeTransformer
@@ -420,7 +424,6 @@ patchesStrategicMerge:
> - patch.yaml
> ```
## _PatchTransformer_
### 使用 `kustomization.yaml`
@@ -463,6 +466,7 @@ is equivalent to `^myapp$`。
> Target \*[types.Selector]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: PatchTransformer
@@ -502,6 +506,7 @@ nameSuffix: -v2
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: PrefixSuffixTransformer
@@ -542,6 +547,7 @@ replicas:
该字段内容为列表,所以可以同时修改许多资源。
由于这个声明无法设置 `kind:``group:`,所以他只能匹配如下资源中的一种:
- `Deployment`
- `ReplicationController`
- `ReplicaSet`
@@ -558,6 +564,7 @@ replicas:
> FieldSpecs \[\][config.FieldSpec]
#### Example
>
> ```yaml
> apiVersion: builtin
> kind: ReplicaCountTransformer

View File

@@ -15,10 +15,10 @@ description: >
#### 环境要求
* `linux`
* `git`
* `curl`
* `Go 1.13`
* `linux`
* `git`
* `curl`
* `Go 1.13`
## 创建一个工作空间/目录
@@ -203,7 +203,7 @@ mv kustomize $DEMO/bin
tree $DEMO
```
## 使用插件构建 APP:
## 使用插件构建 APP
```bash
XDG_CONFIG_HOME=$DEMO $DEMO/bin/kustomize build --enable_alpha_plugins $MYAPP

View File

@@ -50,7 +50,7 @@ go build -buildmode plugin \
为了进行比较,可以参考编写 [tensorflow plugin] 必须做的事情。
## 为什么支持 Go 插件
## 为什么支持 Go 插件
### 安全

View File

@@ -75,7 +75,7 @@ PLUGIN_ROOT=$DEMO/kustomize/plugin
并在下面的命令行中临时设置 `XDG_CONFIG_HOME`
### 使用什么 apiVersion 和 kind
### 使用什么 apiVersion 和 kind
在 kustomize 插件的开发时,插件代码不关心也不知道配置文件中的 `apiVersion``kind`
@@ -136,9 +136,9 @@ GOPATH=$tmpGoPath go build -buildmode plugin -o ${kind}.so ${kind}.go
在加载失败时
* 确保使用相同版本的Go (_go1.13_),在相同的 `$GOOS`(_linux_)和 `$GOARCH`(_amd64_) 上构建插件,用于构建本演示中使用的 [kustomize](#安装-kustomize)。
* 确保使用相同版本的Go (_go1.13_),在相同的 `$GOOS`(_linux_)和 `$GOARCH`(_amd64_) 上构建插件,用于构建本演示中使用的 [kustomize](#安装-kustomize)。
* 修改插件中的依赖文件 `go.mod` 以匹配 kustomize 使用的版本。
* 修改插件中的依赖文件 `go.mod` 以匹配 kustomize 使用的版本。
缺乏工具和元数据来实现自动化,就不会有一个完整的 Go 插件生态。
@@ -296,7 +296,7 @@ tree $DEMO
> └── secGenerator.yaml
> ```
## 使用插件构建您的应用
## 使用插件构建您的应用
```shell
XDG_CONFIG_HOME=$DEMO $tmpGoPath/bin/kustomize build --enable_alpha_plugins $MYAPP

View File

@@ -12,5 +12,6 @@ choco install kustomize
```
有关软件包管理器 chocolatey 的使用以及对之前版本的支持,请参考以下链接:
- [Choco Package](https://chocolatey.org/packages/kustomize)
- [Package Source](https://github.com/kenmaglio/choco-kustomize)