mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-17 20:08:17 +00:00
Compare commits
195 Commits
cmd/config
...
api/v0.4.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42d1f7b792 | ||
|
|
8912c454ff | ||
|
|
d4eb2c9426 | ||
|
|
d2b95fb09a | ||
|
|
298b3c8622 | ||
|
|
c12e95fe06 | ||
|
|
87c7a32ffe | ||
|
|
a7545bdad3 | ||
|
|
622a121042 | ||
|
|
c7bc9d2066 | ||
|
|
9567d7ef16 | ||
|
|
e5b0ceb4e3 | ||
|
|
5fb238a581 | ||
|
|
3ddc9af6c5 | ||
|
|
128e171c20 | ||
|
|
c2681b6fae | ||
|
|
ae5c392319 | ||
|
|
66bcf84682 | ||
|
|
436dada184 | ||
|
|
a689e0c2b4 | ||
|
|
30ae7183a4 | ||
|
|
279a9b673f | ||
|
|
0ac45c65c9 | ||
|
|
d7fb813c16 | ||
|
|
83c5c4d1f1 | ||
|
|
7259d3eb48 | ||
|
|
0e44202c20 | ||
|
|
0d90b769f1 | ||
|
|
7ad2791072 | ||
|
|
6de94548ba | ||
|
|
b1b190227e | ||
|
|
4ceddaa8f4 | ||
|
|
9e64ac5315 | ||
|
|
f24ec14956 | ||
|
|
98a92a6443 | ||
|
|
8bb612889c | ||
|
|
e3ec184e92 | ||
|
|
3019230283 | ||
|
|
69adcf9aaf | ||
|
|
8d543d8483 | ||
|
|
94a55210e1 | ||
|
|
441581b745 | ||
|
|
a066ba9628 | ||
|
|
3a0dd72c88 | ||
|
|
d4ed285fd1 | ||
|
|
4cae8cfe9b | ||
|
|
b044a52a84 | ||
|
|
5607478d8e | ||
|
|
d60cf8ebc5 | ||
|
|
ef04983392 | ||
|
|
2153863355 | ||
|
|
4afab168c5 | ||
|
|
2c52e3a851 | ||
|
|
781e396122 | ||
|
|
cebb1b31ab | ||
|
|
9137d2a39a | ||
|
|
95f4ecd261 | ||
|
|
600d4f2c0b | ||
|
|
6c4c5cf9ad | ||
|
|
5f5b23af58 | ||
|
|
ae5a690146 | ||
|
|
625e011e2b | ||
|
|
01ce33b926 | ||
|
|
a323d78bbc | ||
|
|
69dc34500a | ||
|
|
919bdb84c9 | ||
|
|
178f4e21f0 | ||
|
|
d732a6faab | ||
|
|
f053ca6a5f | ||
|
|
dfc5c32af5 | ||
|
|
80b3f4e00a | ||
|
|
4646bca230 | ||
|
|
57ca8fa321 | ||
|
|
de7fa4bf3a | ||
|
|
af1280ea43 | ||
|
|
0dd191c0f6 | ||
|
|
e20e126d65 | ||
|
|
abf862fff1 | ||
|
|
27cf3981ca | ||
|
|
2c39ff0fa0 | ||
|
|
afc14afe45 | ||
|
|
6e91e0667d | ||
|
|
1aca8b8b9e | ||
|
|
448c060084 | ||
|
|
b3951942e3 | ||
|
|
b78464c8b1 | ||
|
|
9bd4f78288 | ||
|
|
85e9fa94b0 | ||
|
|
c754927112 | ||
|
|
8049c57b72 | ||
|
|
695ec44bf7 | ||
|
|
5b394b2079 | ||
|
|
97c2ac77cd | ||
|
|
3183fcc926 | ||
|
|
0af9ca1266 | ||
|
|
a6111b5c3c | ||
|
|
fdbd1bdbbb | ||
|
|
16baf7a955 | ||
|
|
69aea07c4e | ||
|
|
2250ad3e18 | ||
|
|
c107d1ddff | ||
|
|
f17b893dd2 | ||
|
|
09894d3022 | ||
|
|
fd3e84f701 | ||
|
|
22d5d4d2c1 | ||
|
|
145ba0c7ff | ||
|
|
a83433d5cf | ||
|
|
2d496e0efe | ||
|
|
171412cc98 | ||
|
|
68ab3b87d9 | ||
|
|
e9bd11caaa | ||
|
|
a895220743 | ||
|
|
ab2dc7fcb9 | ||
|
|
afde29601a | ||
|
|
be0f1a7fcb | ||
|
|
99d2994b98 | ||
|
|
94101fb7cc | ||
|
|
346071897e | ||
|
|
0772540214 | ||
|
|
6791688f5f | ||
|
|
28307bc435 | ||
|
|
29cadfe8b0 | ||
|
|
68f4f330f5 | ||
|
|
507779c9dc | ||
|
|
062d0f7b75 | ||
|
|
e783af2881 | ||
|
|
f2da1f621f | ||
|
|
294312f2fc | ||
|
|
ff79bd0b31 | ||
|
|
410e300243 | ||
|
|
e994b3b566 | ||
|
|
b39c522cc1 | ||
|
|
dc4bf03da2 | ||
|
|
a158eeaaff | ||
|
|
4cd3944860 | ||
|
|
79a48a8802 | ||
|
|
5a33e90f18 | ||
|
|
e77d1a881f | ||
|
|
343b938c73 | ||
|
|
25186e94af | ||
|
|
e4ba898e20 | ||
|
|
22a6017870 | ||
|
|
e62f1adabf | ||
|
|
7e2d3ff5ab | ||
|
|
fb6830c98a | ||
|
|
52e8a701ac | ||
|
|
160485ef19 | ||
|
|
cea1154cd9 | ||
|
|
4843718a2b | ||
|
|
a0c1979798 | ||
|
|
8576acf1aa | ||
|
|
1e7a764900 | ||
|
|
9b5ce5002a | ||
|
|
0952421800 | ||
|
|
df9af1869f | ||
|
|
dbb16dcb6d | ||
|
|
cc8fc99999 | ||
|
|
0f0efe2a4c | ||
|
|
36165d2843 | ||
|
|
3e9276271a | ||
|
|
af7df1448d | ||
|
|
518147c129 | ||
|
|
a0072a2cf9 | ||
|
|
c4518e964f | ||
|
|
c2eb09cd8f | ||
|
|
89b4e7ae02 | ||
|
|
714ff85806 | ||
|
|
589ddcb4fa | ||
|
|
3d09b0cb83 | ||
|
|
3012dd67ac | ||
|
|
60f826fb2d | ||
|
|
5d24062d42 | ||
|
|
d553919dfb | ||
|
|
661743c7e5 | ||
|
|
1dc22e3f0d | ||
|
|
808843457a | ||
|
|
42497c664f | ||
|
|
88cc78d5b7 | ||
|
|
9ac9a28db7 | ||
|
|
5cf0d887b1 | ||
|
|
58c2df2dec | ||
|
|
1644fdd076 | ||
|
|
cd25740b61 | ||
|
|
28045399f3 | ||
|
|
e630334837 | ||
|
|
b97df057c1 | ||
|
|
546a7386ff | ||
|
|
4b117c4736 | ||
|
|
bc968d17e3 | ||
|
|
51c2fe9742 | ||
|
|
25a38ad2b6 | ||
|
|
8046efd261 | ||
|
|
9a4acba118 | ||
|
|
d9d67e33e7 | ||
|
|
18d6a96f80 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -19,3 +19,5 @@
|
||||
|
||||
# macOS
|
||||
*.DS_store
|
||||
|
||||
.bin
|
||||
|
||||
2
Makefile
2
Makefile
@@ -196,7 +196,7 @@ build-kustomize-api: $(builtinplugins)
|
||||
|
||||
.PHONY: test-unit-kustomize-api
|
||||
test-unit-kustomize-api: build-kustomize-api
|
||||
cd api; go test ./...
|
||||
cd api; go test ./... -ldflags "-X sigs.k8s.io/kustomize/api/provenance.version=v444.333.222"
|
||||
|
||||
.PHONY: test-unit-kustomize-plugins
|
||||
test-unit-kustomize-plugins:
|
||||
|
||||
57
README.md
57
README.md
@@ -16,9 +16,9 @@ inspired by [DAM].
|
||||
[](https://goreportcard.com/report/github.com/kubernetes-sigs/kustomize)
|
||||
|
||||
Download a binary from the [release page], or see
|
||||
these [instructions](docs/INSTALL.md).
|
||||
these [instructions](https://kubernetes-sigs.github.io/kustomize/installation/).
|
||||
|
||||
Browse the [docs](docs) or jump right into the
|
||||
Browse the [docs](https://kubernetes-sigs.github.io/kustomize/) or jump right into the
|
||||
tested [examples](examples).
|
||||
|
||||
## kubectl integration
|
||||
@@ -132,20 +132,8 @@ The YAML can be directly [applied] to a cluster:
|
||||
|
||||
## Community
|
||||
|
||||
To file bugs please read [this](docs/bugs.md).
|
||||
|
||||
Before working on an implementation, please
|
||||
|
||||
* Read the [eschewed feature list].
|
||||
* File an issue describing
|
||||
how the new feature would behave
|
||||
and label it [kind/feature].
|
||||
|
||||
### Other communication channels
|
||||
|
||||
- [Slack]
|
||||
- [Mailing List]
|
||||
- General kubernetes [community page]
|
||||
- [file a bug](https://kubernetes-sigs.github.io/kustomize/contributing/bugs/) instructions
|
||||
- [contribute a feature](https://kubernetes-sigs.github.io/kustomize/contributing/features/) instructions
|
||||
|
||||
### Code of conduct
|
||||
|
||||
@@ -154,32 +142,27 @@ is governed by the [Kubernetes Code of Conduct].
|
||||
|
||||
[`make`]: https://www.gnu.org/software/make
|
||||
[`sed`]: https://www.gnu.org/software/sed
|
||||
[DAM]: docs/glossary.md#declarative-application-management
|
||||
[DAM]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#declarative-application-management
|
||||
[KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cli/0008-kustomize.md
|
||||
[Kubernetes Code of Conduct]: code-of-conduct.md
|
||||
[Mailing List]: https://groups.google.com/forum/#!forum/kubernetes-sig-cli
|
||||
[Slack]: https://kubernetes.slack.com/messages/sig-cli
|
||||
[applied]: docs/glossary.md#apply
|
||||
[base]: docs/glossary.md#base
|
||||
[community page]: http://kubernetes.io/community/
|
||||
[declarative configuration]: docs/glossary.md#declarative-application-management
|
||||
[eschewed feature list]: docs/eschewedFeatures.md
|
||||
[applied]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#apply
|
||||
[base]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#base
|
||||
[declarative configuration]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#declarative-application-management
|
||||
[imageBase]: docs/images/base.jpg
|
||||
[imageOverlay]: docs/images/overlay.jpg
|
||||
[kind/feature]: /../../labels/kind%2Ffeature
|
||||
[kubectl announcement]: https://kubernetes.io/blog/2019/03/25/kubernetes-1-14-release-announcement
|
||||
[kubectl book]: https://kubectl.docs.kubernetes.io/pages/app_customization/introduction.html
|
||||
[kubernetes documentation]: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/
|
||||
[kubernetes style]: docs/glossary.md#kubernetes-style-object
|
||||
[kustomization]: docs/glossary.md#kustomization
|
||||
[overlay]: docs/glossary.md#overlay
|
||||
[overlays]: docs/glossary.md#overlay
|
||||
[release page]: /../../releases
|
||||
[resource]: docs/glossary.md#resource
|
||||
[resources]: docs/glossary.md#resource
|
||||
[kubernetes style]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#kubernetes-style-object
|
||||
[kustomization]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#kustomization
|
||||
[overlay]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#overlay
|
||||
[overlays]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#overlay
|
||||
[release page]: https://github.com/kubernetes-sigs/kustomize/releases
|
||||
[resource]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#resource
|
||||
[resources]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#resource
|
||||
[sig-cli]: https://github.com/kubernetes/community/blob/master/sig-cli/README.md
|
||||
[variant]: docs/glossary.md#variant
|
||||
[variants]: docs/glossary.md#variant
|
||||
[v2.0.3]: /../../releases/tag/v2.0.3
|
||||
[v2.1.0]: /../../releases/tag/v2.1.0
|
||||
[workflows]: docs/workflows.md
|
||||
[variant]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#variant
|
||||
[variants]: https://kubernetes-sigs.github.io/kustomize/api-reference/glossary#variant
|
||||
[v2.0.3]: https://github.com/kubernetes-sigs/kustomize/releases/tag/v2.0.3
|
||||
[v2.1.0]: https://github.com/kubernetes-sigs/kustomize/releases/tag/v2.1.0
|
||||
[workflows]: https://kubernetes-sigs.github.io/kustomize/guides
|
||||
|
||||
@@ -29,7 +29,7 @@ func (p *AnnotationsTransformerPlugin) Transform(m resmap.ResMap) error {
|
||||
err := filtersutil.ApplyToJSON(annotations.Filter{
|
||||
Annotations: p.Annotations,
|
||||
FsSlice: p.FieldSpecs,
|
||||
}, r.Kunstructured)
|
||||
}, r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func (p *LabelTransformerPlugin) Transform(m resmap.ResMap) error {
|
||||
err := filtersutil.ApplyToJSON(labels.Filter{
|
||||
Labels: p.Labels,
|
||||
FsSlice: p.FieldSpecs,
|
||||
}, r.Kunstructured)
|
||||
}, r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (p *NamespaceTransformerPlugin) Transform(m resmap.ResMap) error {
|
||||
err := filtersutil.ApplyToJSON(namespace.Filter{
|
||||
Namespace: p.Namespace,
|
||||
FsSlice: p.FieldSpecs,
|
||||
}, r.Kunstructured)
|
||||
}, r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ func (p *PatchJson6902TransformerPlugin) Transform(m resmap.ResMap) error {
|
||||
} else {
|
||||
return filtersutil.ApplyToJSON(patchjson6902.Filter{
|
||||
Patch: p.JsonOp,
|
||||
}, obj.Kunstructured)
|
||||
}, obj)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
package builtins
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
kyaml "sigs.k8s.io/kustomize/kyaml/yaml"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/filters/patchstrategicmerge"
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/resource"
|
||||
@@ -77,7 +74,7 @@ func (p *PatchStrategicMergeTransformerPlugin) Transform(m resmap.ResMap) error
|
||||
return err
|
||||
}
|
||||
if !p.YAMLSupport {
|
||||
err = target.Patch(patch.Kunstructured)
|
||||
err = target.Patch(patch.Copy())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -90,28 +87,22 @@ func (p *PatchStrategicMergeTransformerPlugin) Transform(m resmap.ResMap) error
|
||||
}
|
||||
}
|
||||
} else {
|
||||
node, err := getRNode(patch)
|
||||
patchCopy := patch.DeepCopy()
|
||||
patchCopy.SetName(target.GetName())
|
||||
patchCopy.SetNamespace(target.GetNamespace())
|
||||
patchCopy.SetGvk(target.GetGvk())
|
||||
node, err := filtersutil.GetRNode(patchCopy)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = filtersutil.ApplyToJSON(patchstrategicmerge.Filter{
|
||||
Patch: node,
|
||||
}, target.Kunstructured)
|
||||
}, target)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//TODO: Remove this once the next version of kyaml is released which
|
||||
// exposes GetRNode from the filutersutil package.
|
||||
func getRNode(k json.Marshaler) (*kyaml.RNode, error) {
|
||||
j, err := k.MarshalJSON()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return kyaml.Parse(string(j))
|
||||
}
|
||||
|
||||
func NewPatchStrategicMergeTransformerPlugin() resmap.TransformerPlugin {
|
||||
return &PatchStrategicMergeTransformerPlugin{}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ func (p *PatchTransformerPlugin) transformStrategicMerge(m resmap.ResMap, patch
|
||||
// use the legacy implementation or the kyaml-based solution.
|
||||
func (p *PatchTransformerPlugin) applySMPatch(resource, patch *resource.Resource) error {
|
||||
if !p.YAMLSupport {
|
||||
return resource.Patch(patch.Kunstructured)
|
||||
return resource.Patch(patch.Copy())
|
||||
} else {
|
||||
node, err := filtersutil.GetRNode(patch)
|
||||
if err != nil {
|
||||
@@ -123,7 +123,7 @@ func (p *PatchTransformerPlugin) applySMPatch(resource, patch *resource.Resource
|
||||
}
|
||||
return filtersutil.ApplyToJSON(patchstrategicmerge.Filter{
|
||||
Patch: node,
|
||||
}, resource.Kunstructured)
|
||||
}, resource)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ func (p *PatchTransformerPlugin) applyJson6902Patch(resource *resource.Resource,
|
||||
} else {
|
||||
return filtersutil.ApplyToJSON(patchjson6902.Filter{
|
||||
Patch: p.Patch,
|
||||
}, resource.Kunstructured)
|
||||
}, resource)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -121,13 +121,13 @@ func (p *ValueAddTransformerPlugin) Transform(m resmap.ResMap) (err error) {
|
||||
if t.FieldPath == types.MetadataNamespacePath {
|
||||
err = filtersutil.ApplyToJSON(namespace.Filter{
|
||||
Namespace: p.Value,
|
||||
}, res.Kunstructured)
|
||||
}, res)
|
||||
} else {
|
||||
err = filtersutil.ApplyToJSON(valueadd.Filter{
|
||||
Value: p.Value,
|
||||
FieldPath: t.FieldPath,
|
||||
FilePathPosition: t.FilePathPosition,
|
||||
}, res.Kunstructured)
|
||||
}, res)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -31,6 +31,86 @@ apiVersion: apps/v1
|
||||
metadata:
|
||||
name: yourDeploy
|
||||
kind: Deployment
|
||||
`,
|
||||
},
|
||||
"container patch": {
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: myDeploy
|
||||
kind: Deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: foo1
|
||||
- name: foo2
|
||||
- name: foo3
|
||||
`,
|
||||
patch: yaml.MustParse(`
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: myDeploy
|
||||
kind: Deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: foo0
|
||||
`),
|
||||
expected: `
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: myDeploy
|
||||
kind: Deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: foo1
|
||||
- name: foo2
|
||||
- name: foo3
|
||||
- name: foo0
|
||||
`,
|
||||
},
|
||||
"volumes patch": {
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: myDeploy
|
||||
kind: Deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
volumes:
|
||||
- name: foo1
|
||||
- name: foo2
|
||||
- name: foo3
|
||||
`,
|
||||
patch: yaml.MustParse(`
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: myDeploy
|
||||
kind: Deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
volumes:
|
||||
- name: foo0
|
||||
`),
|
||||
expected: `
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: myDeploy
|
||||
kind: Deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
volumes:
|
||||
- name: foo1
|
||||
- name: foo2
|
||||
- name: foo3
|
||||
- name: foo0
|
||||
`,
|
||||
},
|
||||
"nested patch": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/api
|
||||
|
||||
go 1.13
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/evanphx/json-patch v4.5.0+incompatible
|
||||
@@ -11,11 +11,11 @@ require (
|
||||
github.com/stretchr/testify v1.4.0
|
||||
github.com/yujunz/go-getter v1.4.1-lite
|
||||
golang.org/x/tools v0.0.0-20191010075000-0337d82405ff
|
||||
gopkg.in/yaml.v2 v2.2.8
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
k8s.io/api v0.17.0
|
||||
k8s.io/apimachinery v0.17.0
|
||||
k8s.io/client-go v0.17.0
|
||||
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a
|
||||
sigs.k8s.io/kustomize/kyaml v0.1.11
|
||||
sigs.k8s.io/kustomize/kyaml v0.3.4
|
||||
sigs.k8s.io/yaml v1.2.0
|
||||
)
|
||||
|
||||
18
api/go.sum
18
api/go.sum
@@ -104,7 +104,6 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34
|
||||
github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg=
|
||||
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I=
|
||||
github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w=
|
||||
github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=
|
||||
github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=
|
||||
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||
@@ -167,7 +166,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
@@ -281,7 +279,6 @@ github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN
|
||||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=
|
||||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM=
|
||||
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
|
||||
@@ -343,6 +340,7 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d h1:K6eOUihrFLdZjZnA4XlRp864fmWXv9YTIk7VPLhRacA=
|
||||
github.com/qri-io/starlib v0.4.2-0.20200213133954-ff2e8cd5ef8d/go.mod h1:7DPO4domFU579Ga6E61sB9VFNaniPVwJP5C4bBCu3wA=
|
||||
github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
@@ -373,7 +371,6 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s=
|
||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
|
||||
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||
@@ -427,6 +424,7 @@ go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL
|
||||
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.starlark.net v0.0.0-20190528202925-30ae18b8564f/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg=
|
||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc=
|
||||
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
@@ -466,7 +464,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI=
|
||||
golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@@ -493,7 +490,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM=
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c h1:Vco5b+cuG5NNfORVxZy6bYZQ7rsigisU1WQFkvQ0L5E=
|
||||
golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -553,12 +549,11 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2 h1:XZx7nhd5GMaZpmDaEHFVafUZC7ya0fuo7cSJ3UCKYmM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -585,10 +580,9 @@ mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphD
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
|
||||
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f h1:Cq7MalBHYACRd6EesksG1Q8EoIAKOsiZviGKbOLIej4=
|
||||
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
|
||||
sigs.k8s.io/kustomize/kyaml v0.1.11 h1:/VvWxVIgH5gG1K4A7trgbyLgO3tRBiAWNhLFVU1HEmo=
|
||||
sigs.k8s.io/kustomize/kyaml v0.1.11/go.mod h1:72/rLkSi+L/pHM1oCjwrf3ClU+tH5kZQvvdLSqIHwWU=
|
||||
sigs.k8s.io/kustomize/kyaml v0.3.4 h1:RhxnabYltv4mdD5+I7pIaJtae+eaTn4TiZqPT7K+C7A=
|
||||
sigs.k8s.io/kustomize/kyaml v0.3.4/go.mod h1:XJL84E6sOFeNrQ7CADiemc1B0EjIxHo3OhW4o1aJYNw=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
|
||||
@@ -41,33 +41,33 @@ type Loader interface {
|
||||
// Kunstructured allows manipulation of k8s objects
|
||||
// that do not have Golang structs.
|
||||
type Kunstructured interface {
|
||||
Map() map[string]interface{}
|
||||
SetMap(map[string]interface{})
|
||||
Copy() Kunstructured
|
||||
GetFieldValue(string) (interface{}, error)
|
||||
GetString(string) (string, error)
|
||||
GetStringSlice(string) ([]string, error)
|
||||
GetAnnotations() map[string]string
|
||||
GetBool(path string) (bool, error)
|
||||
GetFieldValue(string) (interface{}, error)
|
||||
GetFloat64(path string) (float64, error)
|
||||
GetInt64(path string) (int64, error)
|
||||
GetSlice(path string) ([]interface{}, error)
|
||||
GetStringMap(path string) (map[string]string, error)
|
||||
GetMap(path string) (map[string]interface{}, error)
|
||||
MarshalJSON() ([]byte, error)
|
||||
UnmarshalJSON([]byte) error
|
||||
GetGvk() resid.Gvk
|
||||
SetGvk(resid.Gvk)
|
||||
GetInt64(path string) (int64, error)
|
||||
GetKind() string
|
||||
GetLabels() map[string]string
|
||||
GetMap(path string) (map[string]interface{}, error)
|
||||
GetName() string
|
||||
GetSlice(path string) ([]interface{}, error)
|
||||
GetString(string) (string, error)
|
||||
GetStringMap(path string) (map[string]string, error)
|
||||
GetStringSlice(string) ([]string, error)
|
||||
Map() map[string]interface{}
|
||||
MarshalJSON() ([]byte, error)
|
||||
MatchesAnnotationSelector(selector string) (bool, error)
|
||||
MatchesLabelSelector(selector string) (bool, error)
|
||||
Patch(Kunstructured) error
|
||||
SetAnnotations(map[string]string)
|
||||
SetGvk(resid.Gvk)
|
||||
SetLabels(map[string]string)
|
||||
SetMap(map[string]interface{})
|
||||
SetName(string)
|
||||
SetNamespace(string)
|
||||
GetLabels() map[string]string
|
||||
SetLabels(map[string]string)
|
||||
GetAnnotations() map[string]string
|
||||
SetAnnotations(map[string]string)
|
||||
MatchesLabelSelector(selector string) (bool, error)
|
||||
MatchesAnnotationSelector(selector string) (bool, error)
|
||||
Patch(Kunstructured) error
|
||||
UnmarshalJSON([]byte) error
|
||||
}
|
||||
|
||||
// KunstructuredFactory makes instances of Kunstructured.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.11 AS build
|
||||
FROM golang:1.14 AS build
|
||||
|
||||
ARG GO111MODULE=on
|
||||
|
||||
|
||||
@@ -159,40 +159,31 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
seedDocs := make(crawler.CrawlSeed, 0)
|
||||
|
||||
// get all the documents in the index
|
||||
getSeedDocsFunc := func() {
|
||||
query := []byte(`{ "query":{ "match_all":{} } }`)
|
||||
it := idx.IterateQuery(query, 10000, 60*time.Second)
|
||||
for it.Next() {
|
||||
for _, hit := range it.Value().Hits.Hits {
|
||||
seedDocs = append(seedDocs, hit.Document.Document.Copy())
|
||||
}
|
||||
}
|
||||
if err := it.Err(); err != nil {
|
||||
log.Fatalf("getSeedDocsFunc Error iterating: %v\n", err)
|
||||
}
|
||||
}
|
||||
query := []byte(`{ "query":{ "match_all":{} } }`)
|
||||
it := idx.IterateQuery(query, 10000, 60*time.Second)
|
||||
|
||||
switch mode {
|
||||
case CrawlIndexAndGithub:
|
||||
getSeedDocsFunc()
|
||||
crawlers := []crawler.Crawler{ghCrawlerConstructor("", "")}
|
||||
crawler.CrawlFromSeed(ctx, seedDocs, crawlers, docConverter, indexFunc, seen)
|
||||
crawler.CrawlFromSeedIterator(ctx, it, crawlers, docConverter, indexFunc, seen)
|
||||
crawler.CrawlGithub(ctx, crawlers, docConverter, indexFunc, seen)
|
||||
case CrawlIndex:
|
||||
getSeedDocsFunc()
|
||||
crawlers := []crawler.Crawler{ghCrawlerConstructor("", "")}
|
||||
crawler.CrawlFromSeed(ctx, seedDocs, crawlers, docConverter, indexFunc, seen)
|
||||
crawler.CrawlFromSeedIterator(ctx, it, crawlers, docConverter, indexFunc, seen)
|
||||
case CrawlGithub:
|
||||
crawlers := []crawler.Crawler{ghCrawlerConstructor("", "")}
|
||||
// add all the documents in the index into seen.
|
||||
// this greatly reduces the time overhead of CrawlGithub.
|
||||
getSeedDocsFunc()
|
||||
for _, d := range seedDocs {
|
||||
seen[d.ID()] = d.FileType
|
||||
for it.Next() {
|
||||
for _, hit := range it.Value().Hits.Hits {
|
||||
d := hit.Document.Document
|
||||
seen.Set(d.ID(), d.FileType)
|
||||
}
|
||||
}
|
||||
if err := it.Err(); err != nil {
|
||||
log.Fatalf("Error iterating the index: %v\n", err)
|
||||
}
|
||||
|
||||
crawler.CrawlGithub(ctx, crawlers, docConverter, indexFunc, seen)
|
||||
case CrawlUser:
|
||||
if *githubUserPtr == "" {
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elasticsearch
|
||||
spec:
|
||||
selector:
|
||||
custom-resource: v1alpha1.ESCluster
|
||||
custom-resource-name: esbasic
|
||||
custom-resource-namespace: default
|
||||
es/data: "true"
|
||||
using: escluster.Cluster
|
||||
ports:
|
||||
- protocol: "TCP"
|
||||
port: 9200
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: ""
|
||||
@@ -213,21 +213,36 @@ func doCrawl(ctx context.Context, docsPtr *CrawlSeed, crawlers []Crawler, conv C
|
||||
logger.Printf("\t%d documents cannot be converted but still were inserted or updated in the index\n", convErrCount)
|
||||
}
|
||||
|
||||
// CrawlFromSeedIterator iterates all the documents in the index and call CrawlFromSeed for each document.
|
||||
func CrawlFromSeedIterator(ctx context.Context, it *index.KustomizeIterator, crawlers []Crawler,
|
||||
conv Converter, indx IndexFunc, seen utils.SeenMap) {
|
||||
docCount := 0
|
||||
for it.Next() {
|
||||
for _, hit := range it.Value().Hits.Hits {
|
||||
docCount++
|
||||
logger.Printf("updating document %d from seed\n", docCount)
|
||||
|
||||
singleSeed := CrawlSeed{&(hit.Document.Document)}
|
||||
CrawlFromSeed(ctx, singleSeed, crawlers, conv, indx, seen)
|
||||
}
|
||||
}
|
||||
if err := it.Err(); err != nil {
|
||||
log.Fatalf("Error iterating the index: %v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
// CrawlFromSeed updates all the documents in seed, and crawls all the new
|
||||
// documents referred in the seed.
|
||||
func CrawlFromSeed(ctx context.Context, seed CrawlSeed, crawlers []Crawler,
|
||||
conv Converter, indx IndexFunc, seen utils.SeenMap) {
|
||||
|
||||
// stack tracks the documents directly referred in other documents.
|
||||
// stack tracks the documents directly referred in the seed.
|
||||
stack := make(CrawlSeed, 0)
|
||||
|
||||
// Exploit seed to update bulk of corpus.
|
||||
logger.Printf("updating %d documents from seed\n", len(seed))
|
||||
// each unique document in seed will be crawled once.
|
||||
doCrawl(ctx, &seed, crawlers, conv, indx, seen, &stack, true, false)
|
||||
|
||||
// Traverse any new documents added while updating corpus.
|
||||
logger.Printf("crawling %d new documents found in the seed\n", len(stack))
|
||||
logger.Printf("crawling %d new documents referred by doc\n", len(stack))
|
||||
// While crawling each document in stack, the documents directly referred in the document
|
||||
// will be added into stack.
|
||||
// After this statement is done, stack will become empty.
|
||||
@@ -297,8 +312,6 @@ func CrawlGithubRunner(ctx context.Context, output chan<- CrawledDocument,
|
||||
// CrawlGithub crawls all the kustomization files on Github.
|
||||
func CrawlGithub(ctx context.Context, crawlers []Crawler, conv Converter,
|
||||
indx IndexFunc, seen utils.SeenMap) {
|
||||
// stack tracks the documents directly referred in other documents.
|
||||
stack := make(CrawlSeed, 0)
|
||||
|
||||
// ch is channel where all the crawlers sends the crawled documents to.
|
||||
ch := make(chan CrawledDocument, 1<<10)
|
||||
@@ -324,7 +337,20 @@ func CrawlGithub(ctx context.Context, crawlers []Crawler, conv Converter,
|
||||
"%v could not match any crawler", cdoc))
|
||||
continue
|
||||
}
|
||||
|
||||
// stack tracks the documents directly referred in the document.
|
||||
stack := make(CrawlSeed, 0)
|
||||
|
||||
addBranches(cdoc, match, indx, seen, &stack)
|
||||
|
||||
if len(stack) > 0 {
|
||||
// here the documents referred in a kustomization file are crawled separately,
|
||||
// to avoid accumulating all the referred documents into a single gigantic
|
||||
// mem-inentive stack.
|
||||
logger.Printf("crawling the %d new documents referred in doc %d",
|
||||
len(stack), docCount)
|
||||
doCrawl(ctx, &stack, crawlers, conv, indx, seen, &stack, false, true)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -336,9 +362,4 @@ func CrawlGithub(ctx context.Context, crawlers []Crawler, conv Converter,
|
||||
}
|
||||
close(ch)
|
||||
wg.Wait()
|
||||
|
||||
// Handle deps of newly discovered documents.
|
||||
logger.Printf("crawling the %d new documents referred by other documents",
|
||||
len(stack))
|
||||
doCrawl(ctx, &stack, crawlers, conv, indx, seen, &stack, false, true)
|
||||
}
|
||||
|
||||
@@ -82,14 +82,15 @@ func (gc githubCrawler) Crawl(ctx context.Context,
|
||||
|
||||
ranges := []RangeWithin{
|
||||
RangeWithin{
|
||||
start: uint64(0),
|
||||
end: githubMaxFileSize,
|
||||
},
|
||||
start: uint64(0),
|
||||
end: githubMaxFileSize,
|
||||
},
|
||||
}
|
||||
|
||||
errs := make(multiError, 0)
|
||||
for len(ranges) > 0 {
|
||||
tailRange := ranges[len(ranges) - 1]
|
||||
logger.Printf("Current ranges: %v (len: %d)\n", ranges, len(ranges))
|
||||
tailRange := ranges[len(ranges)-1]
|
||||
ranges = ranges[:(len(ranges) - 1)]
|
||||
reProcessQueryRanges, err := gc.CrawlSingleRange(ctx, output, seen, tailRange.start, tailRange.end)
|
||||
if err != nil {
|
||||
@@ -151,7 +152,15 @@ func (gc githubCrawler) CrawlSingleRange(ctx context.Context,
|
||||
}
|
||||
queryResult.Add(rangeResult)
|
||||
if reProcessQuery {
|
||||
reProcessQueryRanges = append(reProcessQueryRanges, RangeSizes(query))
|
||||
// if the size of a range is 0, such as [245, 245], and reProcessQuery is true,
|
||||
// it means that there are more than 1000 results for the query range.
|
||||
// Reprocessing the query range will not help because the GitHub Search API
|
||||
// only provides up to 1,000 results for each search.
|
||||
if RangeSizes(query).Size() == 0 {
|
||||
logger.Printf("range size is 0 includes more than 1000 results: %s", query)
|
||||
} else {
|
||||
reProcessQueryRanges = append(reProcessQueryRanges, RangeSizes(query))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,3 +225,7 @@ type RangeWithin struct {
|
||||
func (r RangeWithin) RangeString() string {
|
||||
return fmt.Sprintf("%d..%d", r.start, r.end)
|
||||
}
|
||||
|
||||
func (r RangeWithin) Size() uint64 {
|
||||
return r.end - r.start
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/api/internal/crawl
|
||||
|
||||
go 1.13
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/elastic/go-elasticsearch/v6 v6.8.5
|
||||
|
||||
@@ -490,9 +490,10 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -514,7 +515,7 @@ k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl
|
||||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
|
||||
mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw=
|
||||
sigs.k8s.io/kustomize/kyaml v0.1.11/go.mod h1:72/rLkSi+L/pHM1oCjwrf3ClU+tH5kZQvvdLSqIHwWU=
|
||||
sigs.k8s.io/kustomize/kyaml v0.3.4/go.mod h1:XJL84E6sOFeNrQ7CADiemc1B0EjIxHo3OhW4o1aJYNw=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
||||
@@ -1,21 +1,37 @@
|
||||
package utils
|
||||
|
||||
type SeenMap map[string]string
|
||||
import "sync"
|
||||
|
||||
type SeenMap struct {
|
||||
data map[string]string
|
||||
lock sync.RWMutex
|
||||
}
|
||||
|
||||
// TODO: add lock to avoid race condition
|
||||
func (seen SeenMap) Seen(item string) bool {
|
||||
_, ok := seen[item]
|
||||
seen.lock.RLock()
|
||||
_, ok := seen.data[item]
|
||||
seen.lock.RUnlock()
|
||||
return ok
|
||||
}
|
||||
|
||||
func (seen SeenMap) Set(k, v string) {
|
||||
seen[k] = v
|
||||
seen.lock.Lock()
|
||||
seen.data[k] = v
|
||||
seen.lock.Unlock()
|
||||
}
|
||||
|
||||
// The caller should make sure that key is in the map.
|
||||
func (seen SeenMap) Value(k string) string {
|
||||
return seen[k]
|
||||
seen.lock.RLock()
|
||||
v := seen.data[k]
|
||||
seen.lock.RUnlock()
|
||||
return v
|
||||
}
|
||||
|
||||
func NewSeenMap() SeenMap {
|
||||
return make(map[string]string)
|
||||
return SeenMap{
|
||||
data: make(map[string]string),
|
||||
lock: sync.RWMutex{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
||||
cmd := exec.Command(
|
||||
gitProgram,
|
||||
"clone",
|
||||
"--depth=1",
|
||||
repoSpec.CloneSpec(),
|
||||
repoSpec.Dir.String())
|
||||
out, err := cmd.CombinedOutput()
|
||||
@@ -46,10 +47,23 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
||||
|
||||
cmd = exec.Command(
|
||||
gitProgram,
|
||||
"checkout",
|
||||
"fetch",
|
||||
"--depth=1",
|
||||
"origin",
|
||||
repoSpec.Ref)
|
||||
cmd.Dir = repoSpec.Dir.String()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Error fetching ref: %s", out)
|
||||
return errors.Wrapf(err, "trouble fetching %s", repoSpec.Ref)
|
||||
}
|
||||
|
||||
cmd = exec.Command(
|
||||
gitProgram,
|
||||
"checkout",
|
||||
"FETCH_HEAD")
|
||||
cmd.Dir = repoSpec.Dir.String()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Error checking out ref: %s", out)
|
||||
return errors.Wrapf(err, "trouble checking out %s", repoSpec.Ref)
|
||||
|
||||
@@ -9,22 +9,17 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/shlex"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"sigs.k8s.io/kustomize/api/resid"
|
||||
"sigs.k8s.io/kustomize/api/internal/plugins/utils"
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
const (
|
||||
idAnnotation = "kustomize.config.k8s.io/id"
|
||||
HashAnnotation = "kustomize.config.k8s.io/needs-hash"
|
||||
BehaviorAnnotation = "kustomize.config.k8s.io/behavior"
|
||||
tmpConfigFilePrefix = "kust-plugin-config-"
|
||||
)
|
||||
|
||||
@@ -114,12 +109,12 @@ func (p *ExecPlugin) Generate() (resmap.ResMap, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return p.UpdateResourceOptions(rm)
|
||||
return utils.UpdateResourceOptions(rm)
|
||||
}
|
||||
|
||||
func (p *ExecPlugin) Transform(rm resmap.ResMap) error {
|
||||
// add ResIds as annotations to all objects so that we can add them back
|
||||
inputRM, err := p.getResMapWithIdAnnotation(rm)
|
||||
inputRM, err := utils.GetResMapWithIDAnnotation(rm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -137,7 +132,7 @@ func (p *ExecPlugin) Transform(rm resmap.ResMap) error {
|
||||
}
|
||||
|
||||
// update the original ResMap based on the output
|
||||
return p.updateResMapValues(output, rm)
|
||||
return utils.UpdateResMapValues(p.path, p.h, output, rm)
|
||||
}
|
||||
|
||||
// invokePlugin writes plugin config to a temp file, then
|
||||
@@ -184,91 +179,3 @@ func (p *ExecPlugin) getEnv() []string {
|
||||
"KUSTOMIZE_PLUGIN_CONFIG_ROOT="+p.h.Loader().Root())
|
||||
return env
|
||||
}
|
||||
|
||||
// Returns a new copy of the given ResMap with the ResIds annotated in each Resource
|
||||
func (p *ExecPlugin) getResMapWithIdAnnotation(rm resmap.ResMap) (resmap.ResMap, error) {
|
||||
inputRM := rm.DeepCopy()
|
||||
for _, r := range inputRM.Resources() {
|
||||
idString, err := yaml.Marshal(r.CurId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
annotations := r.GetAnnotations()
|
||||
if annotations == nil {
|
||||
annotations = make(map[string]string)
|
||||
}
|
||||
annotations[idAnnotation] = string(idString)
|
||||
r.SetAnnotations(annotations)
|
||||
}
|
||||
return inputRM, nil
|
||||
}
|
||||
|
||||
// updateResMapValues updates the Resource value in the given ResMap
|
||||
// with the emitted Resource values in output.
|
||||
func (p *ExecPlugin) updateResMapValues(output []byte, rm resmap.ResMap) error {
|
||||
outputRM, err := p.h.ResmapFactory().NewResMapFromBytes(output)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, r := range outputRM.Resources() {
|
||||
// for each emitted Resource, find the matching Resource in the original ResMap
|
||||
// using its id
|
||||
annotations := r.GetAnnotations()
|
||||
idString, ok := annotations[idAnnotation]
|
||||
if !ok {
|
||||
return fmt.Errorf("the transformer %s should not remove annotation %s",
|
||||
p.path, idAnnotation)
|
||||
}
|
||||
id := resid.ResId{}
|
||||
err := yaml.Unmarshal([]byte(idString), &id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
res, err := rm.GetByCurrentId(id)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to find unique match to %s", id.String())
|
||||
}
|
||||
// remove the annotation set by Kustomize to track the resource
|
||||
delete(annotations, idAnnotation)
|
||||
if len(annotations) == 0 {
|
||||
annotations = nil
|
||||
}
|
||||
r.SetAnnotations(annotations)
|
||||
|
||||
// update the ResMap resource value with the transformed object
|
||||
res.Kunstructured = r.Kunstructured
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// updateResourceOptions updates the generator options for each resource in the
|
||||
// given ResMap based on plugin provided annotations.
|
||||
func (p *ExecPlugin) UpdateResourceOptions(rm resmap.ResMap) (resmap.ResMap, error) {
|
||||
for _, r := range rm.Resources() {
|
||||
// Disable name hashing by default and require plugin to explicitly
|
||||
// request it for each resource.
|
||||
annotations := r.GetAnnotations()
|
||||
behavior := annotations[BehaviorAnnotation]
|
||||
var needsHash bool
|
||||
if val, ok := annotations[HashAnnotation]; ok {
|
||||
b, err := strconv.ParseBool(val)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(
|
||||
"the annotation %q contains an invalid value (%q)",
|
||||
HashAnnotation, val)
|
||||
}
|
||||
needsHash = b
|
||||
}
|
||||
delete(annotations, HashAnnotation)
|
||||
delete(annotations, BehaviorAnnotation)
|
||||
if len(annotations) == 0 {
|
||||
annotations = nil
|
||||
}
|
||||
r.SetAnnotations(annotations)
|
||||
r.SetOptions(types.NewGenArgs(
|
||||
&types.GeneratorArgs{
|
||||
Behavior: behavior,
|
||||
Options: &types.GeneratorOptions{DisableNameSuffixHash: !needsHash}}))
|
||||
}
|
||||
return rm, nil
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package execplugin_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -17,7 +16,6 @@ import (
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/resource"
|
||||
valtest_test "sigs.k8s.io/kustomize/api/testutils/valtest"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
)
|
||||
|
||||
func TestExecPluginConfig(t *testing.T) {
|
||||
@@ -91,107 +89,3 @@ metadata:
|
||||
t.Fatalf("unexpected arg array: %#v", p.Args())
|
||||
}
|
||||
}
|
||||
|
||||
func makeConfigMap(rf *resource.Factory, name, behavior string, hashValue *string) *resource.Resource {
|
||||
r := rf.FromMap(map[string]interface{}{
|
||||
"apiVersion": "v1",
|
||||
"kind": "ConfigMap",
|
||||
"metadata": map[string]interface{}{"name": name},
|
||||
})
|
||||
annotations := map[string]string{}
|
||||
if behavior != "" {
|
||||
annotations[BehaviorAnnotation] = behavior
|
||||
}
|
||||
if hashValue != nil {
|
||||
annotations[HashAnnotation] = *hashValue
|
||||
}
|
||||
if len(annotations) > 0 {
|
||||
r.SetAnnotations(annotations)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func makeConfigMapOptions(rf *resource.Factory, name, behavior string, disableHash bool) *resource.Resource {
|
||||
return rf.FromMapAndOption(map[string]interface{}{
|
||||
"apiVersion": "v1",
|
||||
"kind": "ConfigMap",
|
||||
"metadata": map[string]interface{}{"name": name},
|
||||
}, &types.GeneratorArgs{
|
||||
Behavior: behavior,
|
||||
Options: &types.GeneratorOptions{DisableNameSuffixHash: disableHash}})
|
||||
}
|
||||
|
||||
func strptr(s string) *string {
|
||||
return &s
|
||||
}
|
||||
|
||||
func TestUpdateResourceOptions(t *testing.T) {
|
||||
p := NewExecPlugin("")
|
||||
if err := p.ErrIfNotExecutable(); err == nil {
|
||||
t.Fatalf("expected unexecutable error")
|
||||
}
|
||||
rf := resource.NewFactory(kunstruct.NewKunstructuredFactoryImpl())
|
||||
in := resmap.New()
|
||||
expected := resmap.New()
|
||||
cases := []struct {
|
||||
behavior string
|
||||
needsHash bool
|
||||
hashValue *string
|
||||
}{
|
||||
{hashValue: strptr("false")},
|
||||
{hashValue: strptr("true"), needsHash: true},
|
||||
{behavior: "replace"},
|
||||
{behavior: "merge"},
|
||||
{behavior: "create"},
|
||||
{behavior: "nonsense"},
|
||||
{behavior: "merge", hashValue: strptr("false")},
|
||||
{behavior: "merge", hashValue: strptr("true"), needsHash: true},
|
||||
}
|
||||
for i, c := range cases {
|
||||
name := fmt.Sprintf("test%d", i)
|
||||
in.Append(makeConfigMap(rf, name, c.behavior, c.hashValue))
|
||||
expected.Append(makeConfigMapOptions(rf, name, c.behavior, !c.needsHash))
|
||||
}
|
||||
actual, err := p.UpdateResourceOptions(in)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err.Error())
|
||||
}
|
||||
for i, a := range expected.Resources() {
|
||||
b := actual.GetByIndex(i)
|
||||
if b == nil {
|
||||
t.Fatalf("resource %d missing from processed map", i)
|
||||
}
|
||||
if !a.Equals(b) {
|
||||
t.Errorf("expected %v got %v", a, b)
|
||||
}
|
||||
if a.NeedHashSuffix() != b.NeedHashSuffix() {
|
||||
t.Errorf("")
|
||||
}
|
||||
if a.Behavior() != b.Behavior() {
|
||||
t.Errorf("expected %v got %v", a.Behavior(), b.Behavior())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateResourceOptionsWithInvalidHashAnnotationValues(t *testing.T) {
|
||||
p := NewExecPlugin("")
|
||||
if err := p.ErrIfNotExecutable(); err == nil {
|
||||
t.Fatalf("expected unexecutable error")
|
||||
}
|
||||
rf := resource.NewFactory(kunstruct.NewKunstructuredFactoryImpl())
|
||||
cases := []string{
|
||||
"",
|
||||
"FaLsE",
|
||||
"TrUe",
|
||||
"potato",
|
||||
}
|
||||
for i, c := range cases {
|
||||
name := fmt.Sprintf("test%d", i)
|
||||
in := resmap.New()
|
||||
in.Append(makeConfigMap(rf, name, "", &c))
|
||||
_, err := p.UpdateResourceOptions(in)
|
||||
if err == nil {
|
||||
t.Errorf("expected error from value %q", c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
197
api/internal/plugins/fnplugin/fnplugin.go
Normal file
197
api/internal/plugins/fnplugin/fnplugin.go
Normal file
@@ -0,0 +1,197 @@
|
||||
// Copyright 2019 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package fnplugin
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/internal/plugins/utils"
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/resource"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
"sigs.k8s.io/kustomize/kyaml/fn/runtime/runtimeutil"
|
||||
"sigs.k8s.io/kustomize/kyaml/runfn"
|
||||
"sigs.k8s.io/kustomize/kyaml/yaml"
|
||||
)
|
||||
|
||||
// FnPlugin is the struct to hold function information
|
||||
type FnPlugin struct {
|
||||
// Function runner
|
||||
runFns runfn.RunFns
|
||||
|
||||
// Plugin configuration data.
|
||||
cfg []byte
|
||||
|
||||
// Plugin name cache for error output
|
||||
pluginName string
|
||||
|
||||
// PluginHelpers
|
||||
h *resmap.PluginHelpers
|
||||
}
|
||||
|
||||
func bytesToRNode(yml []byte) (*yaml.RNode, error) {
|
||||
rnode, err := yaml.Parse(string(yml))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rnode, nil
|
||||
}
|
||||
|
||||
func resourceToRNode(res *resource.Resource) (*yaml.RNode, error) {
|
||||
yml, err := res.AsYAML()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return bytesToRNode(yml)
|
||||
}
|
||||
|
||||
// GetFunctionSpec return function spec is there is. Otherwise return nil
|
||||
func GetFunctionSpec(res *resource.Resource) *runtimeutil.FunctionSpec {
|
||||
rnode, err := resourceToRNode(res)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return runtimeutil.GetFunctionSpec(rnode)
|
||||
}
|
||||
|
||||
func toStorageMounts(mounts []string) []runtimeutil.StorageMount {
|
||||
var sms []runtimeutil.StorageMount
|
||||
for _, mount := range mounts {
|
||||
sms = append(sms, runtimeutil.StringToStorageMount(mount))
|
||||
}
|
||||
return sms
|
||||
}
|
||||
|
||||
// NewFnPlugin creates a FnPlugin struct
|
||||
func NewFnPlugin(o *types.FnPluginLoadingOptions) *FnPlugin {
|
||||
return &FnPlugin{
|
||||
runFns: runfn.RunFns{
|
||||
Functions: []*yaml.RNode{},
|
||||
Network: o.Network,
|
||||
NetworkName: o.NetworkName,
|
||||
EnableStarlark: o.EnableStar,
|
||||
EnableExec: o.EnableExec,
|
||||
StorageMounts: toStorageMounts(o.Mounts),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Cfg returns function config
|
||||
func (p *FnPlugin) Cfg() []byte {
|
||||
return p.cfg
|
||||
}
|
||||
|
||||
// Config is called by kustomize to pass-in config information
|
||||
func (p *FnPlugin) Config(h *resmap.PluginHelpers, config []byte) error {
|
||||
p.h = h
|
||||
p.cfg = config
|
||||
|
||||
fn, err := bytesToRNode(p.cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
meta, err := fn.GetMeta()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
p.pluginName = fmt.Sprintf("api: %s, kind: %s, name: %s",
|
||||
meta.APIVersion, meta.Kind, meta.Name)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Generate is called when run as generator
|
||||
func (p *FnPlugin) Generate() (resmap.ResMap, error) {
|
||||
output, err := p.invokePlugin(nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rm, err := p.h.ResmapFactory().NewResMapFromBytes(output)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return utils.UpdateResourceOptions(rm)
|
||||
}
|
||||
|
||||
// Transform is called when run as transformer
|
||||
func (p *FnPlugin) Transform(rm resmap.ResMap) error {
|
||||
// add ResIds as annotations to all objects so that we can add them back
|
||||
inputRM, err := utils.GetResMapWithIDAnnotation(rm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// encode the ResMap so it can be fed to the plugin
|
||||
resources, err := inputRM.AsYaml()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// invoke the plugin with resources as the input
|
||||
output, err := p.invokePlugin(resources)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%v %s", err, string(output))
|
||||
}
|
||||
|
||||
// update the original ResMap based on the output
|
||||
return utils.UpdateResMapValues(p.pluginName, p.h, output, rm)
|
||||
}
|
||||
|
||||
func injectAnnotation(input *yaml.RNode, k, v string) error {
|
||||
err := input.PipeE(yaml.SetAnnotation(k, v))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// invokePlugin uses Function runner to run function as plugin
|
||||
func (p *FnPlugin) invokePlugin(input []byte) ([]byte, error) {
|
||||
// get function config rnode
|
||||
functionConfig, err := bytesToRNode(p.cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// This annotation will let kustomize ingnore this item in output
|
||||
err = injectAnnotation(functionConfig, "config.kubernetes.io/local-config", "true")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// we need to add config as input for generators. Some of them don't work with FunctionConfig
|
||||
// and in addition kio.Pipeline won't create anything if there are no objects
|
||||
// see https://github.com/kubernetes-sigs/kustomize/blob/master/kyaml/kio/kio.go#L93
|
||||
// Since we added `local-config` annotation so it will be ignored in generator output
|
||||
// TODO(donnyxia): This is actually not used by generator and only used to bypass a kio limitation.
|
||||
// Need better solution.
|
||||
if input == nil {
|
||||
yaml, err := functionConfig.String()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
input = []byte(yaml)
|
||||
}
|
||||
|
||||
// Configure and Execute Fn. We don't need to convert resources to ResourceList here
|
||||
// because function runtime will do that. See kyaml/fn/runtime/runtimeutil/runtimeutil.go
|
||||
var ouputBuffer bytes.Buffer
|
||||
p.runFns.Input = bytes.NewReader(input)
|
||||
p.runFns.Functions = append(p.runFns.Functions, functionConfig)
|
||||
p.runFns.Output = &ouputBuffer
|
||||
|
||||
err = p.runFns.Execute()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(
|
||||
err, "couldn't execute function")
|
||||
}
|
||||
|
||||
return ouputBuffer.Bytes(), nil
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"sigs.k8s.io/kustomize/api/ifc"
|
||||
"sigs.k8s.io/kustomize/api/internal/plugins/builtinhelpers"
|
||||
"sigs.k8s.io/kustomize/api/internal/plugins/execplugin"
|
||||
"sigs.k8s.io/kustomize/api/internal/plugins/fnplugin"
|
||||
"sigs.k8s.io/kustomize/api/internal/plugins/utils"
|
||||
"sigs.k8s.io/kustomize/api/konfig"
|
||||
"sigs.k8s.io/kustomize/api/resid"
|
||||
@@ -116,7 +117,7 @@ func (l *Loader) loadAndConfigurePlugin(
|
||||
if isBuiltinPlugin(res) {
|
||||
switch l.pc.BpLoadingOptions {
|
||||
case types.BploLoadFromFileSys:
|
||||
c, err = l.loadPlugin(res.OrgId())
|
||||
c, err = l.loadPlugin(res)
|
||||
case types.BploUseStaticallyLinked:
|
||||
// Instead of looking for and loading a .so file,
|
||||
// instantiate the plugin from a generated factory
|
||||
@@ -131,7 +132,7 @@ func (l *Loader) loadAndConfigurePlugin(
|
||||
} else {
|
||||
switch l.pc.PluginRestrictions {
|
||||
case types.PluginRestrictionsNone:
|
||||
c, err = l.loadPlugin(res.OrgId())
|
||||
c, err = l.loadPlugin(res)
|
||||
case types.PluginRestrictionsBuiltinsOnly:
|
||||
err = types.NewErrOnlyBuiltinPluginsAllowed(res.OrgId().Kind)
|
||||
default:
|
||||
@@ -166,7 +167,15 @@ func (l *Loader) makeBuiltinPlugin(r resid.Gvk) (resmap.Configurable, error) {
|
||||
return nil, errors.Errorf("unable to load builtin %s", r)
|
||||
}
|
||||
|
||||
func (l *Loader) loadPlugin(resId resid.ResId) (resmap.Configurable, error) {
|
||||
func (l *Loader) loadPlugin(res *resource.Resource) (resmap.Configurable, error) {
|
||||
spec := fnplugin.GetFunctionSpec(res)
|
||||
if spec != nil {
|
||||
return fnplugin.NewFnPlugin(&l.pc.FnpLoadingOptions), nil
|
||||
}
|
||||
return l.loadExecOrGoPlugin(res.OrgId())
|
||||
}
|
||||
|
||||
func (l *Loader) loadExecOrGoPlugin(resId resid.ResId) (resmap.Configurable, error) {
|
||||
// First try to load the plugin as an executable.
|
||||
p := execplugin.NewExecPlugin(l.absolutePluginPath(resId))
|
||||
err := p.ErrIfNotExecutable()
|
||||
|
||||
@@ -4,13 +4,25 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/filesys"
|
||||
"sigs.k8s.io/kustomize/api/konfig"
|
||||
"sigs.k8s.io/kustomize/api/resid"
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
const (
|
||||
idAnnotation = "kustomize.config.k8s.io/id"
|
||||
HashAnnotation = "kustomize.config.k8s.io/needs-hash"
|
||||
BehaviorAnnotation = "kustomize.config.k8s.io/behavior"
|
||||
)
|
||||
|
||||
func GoBin() string {
|
||||
@@ -113,3 +125,91 @@ func FileExists(path string) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// GetResMapWithIDAnnotation returns a new copy of the given ResMap with the ResIds annotated in each Resource
|
||||
func GetResMapWithIDAnnotation(rm resmap.ResMap) (resmap.ResMap, error) {
|
||||
inputRM := rm.DeepCopy()
|
||||
for _, r := range inputRM.Resources() {
|
||||
idString, err := yaml.Marshal(r.CurId())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
annotations := r.GetAnnotations()
|
||||
if annotations == nil {
|
||||
annotations = make(map[string]string)
|
||||
}
|
||||
annotations[idAnnotation] = string(idString)
|
||||
r.SetAnnotations(annotations)
|
||||
}
|
||||
return inputRM, nil
|
||||
}
|
||||
|
||||
// UpdateResMapValues updates the Resource value in the given ResMap
|
||||
// with the emitted Resource values in output.
|
||||
func UpdateResMapValues(pluginName string, h *resmap.PluginHelpers, output []byte, rm resmap.ResMap) error {
|
||||
outputRM, err := h.ResmapFactory().NewResMapFromBytes(output)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, r := range outputRM.Resources() {
|
||||
// for each emitted Resource, find the matching Resource in the original ResMap
|
||||
// using its id
|
||||
annotations := r.GetAnnotations()
|
||||
idString, ok := annotations[idAnnotation]
|
||||
if !ok {
|
||||
return fmt.Errorf("the transformer %s should not remove annotation %s",
|
||||
pluginName, idAnnotation)
|
||||
}
|
||||
id := resid.ResId{}
|
||||
err := yaml.Unmarshal([]byte(idString), &id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
res, err := rm.GetByCurrentId(id)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to find unique match to %s", id.String())
|
||||
}
|
||||
// remove the annotation set by Kustomize to track the resource
|
||||
delete(annotations, idAnnotation)
|
||||
if len(annotations) == 0 {
|
||||
annotations = nil
|
||||
}
|
||||
r.SetAnnotations(annotations)
|
||||
|
||||
// update the resource value with the transformed object
|
||||
res.ResetPrimaryData(r)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateResourceOptions updates the generator options for each resource in the
|
||||
// given ResMap based on plugin provided annotations.
|
||||
func UpdateResourceOptions(rm resmap.ResMap) (resmap.ResMap, error) {
|
||||
for _, r := range rm.Resources() {
|
||||
// Disable name hashing by default and require plugin to explicitly
|
||||
// request it for each resource.
|
||||
annotations := r.GetAnnotations()
|
||||
behavior := annotations[BehaviorAnnotation]
|
||||
var needsHash bool
|
||||
if val, ok := annotations[HashAnnotation]; ok {
|
||||
b, err := strconv.ParseBool(val)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(
|
||||
"the annotation %q contains an invalid value (%q)",
|
||||
HashAnnotation, val)
|
||||
}
|
||||
needsHash = b
|
||||
}
|
||||
delete(annotations, HashAnnotation)
|
||||
delete(annotations, BehaviorAnnotation)
|
||||
if len(annotations) == 0 {
|
||||
annotations = nil
|
||||
}
|
||||
r.SetAnnotations(annotations)
|
||||
r.SetOptions(types.NewGenArgs(
|
||||
&types.GeneratorArgs{
|
||||
Behavior: behavior,
|
||||
Options: &types.GeneratorOptions{DisableNameSuffixHash: !needsHash}}))
|
||||
}
|
||||
return rm, nil
|
||||
}
|
||||
|
||||
@@ -4,12 +4,17 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/filesys"
|
||||
"sigs.k8s.io/kustomize/api/k8sdeps/kunstruct"
|
||||
"sigs.k8s.io/kustomize/api/konfig"
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/resource"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
)
|
||||
|
||||
func TestDeterminePluginSrcRoot(t *testing.T) {
|
||||
@@ -24,3 +29,99 @@ func TestDeterminePluginSrcRoot(t *testing.T) {
|
||||
t.Errorf("expected suffix '%s' in '%s'", konfig.RelPluginHome, actual)
|
||||
}
|
||||
}
|
||||
|
||||
func makeConfigMap(rf *resource.Factory, name, behavior string, hashValue *string) *resource.Resource {
|
||||
r := rf.FromMap(map[string]interface{}{
|
||||
"apiVersion": "v1",
|
||||
"kind": "ConfigMap",
|
||||
"metadata": map[string]interface{}{"name": name},
|
||||
})
|
||||
annotations := map[string]string{}
|
||||
if behavior != "" {
|
||||
annotations[BehaviorAnnotation] = behavior
|
||||
}
|
||||
if hashValue != nil {
|
||||
annotations[HashAnnotation] = *hashValue
|
||||
}
|
||||
if len(annotations) > 0 {
|
||||
r.SetAnnotations(annotations)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
func makeConfigMapOptions(rf *resource.Factory, name, behavior string, disableHash bool) *resource.Resource {
|
||||
return rf.FromMapAndOption(map[string]interface{}{
|
||||
"apiVersion": "v1",
|
||||
"kind": "ConfigMap",
|
||||
"metadata": map[string]interface{}{"name": name},
|
||||
}, &types.GeneratorArgs{
|
||||
Behavior: behavior,
|
||||
Options: &types.GeneratorOptions{DisableNameSuffixHash: disableHash}})
|
||||
}
|
||||
|
||||
func strptr(s string) *string {
|
||||
return &s
|
||||
}
|
||||
|
||||
func TestUpdateResourceOptions(t *testing.T) {
|
||||
rf := resource.NewFactory(kunstruct.NewKunstructuredFactoryImpl())
|
||||
in := resmap.New()
|
||||
expected := resmap.New()
|
||||
cases := []struct {
|
||||
behavior string
|
||||
needsHash bool
|
||||
hashValue *string
|
||||
}{
|
||||
{hashValue: strptr("false")},
|
||||
{hashValue: strptr("true"), needsHash: true},
|
||||
{behavior: "replace"},
|
||||
{behavior: "merge"},
|
||||
{behavior: "create"},
|
||||
{behavior: "nonsense"},
|
||||
{behavior: "merge", hashValue: strptr("false")},
|
||||
{behavior: "merge", hashValue: strptr("true"), needsHash: true},
|
||||
}
|
||||
for i, c := range cases {
|
||||
name := fmt.Sprintf("test%d", i)
|
||||
in.Append(makeConfigMap(rf, name, c.behavior, c.hashValue))
|
||||
expected.Append(makeConfigMapOptions(rf, name, c.behavior, !c.needsHash))
|
||||
}
|
||||
actual, err := UpdateResourceOptions(in)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err.Error())
|
||||
}
|
||||
for i, a := range expected.Resources() {
|
||||
b := actual.GetByIndex(i)
|
||||
if b == nil {
|
||||
t.Fatalf("resource %d missing from processed map", i)
|
||||
}
|
||||
if !a.Equals(b) {
|
||||
t.Errorf("expected %v got %v", a, b)
|
||||
}
|
||||
if a.NeedHashSuffix() != b.NeedHashSuffix() {
|
||||
t.Errorf("")
|
||||
}
|
||||
if a.Behavior() != b.Behavior() {
|
||||
t.Errorf("expected %v got %v", a.Behavior(), b.Behavior())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdateResourceOptionsWithInvalidHashAnnotationValues(t *testing.T) {
|
||||
rf := resource.NewFactory(kunstruct.NewKunstructuredFactoryImpl())
|
||||
cases := []string{
|
||||
"",
|
||||
"FaLsE",
|
||||
"TrUe",
|
||||
"potato",
|
||||
}
|
||||
for i, c := range cases {
|
||||
name := fmt.Sprintf("test%d", i)
|
||||
in := resmap.New()
|
||||
in.Append(makeConfigMap(rf, name, "", &c))
|
||||
_, err := UpdateResourceOptions(in)
|
||||
if err == nil {
|
||||
t.Errorf("expected error from value %q", c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +209,10 @@ func (kt *KustTarget) accumulateTarget(ra *accumulator.ResAccumulator) (
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = kt.runValidators(ra)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = ra.MergeVars(kt.kustomization.Vars)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(
|
||||
@@ -260,7 +264,7 @@ func (kt *KustTarget) runTransformers(ra *accumulator.ResAccumulator) error {
|
||||
return err
|
||||
}
|
||||
r = append(r, lts...)
|
||||
lts, err = kt.configureExternalTransformers()
|
||||
lts, err = kt.configureExternalTransformers(kt.kustomization.Transformers)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -269,15 +273,54 @@ func (kt *KustTarget) runTransformers(ra *accumulator.ResAccumulator) error {
|
||||
return ra.Transform(t)
|
||||
}
|
||||
|
||||
func (kt *KustTarget) configureExternalTransformers() ([]resmap.Transformer, error) {
|
||||
func (kt *KustTarget) configureExternalTransformers(transformers []string) ([]resmap.Transformer, error) {
|
||||
ra := accumulator.MakeEmptyAccumulator()
|
||||
ra, err := kt.accumulateResources(ra, kt.kustomization.Transformers)
|
||||
ra, err := kt.accumulateResources(ra, transformers)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return kt.pLdr.LoadTransformers(kt.ldr, kt.validator, ra.ResMap())
|
||||
}
|
||||
|
||||
func (kt *KustTarget) runValidators(ra *accumulator.ResAccumulator) error {
|
||||
validators, err := kt.configureExternalTransformers(kt.kustomization.Validators)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, v := range validators {
|
||||
// Validators shouldn't modify the resource map
|
||||
orignal := ra.ResMap().DeepCopy()
|
||||
err = v.Transform(ra.ResMap())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
new := ra.ResMap().DeepCopy()
|
||||
kt.removeValidatedByLabel(new)
|
||||
if err = orignal.ErrorIfNotEqualSets(new); err != nil {
|
||||
return fmt.Errorf("validator shouldn't modify the resource map: %v", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (kt *KustTarget) removeValidatedByLabel(rm resmap.ResMap) {
|
||||
|
||||
resources := rm.Resources()
|
||||
for _, r := range resources {
|
||||
labels := r.GetLabels()
|
||||
if _, found := labels[konfig.ValidatedByLabelKey]; !found {
|
||||
continue
|
||||
}
|
||||
delete(labels, konfig.ValidatedByLabelKey)
|
||||
if len(labels) == 0 {
|
||||
r.SetLabels(nil)
|
||||
} else {
|
||||
r.SetLabels(labels)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// accumulateResources fills the given resourceAccumulator
|
||||
// with resources read from the given list of paths.
|
||||
func (kt *KustTarget) accumulateResources(
|
||||
|
||||
@@ -252,6 +252,10 @@ nameReference:
|
||||
kind: Role
|
||||
- path: rules/resourceNames
|
||||
kind: ClusterRole
|
||||
- path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name
|
||||
kind: Service
|
||||
group: serving.knative.dev
|
||||
version: v1
|
||||
|
||||
- kind: Service
|
||||
version: v1
|
||||
|
||||
@@ -30,4 +30,13 @@ const (
|
||||
|
||||
// A program name, for use in help, finding the XDG_CONFIG_DIR, etc.
|
||||
ProgramName = "kustomize"
|
||||
|
||||
// Label key that indicates the resources are built from Kustomize
|
||||
ManagedbyLabelKey = "app.kubernetes.io/managed-by"
|
||||
|
||||
// An environment variable to turn on/off adding the ManagedByLabelKey
|
||||
EnableManagedbyLabelEnv = "KUSTOMIZE_ENABLE_MANAGEDBY_LABEL"
|
||||
|
||||
// Label key that indicates the resources are validated by a validator
|
||||
ValidatedByLabelKey = "validated-by"
|
||||
)
|
||||
|
||||
@@ -292,8 +292,7 @@ metadata:
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
nonsense: "Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod
|
||||
tempor\nincididunt ut labore et dolore magna aliqua. \n"
|
||||
nonsense: "Lorem ipsum dolor sit amet, consectetur\nadipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. \n"
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -132,6 +132,54 @@ spec:
|
||||
`)
|
||||
}
|
||||
|
||||
func TestTinyOverlay(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
th.WriteK("base", `
|
||||
namePrefix: a-
|
||||
resources:
|
||||
- deployment.yaml
|
||||
`)
|
||||
th.WriteF("base/deployment.yaml", `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: myDeployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: whatever
|
||||
`)
|
||||
th.WriteK("overlay", `
|
||||
namePrefix: b-
|
||||
resources:
|
||||
- ../base
|
||||
patchesStrategicMerge:
|
||||
- depPatch.yaml
|
||||
`)
|
||||
th.WriteF("overlay/depPatch.yaml", `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: myDeployment
|
||||
spec:
|
||||
replicas: 999
|
||||
`)
|
||||
m := th.Run("overlay", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: b-a-myDeployment
|
||||
spec:
|
||||
replicas: 999
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: whatever
|
||||
`)
|
||||
}
|
||||
|
||||
func writeSmallBase(th kusttest_test.Harness) {
|
||||
th.WriteK("/app/base", `
|
||||
namePrefix: a-
|
||||
|
||||
@@ -85,8 +85,7 @@ metadata:
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
druid_segmentCache_locations: '[{"path": "var/druid/segment-cache", "maxSize":
|
||||
32000000000, "freeSpacePercent": 1.0}]'
|
||||
druid_segmentCache_locations: '[{"path": "var/druid/segment-cache", "maxSize": 32000000000, "freeSpacePercent": 1.0}]'
|
||||
v2: '[{"path": "var/druid/segment-cache"}]'
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
func makeCommonFileForExtendedPatchTest(th kusttest_test.Harness) {
|
||||
th.WriteF("/app/base/deployment.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -36,7 +36,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -101,7 +101,7 @@ patches:
|
||||
name: busybox
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -110,7 +110,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -135,7 +135,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -203,7 +203,7 @@ patches:
|
||||
kind: Deployment
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -212,7 +212,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -239,7 +239,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -305,7 +305,7 @@ patches:
|
||||
labelSelector: app=nginx
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -314,7 +314,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -341,7 +341,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -408,7 +408,7 @@ patches:
|
||||
kind: Deployment
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -417,7 +417,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -442,7 +442,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -509,7 +509,7 @@ patches:
|
||||
labelSelector: app=busybox
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -518,7 +518,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -543,7 +543,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -612,7 +612,7 @@ patches:
|
||||
labelSelector: app=busybox
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -621,7 +621,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -646,7 +646,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -714,7 +714,7 @@ patches:
|
||||
labelSelector: app=busybox
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -723,7 +723,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -748,7 +748,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -814,7 +814,7 @@ patches:
|
||||
name: no-match
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -823,7 +823,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -848,7 +848,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -910,7 +910,7 @@ patches:
|
||||
- path: patch.yaml
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -919,7 +919,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -944,7 +944,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -1014,7 +1014,7 @@ patches:
|
||||
kind: Job
|
||||
`)
|
||||
th.WriteF("/app/base/patch.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -1023,7 +1023,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -1048,7 +1048,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -1116,7 +1116,7 @@ patches:
|
||||
kind: Deployment
|
||||
`)
|
||||
th.WriteF("/app/base/patch1.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -1124,7 +1124,7 @@ metadata:
|
||||
new-key-from-patch1: new-value
|
||||
`)
|
||||
th.WriteF("/app/base/patch2.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: busybox
|
||||
@@ -1133,7 +1133,7 @@ metadata:
|
||||
`)
|
||||
m := th.Run("/app/base", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
@@ -1158,7 +1158,7 @@ spec:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
466
api/krusty/fnplugin_test.go
Normal file
466
api/krusty/fnplugin_test.go
Normal file
@@ -0,0 +1,466 @@
|
||||
package krusty_test
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"testing"
|
||||
|
||||
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
||||
)
|
||||
|
||||
func TestFnExecGenerator(t *testing.T) {
|
||||
th := kusttest_test.MakeEnhancedHarness(t)
|
||||
defer th.Reset()
|
||||
|
||||
th.WriteK("/app", `
|
||||
resources:
|
||||
- short_secret.yaml
|
||||
generators:
|
||||
- gener.yaml
|
||||
`)
|
||||
|
||||
// Create some additional resource just to make sure everything is added
|
||||
th.WriteF("/app/short_secret.yaml", `
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/ephemeral-user-data: "true"
|
||||
name: node1-bmc-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
userData: |
|
||||
bootcmd:
|
||||
- mkdir /mnt/vda
|
||||
`)
|
||||
|
||||
th.WriteF("/app/gener.yaml", `
|
||||
kind: executable
|
||||
metadata:
|
||||
name: demo
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
exec:
|
||||
path: ./fnplugin_test/fnexectest.sh
|
||||
spec:
|
||||
`)
|
||||
o := th.MakeOptionsPluginsEnabled()
|
||||
o.PluginConfig.FnpLoadingOptions.EnableExec = true
|
||||
m := th.Run("/app", o)
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/ephemeral-user-data: "true"
|
||||
name: node1-bmc-secret
|
||||
stringData:
|
||||
userData: |
|
||||
bootcmd:
|
||||
- mkdir /mnt/vda
|
||||
type: Opaque
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: deployment_nginx.yaml
|
||||
tshirt-size: small
|
||||
labels:
|
||||
app: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: nginx
|
||||
`)
|
||||
}
|
||||
|
||||
func skipIfNoDocker(t *testing.T) {
|
||||
if _, err := exec.LookPath("docker"); err != nil {
|
||||
t.Skip("skipping because docker binary wasn't found in PATH")
|
||||
}
|
||||
}
|
||||
|
||||
func TestFnContainerGenerator(t *testing.T) {
|
||||
skipIfNoDocker(t)
|
||||
|
||||
th := kusttest_test.MakeEnhancedHarness(t)
|
||||
defer th.Reset()
|
||||
|
||||
th.WriteK("/app", `
|
||||
resources:
|
||||
- short_secret.yaml
|
||||
generators:
|
||||
- gener.yaml
|
||||
`)
|
||||
// Create generator config
|
||||
th.WriteF("/app/gener.yaml", `
|
||||
apiVersion: examples.config.kubernetes.io/v1beta1
|
||||
kind: CockroachDB
|
||||
metadata:
|
||||
name: demo
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/kustomize-functions/example-cockroachdb:v0.1.0
|
||||
spec:
|
||||
replicas: 3
|
||||
`)
|
||||
// Create some additional resource just to make sure everything is added
|
||||
th.WriteF("/app/short_secret.yaml", `
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/ephemeral-user-data: "true"
|
||||
name: node1-bmc-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
userData: |
|
||||
bootcmd:
|
||||
- mkdir /mnt/vda
|
||||
`)
|
||||
m := th.Run("/app", th.MakeOptionsPluginsEnabled())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
airshipit.org/ephemeral-user-data: "true"
|
||||
name: node1-bmc-secret
|
||||
stringData:
|
||||
userData: |
|
||||
bootcmd:
|
||||
- mkdir /mnt/vda
|
||||
type: Opaque
|
||||
---
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: config/demo-budget_poddisruptionbudget.yaml
|
||||
labels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
name: demo-budget
|
||||
spec:
|
||||
minAvailable: 67%
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: config/demo-public_service.yaml
|
||||
labels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
name: demo-public
|
||||
spec:
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 26257
|
||||
targetPort: 26257
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: config/demo_service.yaml
|
||||
prometheus.io/path: _status/vars
|
||||
prometheus.io/port: "8080"
|
||||
prometheus.io/scrape: "true"
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
labels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
name: demo
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 26257
|
||||
targetPort: 26257
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: config/demo_statefulset.yaml
|
||||
labels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
name: demo
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
serviceName: demo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cockroachdb
|
||||
name: demo
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- cockroachdb
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
containers:
|
||||
- command:
|
||||
- /bin/bash
|
||||
- -ecx
|
||||
- |
|
||||
# The use of qualified `+"`hostname -f`"+` is crucial:
|
||||
# Other nodes aren't able to look up the unqualified hostname.
|
||||
CRARGS=("start" "--logtostderr" "--insecure" "--host" "$(hostname -f)" "--http-host" "0.0.0.0")
|
||||
# We only want to initialize a new cluster (by omitting the join flag)
|
||||
# if we're sure that we're the first node (i.e. index 0) and that
|
||||
# there aren't any other nodes running as part of the cluster that
|
||||
# this is supposed to be a part of (which indicates that a cluster
|
||||
# already exists and we should make sure not to create a new one).
|
||||
# It's fine to run without --join on a restart if there aren't any
|
||||
# other nodes.
|
||||
if [ ! "$(hostname)" == "cockroachdb-0" ] || [ -e "/cockroach/cockroach-data/cluster_exists_marker" ]
|
||||
then
|
||||
# We don't join cockroachdb in order to avoid a node attempting
|
||||
# to join itself, which currently doesn't work
|
||||
# (https://github.com/cockroachdb/cockroach/issues/9625).
|
||||
CRARGS+=("--join" "cockroachdb-public")
|
||||
fi
|
||||
exec /cockroach/cockroach ${CRARGS[*]}
|
||||
image: cockroachdb/cockroach:v1.1.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: demo
|
||||
ports:
|
||||
- containerPort: 26257
|
||||
name: grpc
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- mountPath: /cockroach/cockroach-data
|
||||
name: datadir
|
||||
initContainers:
|
||||
- args:
|
||||
- -on-start=/on-start.sh
|
||||
- -service=cockroachdb
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: cockroachdb/cockroach-k8s-init:0.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: bootstrap
|
||||
volumeMounts:
|
||||
- mountPath: /cockroach/cockroach-data
|
||||
name: datadir
|
||||
terminationGracePeriodSeconds: 60
|
||||
volumes:
|
||||
- name: datadir
|
||||
persistentVolumeClaim:
|
||||
claimName: datadir
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: datadir
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
`)
|
||||
}
|
||||
|
||||
func TestFnContainerTransformer(t *testing.T) {
|
||||
skipIfNoDocker(t)
|
||||
|
||||
th := kusttest_test.MakeEnhancedHarness(t)
|
||||
defer th.Reset()
|
||||
|
||||
th.WriteK("/app", `
|
||||
resources:
|
||||
- data.yaml
|
||||
transformers:
|
||||
- transf1.yaml
|
||||
- transf2.yaml
|
||||
`)
|
||||
|
||||
th.WriteF("/app/data.yaml", `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
labels:
|
||||
app: nginx
|
||||
annotations:
|
||||
tshirt-size: small # this injects the resource reservations
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
`)
|
||||
// This transformer should add resource reservations based on annotation in data.yaml
|
||||
// See https://github.com/kubernetes-sigs/kustomize/tree/master/functions/examples/injection-tshirt-sizes
|
||||
th.WriteF("/app/transf1.yaml", `
|
||||
apiVersion: examples.config.kubernetes.io/v1beta1
|
||||
kind: Validator
|
||||
metadata:
|
||||
name: valid
|
||||
annotations:
|
||||
config.kubernetes.io/function: |-
|
||||
container:
|
||||
image: gcr.io/kustomize-functions/example-tshirt:v0.2.0
|
||||
`)
|
||||
// This transformer will check resources without and won't do any changes
|
||||
// See https://github.com/kubernetes-sigs/kustomize/tree/master/functions/examples/validator-kubeval
|
||||
th.WriteF("/app/transf2.yaml", `
|
||||
apiVersion: examples.config.kubernetes.io/v1beta1
|
||||
kind: Kubeval
|
||||
metadata:
|
||||
name: validate
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/kustomize-functions/example-validator-kubeval:v0.1.0
|
||||
spec:
|
||||
strict: true
|
||||
ignoreMissingSchemas: true
|
||||
|
||||
# TODO: Update this to use network/volumes features.
|
||||
# Relevant issues:
|
||||
# - https://github.com/kubernetes-sigs/kustomize/issues/1901
|
||||
# - https://github.com/kubernetes-sigs/kustomize/issues/1902
|
||||
kubernetesVersion: "1.16.0"
|
||||
schemaLocation: "file:///schemas"
|
||||
`)
|
||||
m := th.Run("/app", th.MakeOptionsPluginsEnabled())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: deployment_nginx.yaml
|
||||
tshirt-size: small
|
||||
labels:
|
||||
app: nginx
|
||||
name: nginx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: nginx
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 50M
|
||||
`)
|
||||
}
|
||||
|
||||
func TestFnContainerTransformerWithConfig(t *testing.T) {
|
||||
skipIfNoDocker(t)
|
||||
|
||||
th := kusttest_test.MakeEnhancedHarness(t)
|
||||
defer th.Reset()
|
||||
|
||||
th.WriteK("/app", `
|
||||
resources:
|
||||
- data1.yaml
|
||||
- data2.yaml
|
||||
transformers:
|
||||
- label_namespace.yaml
|
||||
`)
|
||||
|
||||
th.WriteF("/app/data1.yaml", `apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: my-namespace
|
||||
`)
|
||||
th.WriteF("/app/data2.yaml", `apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: another-namespace
|
||||
`)
|
||||
|
||||
th.WriteF("/app/label_namespace.yaml", `apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: label_namespace
|
||||
annotations:
|
||||
config.kubernetes.io/function: |-
|
||||
container:
|
||||
image: gcr.io/kpt-functions/label-namespace@sha256:4f030738d6d25a207641ca517916431517578bd0eb8d98a8bde04e3bb9315dcd
|
||||
data:
|
||||
label_name: my-ns-name
|
||||
label_value: function-test
|
||||
`)
|
||||
|
||||
m := th.Run("/app", th.MakeOptionsPluginsEnabled())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: namespace_my-namespace.yaml
|
||||
labels:
|
||||
my-ns-name: function-test
|
||||
name: my-namespace
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/path: namespace_another-namespace.yaml
|
||||
labels:
|
||||
my-ns-name: function-test
|
||||
name: another-namespace
|
||||
`)
|
||||
}
|
||||
24
api/krusty/fnplugin_test/fnexectest.sh
Executable file
24
api/krusty/fnplugin_test/fnexectest.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
cat <<EOF
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
labels:
|
||||
app: nginx
|
||||
annotations:
|
||||
tshirt-size: small # this injects the resource reservations
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
EOF
|
||||
@@ -56,7 +56,7 @@ spec:
|
||||
app: nginx
|
||||
`)
|
||||
th.WriteF("/app/base/deployment.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -92,7 +92,7 @@ spec:
|
||||
org: example.com
|
||||
team: foo
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -173,7 +173,7 @@ secretGenerator:
|
||||
- password=somepw
|
||||
`)
|
||||
th.WriteF("/app/deployment.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -218,7 +218,7 @@ func TestBaseWithGeneratorsAlone(t *testing.T) {
|
||||
makeBaseWithGenerators(th)
|
||||
m := th.Run("/app", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -308,7 +308,7 @@ func TestMergeAndReplaceGenerators(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
makeBaseWithGenerators(th)
|
||||
th.WriteF("/overlay/deployment.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -351,7 +351,7 @@ secretGenerator:
|
||||
`)
|
||||
m := th.Run("/overlay", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
package krusty
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"sigs.k8s.io/kustomize/api/builtins"
|
||||
"sigs.k8s.io/kustomize/api/filesys"
|
||||
"sigs.k8s.io/kustomize/api/internal/k8sdeps/transformer"
|
||||
@@ -11,7 +13,9 @@ import (
|
||||
"sigs.k8s.io/kustomize/api/internal/target"
|
||||
"sigs.k8s.io/kustomize/api/k8sdeps/kunstruct"
|
||||
"sigs.k8s.io/kustomize/api/k8sdeps/validator"
|
||||
"sigs.k8s.io/kustomize/api/konfig"
|
||||
fLdr "sigs.k8s.io/kustomize/api/loader"
|
||||
"sigs.k8s.io/kustomize/api/provenance"
|
||||
"sigs.k8s.io/kustomize/api/resmap"
|
||||
"sigs.k8s.io/kustomize/api/resource"
|
||||
"sigs.k8s.io/kustomize/api/types"
|
||||
@@ -78,5 +82,15 @@ func (b *Kustomizer) Run(path string) (resmap.ResMap, error) {
|
||||
if b.options.DoLegacyResourceSort {
|
||||
builtins.NewLegacyOrderTransformerPlugin().Transform(m)
|
||||
}
|
||||
if b.options.AddManagedbyLabel {
|
||||
t := builtins.LabelTransformerPlugin{
|
||||
Labels: map[string]string{konfig.ManagedbyLabelKey: fmt.Sprintf("kustomize-%s", provenance.GetProvenance().Version)},
|
||||
FieldSpecs: []types.FieldSpec{{
|
||||
Path: "metadata/labels",
|
||||
CreateIfNotPresent: true,
|
||||
}},
|
||||
}
|
||||
t.Transform(m)
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
43
api/krusty/managedbylabel_test.go
Normal file
43
api/krusty/managedbylabel_test.go
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright 2020 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package krusty_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
||||
)
|
||||
|
||||
func TestAddManagedbyLabel(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
th.WriteF("/app/service.yaml", `
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: myService
|
||||
spec:
|
||||
ports:
|
||||
- port: 7002
|
||||
`)
|
||||
th.WriteK("/app", `
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- service.yaml
|
||||
`)
|
||||
options := th.MakeDefaultOptions()
|
||||
options.AddManagedbyLabel = true
|
||||
m := th.Run("/app", options)
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/managed-by: kustomize-v444.333.222
|
||||
name: myService
|
||||
spec:
|
||||
ports:
|
||||
- port: 7002
|
||||
`)
|
||||
}
|
||||
@@ -10,6 +10,184 @@ import (
|
||||
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
|
||||
)
|
||||
|
||||
func TestSimpleMultiplePatches(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
th.WriteK("base", `
|
||||
namePrefix: b-
|
||||
commonLabels:
|
||||
team: foo
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
configMapGenerator:
|
||||
- name: configmap-in-base
|
||||
literals:
|
||||
- foo=bar
|
||||
`)
|
||||
th.WriteF("base/deployment.yaml", `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx
|
||||
volumeMounts:
|
||||
- name: nginx-persistent-storage
|
||||
mountPath: /tmp/ps
|
||||
- name: sidecar
|
||||
image: sidecar:latest
|
||||
volumes:
|
||||
- name: nginx-persistent-storage
|
||||
emptyDir: {}
|
||||
- configMap:
|
||||
name: configmap-in-base
|
||||
name: configmap-in-base
|
||||
`)
|
||||
th.WriteF("base/service.yaml", `
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
`)
|
||||
th.WriteK("overlay", `
|
||||
namePrefix: a-
|
||||
commonLabels:
|
||||
env: staging
|
||||
patchesStrategicMerge:
|
||||
- deployment-patch1.yaml
|
||||
- deployment-patch2.yaml
|
||||
resources:
|
||||
- ../base
|
||||
configMapGenerator:
|
||||
- name: configmap-in-overlay
|
||||
literals:
|
||||
- hello=world
|
||||
`)
|
||||
th.WriteF("overlay/deployment-patch1.yaml", `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:latest
|
||||
env:
|
||||
- name: ENVKEY
|
||||
value: ENVVALUE
|
||||
volumes:
|
||||
- name: nginx-persistent-storage
|
||||
emptyDir: null
|
||||
gcePersistentDisk:
|
||||
pdName: nginx-persistent-storage
|
||||
- configMap:
|
||||
name: configmap-in-overlay
|
||||
name: configmap-in-overlay
|
||||
`)
|
||||
th.WriteF("overlay/deployment-patch2.yaml", `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
env:
|
||||
- name: ANOTHERENV
|
||||
value: FOO
|
||||
volumes:
|
||||
- name: nginx-persistent-storage
|
||||
`)
|
||||
m := th.Run("overlay", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
env: staging
|
||||
team: foo
|
||||
name: a-b-nginx
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
env: staging
|
||||
team: foo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
env: staging
|
||||
team: foo
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: ANOTHERENV
|
||||
value: FOO
|
||||
- name: ENVKEY
|
||||
value: ENVVALUE
|
||||
image: nginx:latest
|
||||
name: nginx
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ps
|
||||
name: nginx-persistent-storage
|
||||
- image: sidecar:latest
|
||||
name: sidecar
|
||||
volumes:
|
||||
- gcePersistentDisk:
|
||||
pdName: nginx-persistent-storage
|
||||
name: nginx-persistent-storage
|
||||
- configMap:
|
||||
name: a-configmap-in-overlay-ffm9hf78mc
|
||||
name: configmap-in-overlay
|
||||
- configMap:
|
||||
name: a-b-configmap-in-base-fm96mhk4dt
|
||||
name: configmap-in-base
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
env: staging
|
||||
team: foo
|
||||
name: a-b-nginx
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
selector:
|
||||
env: staging
|
||||
team: foo
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
foo: bar
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
env: staging
|
||||
team: foo
|
||||
name: a-b-configmap-in-base-fm96mhk4dt
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
hello: world
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
env: staging
|
||||
name: a-configmap-in-overlay-ffm9hf78mc
|
||||
`)
|
||||
}
|
||||
|
||||
func makeCommonFileForMultiplePatchTest(th kusttest_test.Harness) {
|
||||
th.WriteK("/app/base", `
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
@@ -30,7 +208,7 @@ configMapGenerator:
|
||||
- foo=bar
|
||||
`)
|
||||
th.WriteF("/app/base/deployment.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -92,7 +270,7 @@ func TestMultiplePatchesNoConflict(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
makeCommonFileForMultiplePatchTest(th)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -115,7 +293,7 @@ spec:
|
||||
name: configmap-in-overlay
|
||||
`)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -132,7 +310,7 @@ spec:
|
||||
`)
|
||||
m := th.Run("/app/overlay/staging", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -233,7 +411,7 @@ func TestMultiplePatchesWithConflict(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
makeCommonFileForMultiplePatchTest(th)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -255,7 +433,7 @@ spec:
|
||||
name: configmap-in-overlay
|
||||
`)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -279,7 +457,7 @@ spec:
|
||||
}
|
||||
|
||||
func TestMultiplePatchesWithOnePatchDeleteDirective(t *testing.T) {
|
||||
additivePatch := `apiVersion: apps/v1beta2
|
||||
additivePatch := `apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -292,7 +470,7 @@ spec:
|
||||
- name: SOME_NAME
|
||||
value: somevalue
|
||||
`
|
||||
deletePatch := `apiVersion: apps/v1beta2
|
||||
deletePatch := `apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -328,7 +506,7 @@ spec:
|
||||
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", c.patch1)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", c.patch2)
|
||||
m := th.Run("/app/overlay/staging", th.MakeDefaultOptions())
|
||||
th.AssertActualEqualsExpected(m, `apiVersion: apps/v1beta2
|
||||
th.AssertActualEqualsExpected(m, `apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
@@ -423,7 +601,7 @@ func TestMultiplePatchesBothWithPatchDeleteDirective(t *testing.T) {
|
||||
th := kusttest_test.MakeHarness(t)
|
||||
makeCommonFileForMultiplePatchTest(th)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch1.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
@@ -435,7 +613,7 @@ spec:
|
||||
name: sidecar
|
||||
`)
|
||||
th.WriteF("/app/overlay/staging/deployment-patch2.yaml", `
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
|
||||
@@ -18,6 +18,11 @@ type Options struct {
|
||||
// order as specified by the kustomization file(s).
|
||||
DoLegacyResourceSort bool
|
||||
|
||||
// When true, a label
|
||||
// app.kubernetes.io/managed-by: kustomize-<version>
|
||||
// is added to all the resources in the build out.
|
||||
AddManagedbyLabel bool
|
||||
|
||||
// Restrictions on what can be loaded from the file system.
|
||||
// See type definition.
|
||||
LoadRestrictions types.LoadRestrictions
|
||||
|
||||
@@ -844,8 +844,7 @@ spec:
|
||||
- -namespace=${POD_NAMESPACE}
|
||||
- -certs-dir=/cockroach-certs
|
||||
- -type=node
|
||||
- -addresses=localhost,127.0.0.1,${POD_IP},$(hostname -f),$(hostname -f|cut
|
||||
-f 1-2 -d '.'),dev-base-cockroachdb-public
|
||||
- -addresses=localhost,127.0.0.1,${POD_IP},$(hostname -f),$(hostname -f|cut -f 1-2 -d '.'),dev-base-cockroachdb-public
|
||||
- -symlink-ca-from=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
env:
|
||||
- name: POD_IP
|
||||
|
||||
@@ -69,10 +69,10 @@ func (rf *Factory) makeOne(
|
||||
o = types.NewGenArgs(nil)
|
||||
}
|
||||
r := &Resource{
|
||||
Kunstructured: u,
|
||||
options: o,
|
||||
kunStr: u,
|
||||
options: o,
|
||||
}
|
||||
return r.setOriginalName(r.GetName()).setOriginalNs(r.GetNamespace())
|
||||
return r.setOriginalName(r.kunStr.GetName()).setOriginalNs(r.GetNamespace())
|
||||
}
|
||||
|
||||
// SliceFromPatches returns a slice of resources given a patch path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2019 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Package resource implements representations of k8s API resources as "unstructured" objects.
|
||||
// Package resource implements representations of k8s API resources.
|
||||
package resource
|
||||
|
||||
import (
|
||||
@@ -14,10 +14,57 @@ import (
|
||||
"sigs.k8s.io/yaml"
|
||||
)
|
||||
|
||||
// Resource is map representation of a Kubernetes API resource object
|
||||
// paired with a GenerationBehavior.
|
||||
// Resource is a representation of a Kubernetes Resource Model object paired
|
||||
// with metadata used by kustomize.
|
||||
//
|
||||
// At time of writing Resource is changing from being based on an object
|
||||
// sitting behind
|
||||
//
|
||||
// sigs.k8s.io/kustomize/api/ifc.Unstructured
|
||||
//
|
||||
// to being based on an instance of
|
||||
//
|
||||
// sigs.k8s.io/kustomize/kyaml/yaml.RNode
|
||||
//
|
||||
// Ultimately, use of the Resource struct in kustomize should be entirely
|
||||
// replaced by instances of RNode for direct use in kyaml, with all metadata
|
||||
// stored directly in the RNodes as short-lived annotations, to be deleted
|
||||
// before final output as part of a final filtration step. Using annotations
|
||||
// will allow pipelined KRM Config Functions to share metadata that would
|
||||
// otherwise be hidden in kustomize-only structures.
|
||||
//
|
||||
// ifc.Unstructured is an interface hiding an instance of
|
||||
// sigs.k8s.io/kustomize/api/k8sdeps/kunstruct.UnstructAdapter
|
||||
// which in turn adapts an instance of
|
||||
// k8s.io/apimachinery/pkg/apis/meta/v1/unstructured
|
||||
// to the ifc.Unstructured interface. This latter code handles
|
||||
// mutations in the old code.
|
||||
//
|
||||
// The rule in kustomize development has been
|
||||
// api/
|
||||
// k8sdeps/ ifc/ krusty/ theRest/
|
||||
//
|
||||
// 1) Depend on k8s.io/ only via sigs.k8s.io/kustomize/api/k8sdeps.
|
||||
//
|
||||
// 2) Instances created in k8sdeps/ can only be injected into theRest/
|
||||
// behind interfaces defined in ifc/, arranged by a small bit of code
|
||||
// in krusty/. Nothing in theRest/ can import k8sdeps/.
|
||||
//
|
||||
// This was to allow for importing kustomize code into kubectl, which also
|
||||
// depends on k8s.io/apimachinery, albeit via a strange, old arrangement
|
||||
// predating Go modules. The idea was to copy the k8sdeps/ tree into kubectl
|
||||
// via a large PR, and depend on the rest via vendoring (and a small copy of
|
||||
// krusty/ code). Over 2019, however, kubectl underwent large code changes
|
||||
// including a switch to Go modules, and an attempt to extract it from the
|
||||
// k8s repo, and this made large kustomize integration PRs hard to get through
|
||||
// code review.
|
||||
//
|
||||
// The new plan is to eliminate k8sdeps/ entirely, along with its k8s.io/
|
||||
// dependence, switch to kyaml, and thus allow kustomize to be imported into
|
||||
// kubectl via normal Go module imports.
|
||||
//
|
||||
type Resource struct {
|
||||
ifc.Kunstructured
|
||||
kunStr ifc.Kunstructured
|
||||
originalName string
|
||||
originalNs string
|
||||
options *types.GenArgs
|
||||
@@ -27,6 +74,118 @@ type Resource struct {
|
||||
nameSuffixes []string
|
||||
}
|
||||
|
||||
func (r *Resource) ResetPrimaryData(incoming *Resource) {
|
||||
r.kunStr = incoming.kunStr.Copy()
|
||||
}
|
||||
|
||||
func (r *Resource) GetAnnotations() map[string]string {
|
||||
return r.kunStr.GetAnnotations()
|
||||
}
|
||||
|
||||
func (r *Resource) Copy() ifc.Kunstructured {
|
||||
return r.kunStr.Copy()
|
||||
}
|
||||
|
||||
func (r *Resource) GetBool(p string) (bool, error) {
|
||||
return r.kunStr.GetBool(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetFieldValue(f string) (interface{}, error) {
|
||||
return r.kunStr.GetFieldValue(f)
|
||||
}
|
||||
|
||||
func (r *Resource) GetFloat64(p string) (float64, error) {
|
||||
return r.kunStr.GetFloat64(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetGvk() resid.Gvk {
|
||||
return r.kunStr.GetGvk()
|
||||
}
|
||||
|
||||
func (r *Resource) GetInt64(p string) (int64, error) {
|
||||
return r.kunStr.GetInt64(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetKind() string {
|
||||
return r.kunStr.GetKind()
|
||||
}
|
||||
|
||||
func (r *Resource) GetLabels() map[string]string {
|
||||
return r.kunStr.GetLabels()
|
||||
}
|
||||
|
||||
func (r *Resource) GetMap(p string) (map[string]interface{}, error) {
|
||||
return r.kunStr.GetMap(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetName() string {
|
||||
return r.kunStr.GetName()
|
||||
}
|
||||
|
||||
func (r *Resource) GetSlice(p string) ([]interface{}, error) {
|
||||
return r.kunStr.GetSlice(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetString(p string) (string, error) {
|
||||
return r.kunStr.GetString(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetStringMap(p string) (map[string]string, error) {
|
||||
return r.kunStr.GetStringMap(p)
|
||||
}
|
||||
|
||||
func (r *Resource) GetStringSlice(p string) ([]string, error) {
|
||||
return r.kunStr.GetStringSlice(p)
|
||||
}
|
||||
|
||||
func (r *Resource) Map() map[string]interface{} {
|
||||
return r.kunStr.Map()
|
||||
}
|
||||
|
||||
func (r *Resource) MarshalJSON() ([]byte, error) {
|
||||
return r.kunStr.MarshalJSON()
|
||||
}
|
||||
|
||||
func (r *Resource) MatchesLabelSelector(selector string) (bool, error) {
|
||||
return r.kunStr.MatchesLabelSelector(selector)
|
||||
}
|
||||
|
||||
func (r *Resource) MatchesAnnotationSelector(selector string) (bool, error) {
|
||||
return r.kunStr.MatchesAnnotationSelector(selector)
|
||||
}
|
||||
|
||||
func (r *Resource) Patch(other ifc.Kunstructured) error {
|
||||
return r.kunStr.Patch(other)
|
||||
}
|
||||
|
||||
func (r *Resource) SetAnnotations(m map[string]string) {
|
||||
r.kunStr.SetAnnotations(m)
|
||||
}
|
||||
|
||||
func (r *Resource) SetGvk(gvk resid.Gvk) {
|
||||
r.kunStr.SetGvk(gvk)
|
||||
}
|
||||
|
||||
func (r *Resource) SetLabels(m map[string]string) {
|
||||
r.kunStr.SetLabels(m)
|
||||
}
|
||||
|
||||
func (r *Resource) SetMap(m map[string]interface{}) {
|
||||
r.kunStr.SetMap(m)
|
||||
}
|
||||
|
||||
func (r *Resource) SetName(n string) {
|
||||
r.kunStr.SetName(n)
|
||||
}
|
||||
|
||||
func (r *Resource) SetNamespace(n string) {
|
||||
r.kunStr.SetNamespace(n)
|
||||
}
|
||||
|
||||
func (r *Resource) UnmarshalJSON(s []byte) error {
|
||||
return r.kunStr.UnmarshalJSON(s)
|
||||
}
|
||||
|
||||
// ResCtx is an interface describing the contextual added
|
||||
// kept kustomize in the context of each Resource object.
|
||||
// Currently mainly the name prefix and name suffix are added.
|
||||
@@ -46,7 +205,7 @@ type ResCtxMatcher func(ResCtx) bool
|
||||
// DeepCopy returns a new copy of resource
|
||||
func (r *Resource) DeepCopy() *Resource {
|
||||
rc := &Resource{
|
||||
Kunstructured: r.Kunstructured.Copy(),
|
||||
kunStr: r.kunStr.Copy(),
|
||||
}
|
||||
rc.copyOtherFields(r)
|
||||
return rc
|
||||
@@ -54,11 +213,11 @@ func (r *Resource) DeepCopy() *Resource {
|
||||
|
||||
// Replace performs replace with other resource.
|
||||
func (r *Resource) Replace(other *Resource) {
|
||||
r.SetLabels(mergeStringMaps(other.GetLabels(), r.GetLabels()))
|
||||
r.SetAnnotations(
|
||||
mergeStringMaps(other.GetAnnotations(), r.GetAnnotations()))
|
||||
r.SetName(other.GetName())
|
||||
r.SetNamespace(other.GetNamespace())
|
||||
r.kunStr.SetLabels(mergeStringMaps(other.kunStr.GetLabels(), r.kunStr.GetLabels()))
|
||||
r.kunStr.SetAnnotations(
|
||||
mergeStringMaps(other.kunStr.GetAnnotations(), r.kunStr.GetAnnotations()))
|
||||
r.kunStr.SetName(other.GetName())
|
||||
r.kunStr.SetNamespace(other.GetNamespace())
|
||||
r.copyOtherFields(other)
|
||||
}
|
||||
|
||||
@@ -74,7 +233,7 @@ func (r *Resource) copyOtherFields(other *Resource) {
|
||||
|
||||
func (r *Resource) Equals(o *Resource) bool {
|
||||
return r.ReferencesEqual(o) &&
|
||||
reflect.DeepEqual(r.Kunstructured, o.Kunstructured)
|
||||
reflect.DeepEqual(r.kunStr, o.kunStr)
|
||||
}
|
||||
|
||||
func (r *Resource) ReferencesEqual(o *Resource) bool {
|
||||
@@ -93,13 +252,13 @@ func (r *Resource) ReferencesEqual(o *Resource) bool {
|
||||
}
|
||||
|
||||
func (r *Resource) KunstructEqual(o *Resource) bool {
|
||||
return reflect.DeepEqual(r.Kunstructured, o.Kunstructured)
|
||||
return reflect.DeepEqual(r.kunStr, o.kunStr)
|
||||
}
|
||||
|
||||
// Merge performs merge with other resource.
|
||||
func (r *Resource) Merge(other *Resource) {
|
||||
r.Replace(other)
|
||||
mergeConfigmap(r.Map(), other.Map(), r.Map())
|
||||
mergeConfigmap(r.kunStr.Map(), other.Map(), r.Map())
|
||||
}
|
||||
|
||||
func (r *Resource) copyRefBy() []resid.ResId {
|
||||
@@ -225,7 +384,7 @@ func (r *Resource) setOriginalNs(n string) *Resource {
|
||||
|
||||
// String returns resource as JSON.
|
||||
func (r *Resource) String() string {
|
||||
bs, err := r.MarshalJSON()
|
||||
bs, err := r.kunStr.MarshalJSON()
|
||||
if err != nil {
|
||||
return "<" + err.Error() + ">"
|
||||
}
|
||||
@@ -235,7 +394,7 @@ func (r *Resource) String() string {
|
||||
// AsYAML returns the resource in Yaml form.
|
||||
// Easier to read than JSON.
|
||||
func (r *Resource) AsYAML() ([]byte, error) {
|
||||
json, err := r.MarshalJSON()
|
||||
json, err := r.kunStr.MarshalJSON()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -260,7 +419,7 @@ func (r *Resource) NeedHashSuffix() bool {
|
||||
|
||||
// GetNamespace returns the namespace the resource thinks it's in.
|
||||
func (r *Resource) GetNamespace() string {
|
||||
namespace, _ := r.GetString("metadata.namespace")
|
||||
namespace, _ := r.kunStr.GetString("metadata.namespace")
|
||||
// if err, namespace is empty, so no need to check.
|
||||
return namespace
|
||||
}
|
||||
@@ -270,7 +429,7 @@ func (r *Resource) GetNamespace() string {
|
||||
// TODO: compute this once and save it in the resource.
|
||||
func (r *Resource) OrgId() resid.ResId {
|
||||
return resid.NewResIdWithNamespace(
|
||||
r.GetGvk(), r.GetOriginalName(), r.GetOriginalNs())
|
||||
r.kunStr.GetGvk(), r.GetOriginalName(), r.GetOriginalNs())
|
||||
}
|
||||
|
||||
// CurId returns a ResId for the resource using the
|
||||
@@ -278,7 +437,7 @@ func (r *Resource) OrgId() resid.ResId {
|
||||
// This should be unique in any ResMap.
|
||||
func (r *Resource) CurId() resid.ResId {
|
||||
return resid.NewResIdWithNamespace(
|
||||
r.GetGvk(), r.GetName(), r.GetNamespace())
|
||||
r.kunStr.GetGvk(), r.kunStr.GetName(), r.GetNamespace())
|
||||
}
|
||||
|
||||
// GetRefBy returns the ResIds that referred to current resource
|
||||
|
||||
@@ -124,6 +124,9 @@ type Kustomization struct {
|
||||
// Transformers is a list of files containing transformers
|
||||
Transformers []string `json:"transformers,omitempty" yaml:"transformers,omitempty"`
|
||||
|
||||
// Validators is a list of files containing validators
|
||||
Validators []string `json:"validators,omitempty" yaml:"validators,omitempty"`
|
||||
|
||||
// Inventory appends an object that contains the record
|
||||
// of all other objects, which can be used in apply, prune and delete
|
||||
Inventory *Inventory `json:"inventory,omitempty" yaml:"inventory,omitempty"`
|
||||
|
||||
@@ -29,4 +29,7 @@ type PluginConfig struct {
|
||||
|
||||
// BpLoadingOptions distinguishes builtin plugin behaviors.
|
||||
BpLoadingOptions BuiltinPluginLoadingOptions
|
||||
|
||||
// FnpLoadingOptions sets the way function-based plugin behaviors.
|
||||
FnpLoadingOptions FnPluginLoadingOptions
|
||||
}
|
||||
|
||||
@@ -41,3 +41,16 @@ const (
|
||||
// to generate static code.
|
||||
BploLoadFromFileSys
|
||||
)
|
||||
|
||||
// FnPluginLoadingOptions set way functions-based pluing are restricted
|
||||
type FnPluginLoadingOptions struct {
|
||||
// Allow to run executables
|
||||
EnableExec bool
|
||||
// Allow to run starlark
|
||||
EnableStar bool
|
||||
// Allow container access to network
|
||||
Network bool
|
||||
NetworkName string
|
||||
// list of mounts
|
||||
Mounts []string
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ var (
|
||||
Count = commands.CountCommand
|
||||
CreateSetter = commands.CreateSetterCommand
|
||||
CreateSubstitution = commands.CreateSubstitutionCommand
|
||||
DeleteSetter = commands.DeleteSetterCommand
|
||||
Fmt = commands.FmtCommand
|
||||
Grep = commands.GrepCommand
|
||||
Init = commands.InitCommand
|
||||
|
||||
@@ -7,7 +7,7 @@ containers that can be chained together as part of a configuration management pi
|
||||
The end result of such a pipeline are fully rendered configurations that can then be
|
||||
applied to a control plane (e.g. Using ‘kubectl apply’ for Kubernetes control plane).
|
||||
As such, although this document references Kubernetes Resource Model and API conventions,
|
||||
it is completely decoupled from Kuberentes API machinery and does not depend on any
|
||||
it is completely decoupled from Kubernetes API machinery and does not depend on any
|
||||
in-cluster components.
|
||||
|
||||
This document references terms described in [Kubernetes API Conventions][1].
|
||||
@@ -33,7 +33,7 @@ _Configuration functions_ enable shift-left practices (client-side) through:
|
||||
Performing these on the client rather than the server enables:
|
||||
|
||||
- Configuration to be reviewed prior to being sent to the API server
|
||||
- Configuration to be validated as part of the CI?CD pipeline
|
||||
- Configuration to be validated as part of the CI/CD pipeline
|
||||
- Configuration for Resources to validated holistically rather than individually
|
||||
per-Resource
|
||||
- e.g. ensure the `Service.selector` and `Deployment.spec.template` labels
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/config
|
||||
|
||||
go 1.13
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/go-errors/errors v1.0.1
|
||||
|
||||
@@ -553,6 +553,8 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71 h1:Xe2gvTZUJpsvOWUnvmL/tmhVBZUmHSvLbMjRj6NUUKo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
||||
@@ -50,6 +50,8 @@ func NewCreateSetterRunner(parent string) *CreateSetterRunner {
|
||||
set.Flags().MarkHidden("partial")
|
||||
set.Flags().StringVar(&setterVersion, "version", "",
|
||||
"use this version of the setter format")
|
||||
set.Flags().BoolVar(&r.CreateSetter.Required, "required", false,
|
||||
"indicates that this setter must be set by package consumer before live apply/preview")
|
||||
set.Flags().StringVar(&r.CreateSetter.SchemaPath, "schema-path", "",
|
||||
`openAPI schema file path for setter constraints -- file content `+
|
||||
`e.g. {"type": "string", "maxLength": 15, "enum": ["allowedValue1", "allowedValue2"]}`)
|
||||
@@ -91,7 +93,9 @@ func (r *CreateSetterRunner) preRunE(c *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if setterVersion == "" {
|
||||
if len(args) < 2 || !c.Flag("value").Changed && len(args) < 3 {
|
||||
if len(args) == 2 && r.Set.SetPartialField.Type == "array" && c.Flag("field").Changed {
|
||||
setterVersion = "v2"
|
||||
} else if len(args) < 2 || !c.Flag("value").Changed && len(args) < 3 {
|
||||
setterVersion = "v1"
|
||||
} else if err := initSetterVersion(c, args); err != nil {
|
||||
return err
|
||||
@@ -124,6 +128,12 @@ func (r *CreateSetterRunner) preRunE(c *cobra.Command, args []string) error {
|
||||
r.CreateSetter.Description = r.Set.SetPartialField.Description
|
||||
r.CreateSetter.SetBy = r.Set.SetPartialField.SetBy
|
||||
r.CreateSetter.Type = r.Set.SetPartialField.Type
|
||||
|
||||
if r.CreateSetter.Type == "array" {
|
||||
if !c.Flag("field").Changed {
|
||||
return errors.Errorf("field flag must be set for array type setters")
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -65,6 +65,44 @@ spec:
|
||||
replicas: 3 # {"$openapi":"replicas"}
|
||||
`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "add replicas no match",
|
||||
args: []string{"replicas", "3", "--description", "hello world", "--set-by", "me"},
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
foo: 2
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
`,
|
||||
expectedOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.replicas:
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "3"
|
||||
setBy: me
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
foo: 2
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "error if substitution with same name exists",
|
||||
args: []string{"my-image", "3", "--description", "hello world", "--set-by", "me"},
|
||||
@@ -129,15 +167,40 @@ spec:
|
||||
},
|
||||
|
||||
{
|
||||
name: "add replicas with schema list values",
|
||||
args: []string{"list", "a", "--description", "hello world", "--set-by", "me", "--type", "array"},
|
||||
schema: `{"maxItems": 2, "type": "array", "items": {"type": "string"}}`,
|
||||
name: "list values with schema",
|
||||
args: []string{"list", "--description", "hello world", "--set-by", "me", "--type", "array", "--field", "spec.list"},
|
||||
schema: `{"maxItems": 3, "type": "array", "items": {"type": "string"}}`,
|
||||
input: `
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example
|
||||
kind: Example1
|
||||
spec:
|
||||
list:
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
---
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example2
|
||||
spec:
|
||||
list:
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
namespace: myspace
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: sidecar
|
||||
image: nginx:1.7.9
|
||||
- name: nginx
|
||||
image: otherspace/nginx:1.7.9
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
@@ -151,22 +214,128 @@ openAPI:
|
||||
io.k8s.cli.setters.list:
|
||||
items:
|
||||
type: string
|
||||
maxItems: 2
|
||||
maxItems: 3
|
||||
type: array
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: list
|
||||
value: a
|
||||
value: ""
|
||||
listValues:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
setBy: me
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example1
|
||||
spec:
|
||||
list: # {"$openapi":"list"}
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
---
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example2
|
||||
spec:
|
||||
list: # {"$openapi":"list"}
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
namespace: myspace
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: sidecar
|
||||
image: nginx:1.7.9
|
||||
- name: nginx
|
||||
image: otherspace/nginx:1.7.9
|
||||
`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "error list path with different values",
|
||||
args: []string{"list", "--description", "hello world", "--set-by", "me", "--type", "array", "--field", "spec.list"},
|
||||
schema: `{"maxItems": 3, "type": "array", "items": {"type": "string"}}`,
|
||||
input: `
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example
|
||||
spec:
|
||||
list:
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
---
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example
|
||||
spec:
|
||||
list:
|
||||
- "c"
|
||||
- "d"
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
`,
|
||||
err: `setters can only be created for fields with same values, encountered different ` +
|
||||
`array values for specified field path: [c d], [a b c]`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "list values error if field not set",
|
||||
args: []string{"list", "a", "--description", "hello world", "--set-by", "me", "--type", "array"},
|
||||
schema: `{"maxItems": 3, "type": "array", "items": {"type": "string"}}`,
|
||||
input: `
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example
|
||||
spec:
|
||||
list:
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
`,
|
||||
expectedOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.list:
|
||||
items:
|
||||
type: string
|
||||
maxItems: 3
|
||||
type: array
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: list
|
||||
listValues:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
setBy: me
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example
|
||||
spec:
|
||||
list:
|
||||
- "a" # {"$openapi":"list"}
|
||||
list: # {"$openapi":"list"}
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
`,
|
||||
err: `field flag must be set for array type setters`,
|
||||
},
|
||||
{
|
||||
name: "add replicas with value set by flag",
|
||||
|
||||
63
cmd/config/internal/commands/cmddeletesetter.go
Normal file
63
cmd/config/internal/commands/cmddeletesetter.go
Normal file
@@ -0,0 +1,63 @@
|
||||
// Copyright 2019 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package commands
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/kustomize/cmd/config/ext"
|
||||
"sigs.k8s.io/kustomize/kyaml/openapi"
|
||||
"sigs.k8s.io/kustomize/kyaml/setters2/settersutil"
|
||||
)
|
||||
|
||||
// NewDeleteRunner returns a command runner.
|
||||
func NewDeleteSetterRunner(parent string) *DeleteSetterRunner {
|
||||
r := &DeleteSetterRunner{}
|
||||
c := &cobra.Command{
|
||||
Use: "delete-setter DIR NAME",
|
||||
Args: cobra.MinimumNArgs(2),
|
||||
Short: "delete values on Resources fields.",
|
||||
Long: "",
|
||||
Example: "",
|
||||
PreRunE: r.preRunE,
|
||||
RunE: r.runE,
|
||||
}
|
||||
fixDocs(parent, c)
|
||||
r.Command = c
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
func DeleteSetterCommand(parent string) *cobra.Command {
|
||||
return NewDeleteSetterRunner(parent).Command
|
||||
}
|
||||
|
||||
type DeleteSetterRunner struct {
|
||||
Command *cobra.Command
|
||||
DeleteSetter settersutil.DeleterCreator
|
||||
OpenAPIFile string
|
||||
}
|
||||
|
||||
func (r *DeleteSetterRunner) preRunE(c *cobra.Command, args []string) error {
|
||||
var err error
|
||||
r.DeleteSetter.Name = args[1]
|
||||
|
||||
r.OpenAPIFile, err = ext.GetOpenAPIFile(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := openapi.AddSchemaFromFile(r.OpenAPIFile); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *DeleteSetterRunner) runE(c *cobra.Command, args []string) error {
|
||||
return handleError(c, r.delete(c, args))
|
||||
}
|
||||
|
||||
func (r *DeleteSetterRunner) delete(c *cobra.Command, args []string) error {
|
||||
return r.DeleteSetter.Delete(r.OpenAPIFile, args[0])
|
||||
}
|
||||
302
cmd/config/internal/commands/cmddeletesetter_test.go
Normal file
302
cmd/config/internal/commands/cmddeletesetter_test.go
Normal file
@@ -0,0 +1,302 @@
|
||||
// Copyright 2019 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package commands_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"sigs.k8s.io/kustomize/cmd/config/ext"
|
||||
"sigs.k8s.io/kustomize/cmd/config/internal/commands"
|
||||
"sigs.k8s.io/kustomize/kyaml/openapi"
|
||||
)
|
||||
|
||||
func TestDeleteSetterCommand(t *testing.T) {
|
||||
var tests = []struct {
|
||||
name string
|
||||
input string
|
||||
args []string
|
||||
schema string
|
||||
out string
|
||||
inputOpenAPI string
|
||||
expectedOpenAPI string
|
||||
expectedResources string
|
||||
err string
|
||||
}{
|
||||
{
|
||||
name: "delete replicas",
|
||||
args: []string{"replicas", "hello world"},
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3 # {"$openapi" : "replicas"}}
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.replicas:
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "3"
|
||||
setBy: me
|
||||
`,
|
||||
expectedOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "delete only one setter",
|
||||
args: []string{"replicas", "hello world"},
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3 # {"$openapi" : "replicas"}}
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.replicas:
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "3"
|
||||
setBy: me
|
||||
io.k8s.cli.setters.image:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: image
|
||||
value: 1.0
|
||||
`,
|
||||
expectedOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.image:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: image
|
||||
value: 1.0
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "delete non exist setter error",
|
||||
args: []string{"image", "hello world"},
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3 # {"$openapi" : "replicas"}}
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.replicas:
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "3"
|
||||
setBy: me
|
||||
`,
|
||||
expectedOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.replicas:
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "3"
|
||||
setBy: me
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3 # {"$openapi" : "replicas"}}
|
||||
`,
|
||||
err: `setter does not exist`,
|
||||
},
|
||||
{
|
||||
name: "delete setter used in substitution error",
|
||||
args: []string{"image-name", "hello world"},
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
`,
|
||||
inputOpenAPI: `
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.image-name:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: image-name
|
||||
value: "nginx"
|
||||
io.k8s.cli.setters.image-tag:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: image-tag
|
||||
value: "1.8.1"
|
||||
io.k8s.cli.substitutions.image:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
name: image
|
||||
pattern: IMAGE_NAME:IMAGE_TAG
|
||||
values:
|
||||
- marker: "IMAGE_NAME"
|
||||
ref: "#/definitions/io.k8s.cli.setters.image-name"
|
||||
- marker: "IMAGE_TAG"
|
||||
ref: "#/definitions/io.k8s.cli.setters.image-tag"
|
||||
`,
|
||||
expectedOpenAPI: `
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.image-name:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: image-name
|
||||
value: "nginx"
|
||||
io.k8s.cli.setters.image-tag:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: image-tag
|
||||
value: "1.8.1"
|
||||
io.k8s.cli.substitutions.image:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
name: image
|
||||
pattern: IMAGE_NAME:IMAGE_TAG
|
||||
values:
|
||||
- marker: "IMAGE_NAME"
|
||||
ref: "#/definitions/io.k8s.cli.setters.image-name"
|
||||
- marker: "IMAGE_TAG"
|
||||
ref: "#/definitions/io.k8s.cli.setters.image-tag"
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
`,
|
||||
err: `setter is used in substitution image, please delete the substitution first`,
|
||||
},
|
||||
}
|
||||
for i := range tests {
|
||||
test := tests[i]
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
// reset the openAPI afterward
|
||||
openapi.ResetOpenAPI()
|
||||
defer openapi.ResetOpenAPI()
|
||||
|
||||
f, err := ioutil.TempFile("", "k8s-cli-")
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
defer os.Remove(f.Name())
|
||||
|
||||
err = ioutil.WriteFile(f.Name(), []byte(test.inputOpenAPI), 0600)
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
old := ext.GetOpenAPIFile
|
||||
defer func() { ext.GetOpenAPIFile = old }()
|
||||
ext.GetOpenAPIFile = func(args []string) (s string, err error) {
|
||||
return f.Name(), nil
|
||||
}
|
||||
|
||||
r, err := ioutil.TempFile("", "k8s-cli-*.yaml")
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
defer os.Remove(r.Name())
|
||||
err = ioutil.WriteFile(r.Name(), []byte(test.input), 0600)
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
runner := commands.NewDeleteSetterRunner("")
|
||||
out := &bytes.Buffer{}
|
||||
runner.Command.SetOut(out)
|
||||
runner.Command.SetArgs(append([]string{r.Name()}, test.args...))
|
||||
err = runner.Command.Execute()
|
||||
if test.err != "" {
|
||||
if !assert.NotNil(t, err) {
|
||||
t.FailNow()
|
||||
} else {
|
||||
assert.Equal(t, err.Error(), test.err)
|
||||
return
|
||||
}
|
||||
}
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
if !assert.Equal(t, test.out, out.String()) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
actualResources, err := ioutil.ReadFile(r.Name())
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
if !assert.Equal(t,
|
||||
strings.TrimSpace(test.expectedResources),
|
||||
strings.TrimSpace(string(actualResources))) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
actualOpenAPI, err := ioutil.ReadFile(f.Name())
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
if !assert.Equal(t,
|
||||
strings.TrimSpace(test.expectedOpenAPI),
|
||||
strings.TrimSpace(string(actualOpenAPI))) {
|
||||
t.FailNow()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@ func NewListSettersRunner(parent string) *ListSettersRunner {
|
||||
}
|
||||
c.Flags().BoolVar(&r.Markdown, "markdown", false,
|
||||
"output as github markdown")
|
||||
c.Flags().BoolVar(&r.IncludeSubst, "include-subst", false,
|
||||
"include substitutions in the output")
|
||||
fixDocs(parent, c)
|
||||
r.Command = c
|
||||
return r
|
||||
@@ -42,10 +44,11 @@ func ListSettersCommand(parent string) *cobra.Command {
|
||||
}
|
||||
|
||||
type ListSettersRunner struct {
|
||||
Command *cobra.Command
|
||||
Lookup setters.LookupSetters
|
||||
List setters2.List
|
||||
Markdown bool
|
||||
Command *cobra.Command
|
||||
Lookup setters.LookupSetters
|
||||
List setters2.List
|
||||
Markdown bool
|
||||
IncludeSubst bool
|
||||
}
|
||||
|
||||
func (r *ListSettersRunner) preRunE(c *cobra.Command, args []string) error {
|
||||
@@ -63,7 +66,10 @@ func (r *ListSettersRunner) runE(c *cobra.Command, args []string) error {
|
||||
if err := r.ListSetters(c, args); err != nil {
|
||||
return err
|
||||
}
|
||||
return r.ListSubstitutions(c, args)
|
||||
if r.IncludeSubst {
|
||||
return r.ListSubstitutions(c, args)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
return handleError(c, lookup(r.Lookup, c, args))
|
||||
@@ -79,7 +85,7 @@ func (r *ListSettersRunner) ListSetters(c *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
table := newTable(c.OutOrStdout(), r.Markdown)
|
||||
table.SetHeader([]string{"NAME", "VALUE", "SET BY", "DESCRIPTION", "COUNT"})
|
||||
table.SetHeader([]string{"NAME", "VALUE", "SET BY", "DESCRIPTION", "COUNT", "REQUIRED"})
|
||||
for i := range r.List.Setters {
|
||||
s := r.List.Setters[i]
|
||||
v := s.Value
|
||||
@@ -89,8 +95,14 @@ func (r *ListSettersRunner) ListSetters(c *cobra.Command, args []string) error {
|
||||
v = strings.Join(s.ListValues, ",")
|
||||
v = fmt.Sprintf("[%s]", v)
|
||||
}
|
||||
var required string
|
||||
if s.Required {
|
||||
required = "Yes"
|
||||
} else {
|
||||
required = "No"
|
||||
}
|
||||
table.Append([]string{
|
||||
s.Name, v, s.SetBy, s.Description, fmt.Sprintf("%d", s.Count)})
|
||||
s.Name, v, s.SetBy, s.Description, fmt.Sprintf("%d", s.Count), required})
|
||||
}
|
||||
table.Render()
|
||||
|
||||
@@ -113,17 +125,23 @@ func (r *ListSettersRunner) ListSubstitutions(c *cobra.Command, args []string) e
|
||||
return err
|
||||
}
|
||||
table := newTable(c.OutOrStdout(), r.Markdown)
|
||||
table.SetHeader([]string{"SUBSTITUTION", "PATTERN", "SETTERS"})
|
||||
b := tablewriter.Border{Top: true}
|
||||
table.SetBorders(b)
|
||||
|
||||
table.SetHeader([]string{"SUBSTITUTION", "PATTERN", "REFERENCES"})
|
||||
for i := range r.List.Substitutions {
|
||||
s := r.List.Substitutions[i]
|
||||
setters := ""
|
||||
refs := ""
|
||||
for _, value := range s.Values {
|
||||
setter := strings.TrimPrefix(value.Ref, fieldmeta.DefinitionsPrefix+fieldmeta.SetterDefinitionPrefix)
|
||||
setters = setters + "," + setter
|
||||
// trim setter and substitution prefixes
|
||||
ref := strings.TrimPrefix(
|
||||
strings.TrimPrefix(value.Ref, fieldmeta.DefinitionsPrefix+fieldmeta.SetterDefinitionPrefix),
|
||||
fieldmeta.DefinitionsPrefix+fieldmeta.SubstitutionDefinitionPrefix)
|
||||
refs = refs + "," + ref
|
||||
}
|
||||
setters = fmt.Sprintf("[%s]", strings.TrimPrefix(setters, ","))
|
||||
refs = fmt.Sprintf("[%s]", strings.TrimPrefix(refs, ","))
|
||||
table.Append([]string{
|
||||
s.Name, s.Pattern, setters})
|
||||
s.Name, s.Pattern, refs})
|
||||
}
|
||||
if len(r.List.Substitutions) == 0 {
|
||||
return nil
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -34,6 +35,7 @@ openAPI:
|
||||
name: replicas
|
||||
value: "3"
|
||||
setBy: me
|
||||
required: true
|
||||
description: "hello world"
|
||||
`,
|
||||
input: `
|
||||
@@ -44,12 +46,39 @@ metadata:
|
||||
spec:
|
||||
replicas: 3 # {"$ref": "#/definitions/io.k8s.cli.setters.replicas"}
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT
|
||||
replicas 3 me hello world 1
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
replicas 3 me hello world 1 Yes
|
||||
`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "list-replicas inconsistent with openapi",
|
||||
openapi: `
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.replicas:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "4"
|
||||
setBy: me
|
||||
description: "hello world"
|
||||
`,
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3 # {"$ref": "#/definitions/io.k8s.cli.setters.replicas"}
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
replicas 4 me hello world 1 No
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "list-multiple",
|
||||
args: []string{"--include-subst"},
|
||||
openapi: `
|
||||
openAPI:
|
||||
definitions:
|
||||
@@ -74,6 +103,8 @@ openAPI:
|
||||
name: tag
|
||||
value: "1.7.9"
|
||||
setBy: me3
|
||||
required: true
|
||||
isSet: false
|
||||
io.k8s.cli.substitutions.image:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
@@ -100,16 +131,18 @@ spec:
|
||||
- name: nginx2
|
||||
image: nginx # {"$ref": "#/definitions/io.k8s.cli.setters.image"}
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT
|
||||
image nginx me2 hello world 2 2
|
||||
replicas 3 me1 hello world 1 1
|
||||
tag 1.7.9 me3 hello world 3 1
|
||||
SUBSTITUTION PATTERN SETTERS
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
image nginx me2 hello world 2 2 No
|
||||
replicas 3 me1 hello world 1 1 No
|
||||
tag 1.7.9 me3 hello world 3 1 Yes
|
||||
--------------- ----------- --------------
|
||||
SUBSTITUTION PATTERN REFERENCES
|
||||
image IMAGE:TAG [image,tag]
|
||||
`,
|
||||
},
|
||||
{
|
||||
name: "list-multiple-resources",
|
||||
args: []string{"--include-subst"},
|
||||
openapi: `
|
||||
openAPI:
|
||||
definitions:
|
||||
@@ -174,11 +207,12 @@ spec:
|
||||
- name: nginx2
|
||||
image: nginx
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT
|
||||
image nginx me2 hello world 2 3
|
||||
replicas 3 me1 hello world 1 2
|
||||
tag 1.7.9 me3 hello world 3 2
|
||||
SUBSTITUTION PATTERN SETTERS
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
image nginx me2 hello world 2 3 No
|
||||
replicas 3 me1 hello world 1 2 No
|
||||
tag 1.7.9 me3 hello world 3 2 No
|
||||
--------------- ----------- --------------
|
||||
SUBSTITUTION PATTERN REFERENCES
|
||||
image IMAGE:TAG [image,tag]
|
||||
`,
|
||||
},
|
||||
@@ -202,6 +236,7 @@ openAPI:
|
||||
name: image
|
||||
value: "nginx"
|
||||
setBy: me2
|
||||
required: true
|
||||
io.k8s.cli.setters.tag:
|
||||
description: "hello world 3"
|
||||
x-k8s-cli:
|
||||
@@ -209,10 +244,10 @@ openAPI:
|
||||
name: tag
|
||||
value: "1.7.9"
|
||||
setBy: me3
|
||||
io.k8s.cli.substitutions.image:
|
||||
io.k8s.cli.substitutions.image-subst:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
name: image
|
||||
name: image-subst
|
||||
pattern: IMAGE:TAG
|
||||
values:
|
||||
- marker: IMAGE
|
||||
@@ -231,7 +266,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.7.9 # {"$ref": "#/definitions/io.k8s.cli.substitutions.image"}
|
||||
image: nginx:1.7.9 # {"$ref": "#/definitions/io.k8s.cli.substitutions.image-subst"}
|
||||
- name: nginx2
|
||||
image: nginx # {"$ref": "#/definitions/io.k8s.cli.setters.image"}
|
||||
---
|
||||
@@ -245,14 +280,124 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.7.9 # {"$ref": "#/definitions/io.k8s.cli.substitutions.image"}
|
||||
image: nginx:1.7.9 # {"$ref": "#/definitions/io.k8s.cli.substitutions.image-subst"}
|
||||
- name: nginx2
|
||||
image: nginx
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT
|
||||
image nginx me2 hello world 2 3
|
||||
SUBSTITUTION PATTERN SETTERS
|
||||
image IMAGE:TAG [image,tag]
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
image nginx me2 hello world 2 3 Yes
|
||||
`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "list array setter",
|
||||
openapi: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.list:
|
||||
items:
|
||||
type: string
|
||||
maxItems: 3
|
||||
type: array
|
||||
description: hello world
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: list
|
||||
listValues:
|
||||
- a
|
||||
- b
|
||||
- c
|
||||
setBy: me
|
||||
required: true
|
||||
`,
|
||||
input: `
|
||||
apiVersion: example.com/v1beta1
|
||||
kind: Example
|
||||
metadata:
|
||||
annotations:
|
||||
foo: bar
|
||||
spec:
|
||||
list: # {"$openapi":"list"}
|
||||
- "a"
|
||||
- "b"
|
||||
- "c"
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
list [a,b,c] me hello world 1 Yes
|
||||
`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "nested substitution",
|
||||
args: []string{"--include-subst"},
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: something/nginx::1.7.9/nginxotherthing # {"$openapi":"my-nested-subst"}
|
||||
- name: sidecar
|
||||
image: nginx::1.7.9 # {"$openapi":"my-image-subst"}
|
||||
`,
|
||||
openapi: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.my-image-setter:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: my-image-setter
|
||||
value: nginx
|
||||
io.k8s.cli.setters.my-tag-setter:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: my-tag-setter
|
||||
value: 1.7.9
|
||||
required: true
|
||||
isSet: true
|
||||
io.k8s.cli.substitutions.my-image-subst:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
name: my-image-subst
|
||||
pattern: ${my-image-setter}::${my-tag-setter}
|
||||
values:
|
||||
- marker: ${my-image-setter}
|
||||
ref: '#/definitions/io.k8s.cli.setters.my-image-setter'
|
||||
- marker: ${my-tag-setter}
|
||||
ref: '#/definitions/io.k8s.cli.setters.my-tag-setter'
|
||||
io.k8s.cli.substitutions.my-nested-subst:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
name: my-nested-subst
|
||||
pattern: something/${my-image-subst}/${my-other-setter}
|
||||
values:
|
||||
- marker: ${my-image-subst}
|
||||
ref: '#/definitions/io.k8s.cli.substitutions.my-image-subst'
|
||||
- marker: ${my-other-setter}
|
||||
ref: '#/definitions/io.k8s.cli.setters.my-other-setter'
|
||||
io.k8s.cli.setters.my-other-setter:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: my-other-setter
|
||||
value: nginxotherthing
|
||||
`,
|
||||
expected: ` NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
my-image-setter nginx 2 No
|
||||
my-other-setter nginxotherthing 1 No
|
||||
my-tag-setter 1.7.9 2 Yes
|
||||
------------------ ------------------------------------------------ -----------------------------------
|
||||
SUBSTITUTION PATTERN REFERENCES
|
||||
my-image-subst ${my-image-setter}::${my-tag-setter} [my-image-setter,my-tag-setter]
|
||||
my-nested-subst something/${my-image-subst}/${my-other-setter} [my-image-subst,my-other-setter]
|
||||
`,
|
||||
},
|
||||
}
|
||||
@@ -300,6 +445,27 @@ spec:
|
||||
if !assert.Equal(t, test.expected, actual.String()) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
// make sure that the resources are not altered
|
||||
actualResources, err := ioutil.ReadFile(r.Name())
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
if !assert.Equal(t,
|
||||
strings.TrimSpace(test.input),
|
||||
strings.TrimSpace(string(actualResources))) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
actualOpenAPI, err := ioutil.ReadFile(f.Name())
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
if !assert.Equal(t,
|
||||
strings.TrimSpace(test.openapi),
|
||||
strings.TrimSpace(string(actualOpenAPI))) {
|
||||
t.FailNow()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ openAPI:
|
||||
name: replicas
|
||||
value: "4"
|
||||
setBy: pw
|
||||
isSet: true
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
@@ -158,6 +159,7 @@ openAPI:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "4"
|
||||
isSet: true
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
@@ -168,6 +170,7 @@ spec:
|
||||
replicas: 4 # {"$ref":"#/definitions/io.k8s.cli.setters.replicas"}
|
||||
`,
|
||||
},
|
||||
|
||||
{
|
||||
name: "set image with value",
|
||||
args: []string{"tag", "1.8.1"},
|
||||
@@ -228,6 +231,7 @@ openAPI:
|
||||
setter:
|
||||
name: tag
|
||||
value: "1.8.1"
|
||||
isSet: true
|
||||
io.k8s.cli.substitutions.image:
|
||||
x-k8s-cli:
|
||||
substitution:
|
||||
@@ -538,6 +542,7 @@ openAPI:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "4"
|
||||
isSet: true
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: apps/v1
|
||||
@@ -638,6 +643,7 @@ openAPI:
|
||||
listValues:
|
||||
- "10"
|
||||
- "11"
|
||||
isSet: true
|
||||
`,
|
||||
expectedResources: `
|
||||
apiVersion: example.com/v1beta1
|
||||
@@ -770,6 +776,7 @@ openAPI:
|
||||
setter:
|
||||
name: my-image-setter
|
||||
value: ubuntu
|
||||
isSet: true
|
||||
io.k8s.cli.setters.my-tag-setter:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
|
||||
@@ -30,6 +30,7 @@ func TestRunE2e(t *testing.T) {
|
||||
expectedErr string
|
||||
skipIfFalseEnv string
|
||||
}{
|
||||
|
||||
{
|
||||
name: "exec_function_no_args",
|
||||
args: func(d string) []string {
|
||||
@@ -63,6 +64,36 @@ metadata:
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "exec_function_no_args_json",
|
||||
args: func(d string) []string {
|
||||
return []string{
|
||||
"--enable-exec", "--exec-path", filepath.Join(d, "e2econtainerconfig"),
|
||||
}
|
||||
},
|
||||
files: func(d string) map[string]string {
|
||||
return map[string]string{
|
||||
"deployment.json": `
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"name": "foo"
|
||||
}
|
||||
}
|
||||
`,
|
||||
}
|
||||
},
|
||||
expectedFiles: func(d string) map[string]string {
|
||||
return map[string]string{
|
||||
"deployment.json": `
|
||||
{"apiVersion": "apps/v1", "kind": "Deployment", "metadata": {"name": "foo", annotations: {
|
||||
a-string-value: '', a-int-value: '0', a-bool-value: 'false'}}}
|
||||
`,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "exec_function_args",
|
||||
args: func(d string) []string {
|
||||
@@ -468,7 +499,6 @@ def run(r, fc):
|
||||
resource["metadata"]["annotations"]["a-string-value"] = fc["data"]["stringValue"]
|
||||
resource["metadata"]["annotations"]["a-int-value"] = fc["data"]["intValue"]
|
||||
resource["metadata"]["annotations"]["a-bool-value"] = fc["data"]["boolValue"]
|
||||
|
||||
run(ctx.resource_list["items"], ctx.resource_list["functionConfig"])
|
||||
`,
|
||||
"config.yaml": `
|
||||
@@ -545,7 +575,6 @@ def run(r, fc):
|
||||
resource["metadata"]["annotations"]["a-string-value"] = fc["data"]["stringValue"]
|
||||
resource["metadata"]["annotations"]["a-int-value"] = fc["data"]["intValue"]
|
||||
resource["metadata"]["annotations"]["a-bool-value"] = fc["data"]["boolValue"]
|
||||
|
||||
run(ctx.resource_list["items"], ctx.resource_list["functionConfig"])
|
||||
`,
|
||||
"deployment.yaml": `
|
||||
|
||||
@@ -34,8 +34,8 @@ openAPI:
|
||||
`,
|
||||
},
|
||||
expectedStdOut: `
|
||||
NAME VALUE SET BY DESCRIPTION COUNT
|
||||
replicas 3 1
|
||||
NAME VALUE SET BY DESCRIPTION COUNT REQUIRED
|
||||
replicas 3 1 No
|
||||
`,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ openAPI:
|
||||
setter:
|
||||
name: replicas
|
||||
value: "4"
|
||||
isSet: true
|
||||
`,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -31,8 +31,8 @@ func GetGrepRunner(name string) *GrepRunner {
|
||||
"also print resources from subpackages.")
|
||||
c.Flags().BoolVar(&r.KeepAnnotations, "annotate", true,
|
||||
"annotate resources with their file origins.")
|
||||
c.Flags().BoolVarP(&r.InvertMatch, "invert-match", "v", false,
|
||||
" Selected Resources are those not matching any of the specified patterns..")
|
||||
c.Flags().BoolVarP(&r.InvertMatch, "invert-match", "", false,
|
||||
"Selected Resources are those not matching any of the specified patterns..")
|
||||
|
||||
r.Command = c
|
||||
return r
|
||||
|
||||
@@ -136,6 +136,51 @@ spec:
|
||||
}
|
||||
}
|
||||
|
||||
func TestSinkCommandJSON(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "kustomize-source-test")
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
defer os.RemoveAll(d)
|
||||
|
||||
r := commands.GetSinkRunner("")
|
||||
r.Command.SetIn(bytes.NewBufferString(`apiVersion: config.kubernetes.io/v1alpha1
|
||||
kind: ResourceList
|
||||
items:
|
||||
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0',
|
||||
config.kubernetes.io/path: 'f1.json'}}, "spec": {"replicas": 1}}
|
||||
`))
|
||||
r.Command.SetArgs([]string{d})
|
||||
if !assert.NoError(t, r.Command.Execute()) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
actual, err := ioutil.ReadFile(filepath.Join(d, "f1.json"))
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
expected := `{
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"app": "nginx2"
|
||||
},
|
||||
"labels": {
|
||||
"app": "nginx2"
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1
|
||||
}
|
||||
}
|
||||
`
|
||||
if !assert.Equal(t, expected, string(actual)) {
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
func TestSinkCommand_Stdout(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "kustomize-source-test")
|
||||
if !assert.NoError(t, err) {
|
||||
@@ -249,3 +294,49 @@ spec:
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
func TestSinkCommandJSON_Stdout(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "kustomize-source-test")
|
||||
if !assert.NoError(t, err) {
|
||||
t.FailNow()
|
||||
}
|
||||
defer os.RemoveAll(d)
|
||||
|
||||
// fmt the files
|
||||
out := &bytes.Buffer{}
|
||||
r := commands.GetSinkRunner("")
|
||||
r.Command.SetIn(bytes.NewBufferString(`apiVersion: config.kubernetes.io/v1alpha1
|
||||
kind: ResourceList
|
||||
items:
|
||||
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0',
|
||||
config.kubernetes.io/path: 'f1.json'}}, "spec": {"replicas": 1}}
|
||||
`))
|
||||
|
||||
r.Command.SetOut(out)
|
||||
r.Command.SetArgs([]string{})
|
||||
if !assert.NoError(t, r.Command.Execute()) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
expected := `{
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"app": "nginx2"
|
||||
},
|
||||
"labels": {
|
||||
"app": "nginx2"
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1
|
||||
}
|
||||
}
|
||||
`
|
||||
if !assert.Equal(t, expected, out.String()) {
|
||||
println(out.String())
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (r *SourceRunner) runE(c *cobra.Command, args []string) error {
|
||||
|
||||
var inputs []kio.Reader
|
||||
for _, a := range args {
|
||||
inputs = append(inputs, kio.LocalPackageReader{PackagePath: a})
|
||||
inputs = append(inputs, kio.LocalPackageReader{PackagePath: a, MatchFilesGlob: kio.MatchAll})
|
||||
}
|
||||
if len(inputs) == 0 {
|
||||
inputs = []kio.Reader{&kio.ByteReader{Reader: c.InOrStdin()}}
|
||||
|
||||
@@ -135,6 +135,77 @@ items:
|
||||
}
|
||||
}
|
||||
|
||||
func TestSourceCommandJSON(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "kustomize-source-test")
|
||||
if !assert.NoError(t, err) {
|
||||
return
|
||||
}
|
||||
defer os.RemoveAll(d)
|
||||
|
||||
err = ioutil.WriteFile(filepath.Join(d, "f1.json"), []byte(`
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "nginx2"
|
||||
},
|
||||
"name": "foo",
|
||||
"annotations": {
|
||||
"app": "nginx2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1
|
||||
}
|
||||
}
|
||||
`), 0600)
|
||||
if !assert.NoError(t, err) {
|
||||
return
|
||||
}
|
||||
err = ioutil.WriteFile(filepath.Join(d, "f2.json"), []byte(`
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Abstraction",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"annotations": {
|
||||
"config.kubernetes.io/function": "container:\n image: gcr.io/example/reconciler:v1\n",
|
||||
"config.kubernetes.io/local-config": "true"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 3
|
||||
}
|
||||
}
|
||||
`), 0600)
|
||||
if !assert.NoError(t, err) {
|
||||
return
|
||||
}
|
||||
|
||||
// fmt the files
|
||||
b := &bytes.Buffer{}
|
||||
r := commands.GetSourceRunner("")
|
||||
r.Command.SetArgs([]string{d})
|
||||
r.Command.SetOut(b)
|
||||
if !assert.NoError(t, r.Command.Execute()) {
|
||||
return
|
||||
}
|
||||
|
||||
if !assert.Equal(t, `apiVersion: config.kubernetes.io/v1alpha1
|
||||
kind: ResourceList
|
||||
items:
|
||||
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0', config.kubernetes.io/path: 'f1.json'}},
|
||||
"spec": {"replicas": 1}}
|
||||
- {"apiVersion": "v1", "kind": "Abstraction", "metadata": {"name": "foo", "annotations": {
|
||||
"config.kubernetes.io/function": "container:\n image: gcr.io/example/reconciler:v1\n",
|
||||
"config.kubernetes.io/local-config": "true", config.kubernetes.io/index: '0',
|
||||
config.kubernetes.io/path: 'f2.json'}}, "spec": {"replicas": 3}}
|
||||
`, b.String()) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestSourceCommand_Stdin(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "kustomize-source-test")
|
||||
if !assert.NoError(t, err) {
|
||||
@@ -198,3 +269,48 @@ items:
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func TestSourceCommandJSON_Stdin(t *testing.T) {
|
||||
d, err := ioutil.TempDir("", "kustomize-source-test")
|
||||
if !assert.NoError(t, err) {
|
||||
return
|
||||
}
|
||||
defer os.RemoveAll(d)
|
||||
|
||||
in := bytes.NewBufferString(`
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "nginx2"
|
||||
},
|
||||
"name": "foo",
|
||||
"annotations": {
|
||||
"app": "nginx2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1
|
||||
}
|
||||
}
|
||||
`)
|
||||
|
||||
out := &bytes.Buffer{}
|
||||
r := commands.GetSourceRunner("")
|
||||
r.Command.SetArgs([]string{})
|
||||
r.Command.SetIn(in)
|
||||
r.Command.SetOut(out)
|
||||
if !assert.NoError(t, r.Command.Execute()) {
|
||||
return
|
||||
}
|
||||
|
||||
if !assert.Equal(t, `apiVersion: config.kubernetes.io/v1alpha1
|
||||
kind: ResourceList
|
||||
items:
|
||||
- {"kind": "Deployment", "metadata": {"labels": {"app": "nginx2"}, "name": "foo",
|
||||
"annotations": {"app": "nginx2", config.kubernetes.io/index: '0'}}, "spec": {
|
||||
"replicas": 1}}
|
||||
`, out.String()) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ containers that can be chained together as part of a configuration management pi
|
||||
The end result of such a pipeline are fully rendered configurations that can then be
|
||||
applied to a control plane (e.g. Using ‘kubectl apply’ for Kubernetes control plane).
|
||||
As such, although this document references Kubernetes Resource Model and API conventions,
|
||||
it is completely decoupled from Kuberentes API machinery and does not depend on any
|
||||
it is completely decoupled from Kubernetes API machinery and does not depend on any
|
||||
in-cluster components.
|
||||
|
||||
This document references terms described in [Kubernetes API Conventions][1].
|
||||
@@ -267,7 +267,7 @@ interpreted as described in [RFC 2119][2].
|
||||
Performing these on the client rather than the server enables:
|
||||
|
||||
- Configuration to be reviewed prior to being sent to the API server
|
||||
- Configuration to be validated as part of the CI?CD pipeline
|
||||
- Configuration to be validated as part of the CI/CD pipeline
|
||||
- Configuration for Resources to validated holistically rather than individually
|
||||
per-Resource
|
||||
- e.g. ensure the ` + "`" + `Service.selector` + "`" + ` and ` + "`" + `Deployment.spec.template` + "`" + ` labels
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module sigs.k8s.io/kustomize/cmd/mdtogo
|
||||
|
||||
go 1.13
|
||||
go 1.14
|
||||
|
||||
3
docs/404.html
Normal file
3
docs/404.html
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
||||
58
docs/FAQ.md
58
docs/FAQ.md
@@ -1,58 +1,2 @@
|
||||
# FAQ
|
||||
|
||||
## security: file 'foo' is not in or below 'bar'
|
||||
|
||||
v2.0 added a security check that prevents
|
||||
kustomizations from reading files outside their own
|
||||
directory root.
|
||||
|
||||
This was meant to help protect the person inclined to
|
||||
download kustomization directories from the web and use
|
||||
them without inspection to control their production
|
||||
cluster
|
||||
(see [#693](/../../issues/693),
|
||||
[#700](/../../pull/700),
|
||||
[#995](/../../pull/995) and
|
||||
[#998](/../../pull/998))
|
||||
|
||||
Resources (including configmap and secret generators)
|
||||
can _still be shared_ via the recommended best practice
|
||||
of placing them in a directory with their own
|
||||
kustomization file, and referring to this directory as a
|
||||
[`base`](glossary.md#base) from any kustomization that
|
||||
wants to use it. This encourages modularity and
|
||||
relocatability.
|
||||
|
||||
To disable this, use v3, and the `load_restrictor` flag:
|
||||
|
||||
```
|
||||
kustomize build --load_restrictor none $target
|
||||
```
|
||||
|
||||
## Some field is not transformed by kustomize
|
||||
|
||||
Example: [#1319](/../../issues/1319), [#1322](/../../issues/1322), [#1347](/../../issues/1347) and etc.
|
||||
|
||||
The fields transformed by kustomize is configured explicitly in [defaultconfig](/api/konfig/builtinpluginconsts/defaultconfig.go). The configuration itself can be customized by including `configurations` in `kustomization.yaml`, e.g.
|
||||
|
||||
```yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
configurations:
|
||||
- kustomizeconfig.yaml
|
||||
```
|
||||
|
||||
The configuration directive allows customization of the following transformers:
|
||||
|
||||
```yaml
|
||||
commonAnnotations: []
|
||||
commonLabels: []
|
||||
nameprefix: []
|
||||
namespace: []
|
||||
varreference: []
|
||||
namereference: []
|
||||
images: []
|
||||
replicas: []
|
||||
```
|
||||
|
||||
To persist the changes to default configuration, submit a PR like [#1338](/../../pull/1338), [#1348](/../../pull/1348) and etc.
|
||||
Moved to [https://kubernetes-sigs.github.io/kustomize](https://kubernetes-sigs.github.io/kustomize/faq)
|
||||
|
||||
@@ -1,90 +1,2 @@
|
||||
[release page]: /../../releases
|
||||
[Go]: https://golang.org
|
||||
[script]: https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh
|
||||
[quickly]: https://www.arp242.net/curl-to-sh.html
|
||||
|
||||
# Installation
|
||||
|
||||
Binaries at various versions for linux, macOs and Windows
|
||||
are available for manual download on the [release page].
|
||||
|
||||
To do this [quickly], run:
|
||||
|
||||
```
|
||||
curl -s "https://raw.githubusercontent.com/\
|
||||
kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
||||
```
|
||||
|
||||
This [script]
|
||||
- attempts to detect your OS,
|
||||
- downloads and unpacks the release tar file in a temporary directory,
|
||||
- copies the kustomize binary (and only that file) to your current working directory,
|
||||
- removes the temporary directory.
|
||||
|
||||
## Try `go`
|
||||
|
||||
This method is more to show off how the `go` tool works,
|
||||
than for any practical purpose. A kustomize developer should
|
||||
clone the repo (see next section), and CI/CD scripts should
|
||||
download a specific ready-to-run executable rather than
|
||||
rely on the `go` tool.
|
||||
|
||||
Install the latest kustomize binary in the v3 series to `$GOPATH/bin`:
|
||||
```
|
||||
GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v3
|
||||
```
|
||||
|
||||
Install a specific version:
|
||||
```
|
||||
GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3@v3.3.0
|
||||
```
|
||||
|
||||
## Build the kustomize CLI from local source
|
||||
```
|
||||
# Need go 1.13 or higher
|
||||
unset GOPATH
|
||||
# see https://golang.org/doc/go1.13#modules
|
||||
unset GO111MODULES
|
||||
|
||||
# clone the repo
|
||||
git clone git@github.com:kubernetes-sigs/kustomize.git
|
||||
# get into the repo root
|
||||
cd kustomize
|
||||
|
||||
# Optionally checkout a particular tag if you don't
|
||||
# want to build at head
|
||||
git checkout kustomize/v3.2.3
|
||||
|
||||
# build the binary
|
||||
(cd kustomize; go install .)
|
||||
|
||||
# run it
|
||||
~/go/bin/kustomize version
|
||||
```
|
||||
|
||||
### Other methods
|
||||
|
||||
#### macOS
|
||||
|
||||
For [Homebrew](https://brew.sh) users:
|
||||
|
||||
```
|
||||
brew install kustomize
|
||||
```
|
||||
|
||||
For [MacPorts](https://www.macports.org) users:
|
||||
|
||||
```
|
||||
sudo port install kustomize
|
||||
```
|
||||
|
||||
#### windows
|
||||
|
||||
```
|
||||
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)
|
||||
Moved to [https://kubernetes-sigs.github.io/kustomize](https://kubernetes-sigs.github.io/kustomize/installation)
|
||||
|
||||
@@ -1,67 +1,2 @@
|
||||
English | [简体中文](zh/README.md)
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Installation](INSTALL.md)
|
||||
|
||||
* [Examples](../examples) - detailed walkthroughs of various
|
||||
workflows and concepts.
|
||||
|
||||
* [Glossary](glossary.md) - the word of the day is [_root_](glossary.md#kustomization-root).
|
||||
|
||||
* [Kustomize Fields](fields.md) - explanations of the fields
|
||||
in a [kustomization](glossary.md#kustomization) file.
|
||||
|
||||
* [Plugins](plugins) - extending kustomize with
|
||||
custom generators and transformers.
|
||||
|
||||
* [Workflows](workflows.md) - steps one might take in
|
||||
using bespoke and off-the-shelf configurations.
|
||||
|
||||
* [FAQ](FAQ.md)
|
||||
|
||||
|
||||
## Release notes
|
||||
|
||||
* [kustomize/3.2.2](/../../releases/tag/kustomize%2Fv3.2.2) - kustomize CLI
|
||||
moved to depend on kustomize Go API [3.3.0](v3.3.0.md).
|
||||
|
||||
* [API 3.3.0](v3.3.0.md) - First release of the kustomize Go API
|
||||
in a module excluding the `kustomize` CLI. From here on,
|
||||
the CLI and API will release independently.
|
||||
|
||||
* [kustomize/3.2.1](/../../releases/tag/kustomize%2Fv3.2.1) - Patch release
|
||||
of `kustomize` CLI in its own module,
|
||||
depending on Go API release [3.2.0](v3.2.0.md).
|
||||
|
||||
* [3.2.0](v3.2.0.md) - September 2019. Support inline patch and `create` sub command to crate a kustomization.yaml.
|
||||
|
||||
* [3.1](v3.1.0.md) - Late July 2019. Extended patches and improved resource matching.
|
||||
|
||||
* [3.0](v3.0.0.md) - Late June 2019. Plugin developer release.
|
||||
|
||||
* [2.1](v2.1.0.md) - 18 June 2019. Plugins, ordered resources, etc.
|
||||
|
||||
* [2.0](v2.0.0.md) - Mar 2019.
|
||||
kustomize [v2.0.3] is available in [kubectl v1.14][kubectl].
|
||||
|
||||
* [1.0](v1.0.1.md) - May 2018. Initial release after development
|
||||
in the [kubectl repository].
|
||||
|
||||
|
||||
## Policies
|
||||
|
||||
* [Versioning](versioningPolicy.md) - how the code and
|
||||
the kustomization file evolve in time.
|
||||
|
||||
* [Eschewed features](eschewedFeatures.md) - why certain features
|
||||
are (currently) not supported in kustomize.
|
||||
|
||||
* [Contributing guidelines](../CONTRIBUTING.md) - please read
|
||||
before sending a PR.
|
||||
|
||||
* [Code of conduct](../code-of-conduct.md)
|
||||
|
||||
[v2.0.3]: /../../releases/tag/v2.0.3
|
||||
[kubectl]: https://kubernetes.io/blog/2019/03/25/kubernetes-1-14-release-announcement
|
||||
[kubectl repository]: https://github.com/kubernetes/kubectl
|
||||
Moved to [https://kubernetes-sigs.github.io/kustomize](https://kubernetes-sigs.github.io/kustomize)
|
||||
|
||||
1226
docs/api-reference/glossary/index.html
Normal file
1226
docs/api-reference/glossary/index.html
Normal file
File diff suppressed because it is too large
Load Diff
17
docs/api-reference/glossary/index.xml
Normal file
17
docs/api-reference/glossary/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – Glossary</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/glossary/</link>
|
||||
<description>Recent content in Glossary on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/glossary/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
874
docs/api-reference/index.html
Normal file
874
docs/api-reference/index.html
Normal file
@@ -0,0 +1,874 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>API Reference | Kustomize</title><meta property="og:title" content="API Reference" />
|
||||
<meta property="og:description" content="Reference for Kustomize client-side APIs
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="API Reference">
|
||||
<meta itemprop="description" content="Reference for Kustomize client-side APIs
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="API Reference"/>
|
||||
<meta name="twitter:description" content="Reference for Kustomize client-side APIs
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>API Reference | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=API%20Reference" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>API Reference</h1>
|
||||
<div class="lead">Reference for Kustomize client-side APIs</div>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</h5>
|
||||
<p>kustomization.yaml fields and API</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/glossary/">Glossary</a>
|
||||
</h5>
|
||||
<p>Glossary of terms</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/index.xml
Normal file
17
docs/api-reference/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – API Reference</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/</link>
|
||||
<description>Recent content in API Reference on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
891
docs/api-reference/kustomization/bases/index.html
Normal file
891
docs/api-reference/kustomization/bases/index.html
Normal file
@@ -0,0 +1,891 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>bases | Kustomize</title><meta property="og:title" content="bases" />
|
||||
<meta property="og:description" content="Add resources from a kustomization dir.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="bases">
|
||||
<meta itemprop="description" content="Add resources from a kustomization dir.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="bases"/>
|
||||
<meta name="twitter:description" content="Add resources from a kustomization dir.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>bases | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/bases/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/bases/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/bases/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=bases" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/">bases</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>bases</h1>
|
||||
<div class="lead">Add resources from a kustomization dir.</div>
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-warning">
|
||||
<p>The <code>bases</code> field was deprecated in v2.1.0</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>Move entries into the <a href="/kustomize/api-reference/kustomization/resources">resources</a>
|
||||
field. This allows bases - which are still a
|
||||
<a href="/kustomize/api-reference/kustomization/glossary#base">central concept</a> - to be
|
||||
ordered relative to other input resources.</p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/bases/index.xml
Normal file
17
docs/api-reference/kustomization/bases/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – bases</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/</link>
|
||||
<description>Recent content in bases on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
925
docs/api-reference/kustomization/commonannotations/index.html
Normal file
925
docs/api-reference/kustomization/commonannotations/index.html
Normal file
@@ -0,0 +1,925 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>commonAnnotations | Kustomize</title><meta property="og:title" content="commonAnnotations" />
|
||||
<meta property="og:description" content="Add annotations to add all resources.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="commonAnnotations">
|
||||
<meta itemprop="description" content="Add annotations to add all resources.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="commonAnnotations"/>
|
||||
<meta name="twitter:description" content="Add annotations to add all resources.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>commonAnnotations | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/commonannotations/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/commonannotations/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/commonannotations/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=commonAnnotations" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<nav id="TableOfContents">
|
||||
<ul>
|
||||
<li><a href="#example">Example</a>
|
||||
<ul>
|
||||
<li><a href="#file-input">File Input</a></li>
|
||||
<li><a href="#build-output">Build Output</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/">commonAnnotations</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>commonAnnotations</h1>
|
||||
<div class="lead">Add annotations to add all resources.</div>
|
||||
<p>Add annotations to all resources. If the annotation key already is present on the resource,
|
||||
the value will be overridden.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonAnnotations</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">oncallPager</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">800-555-1212</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="example">Example</h2>
|
||||
<h3 id="file-input">File Input</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">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonAnnotations</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">oncallPager</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">800-555-1212</span><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">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>- deploy.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"># deploy.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>example<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:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h3 id="build-output">Build Output</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>example<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</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">oncallPager</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">800-555-1212</span><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:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/589ddcb4faa1170e1cd549a41b11f18e146197d8">kustomize docs tweaks (589ddcb4)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/commonannotations/index.xml
Normal file
17
docs/api-reference/kustomization/commonannotations/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – commonAnnotations</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/</link>
|
||||
<description>Recent content in commonAnnotations on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
968
docs/api-reference/kustomization/commonlabels/index.html
Normal file
968
docs/api-reference/kustomization/commonlabels/index.html
Normal file
@@ -0,0 +1,968 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>commonLabels | Kustomize</title><meta property="og:title" content="commonLabels" />
|
||||
<meta property="og:description" content="Add labels and selectors to add all resources.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="commonLabels">
|
||||
<meta itemprop="description" content="Add labels and selectors to add all resources.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="commonLabels"/>
|
||||
<meta name="twitter:description" content="Add labels and selectors to add all resources.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>commonLabels | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/commonlabels/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/commonlabels/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/commonlabels/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=commonLabels" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<nav id="TableOfContents">
|
||||
<ul>
|
||||
<li><a href="#example">Example</a>
|
||||
<ul>
|
||||
<li><a href="#file-input">File Input</a></li>
|
||||
<li><a href="#build-output">Build Output</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/">commonLabels</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>commonLabels</h1>
|
||||
<div class="lead">Add labels and selectors to add all resources.</div>
|
||||
<p>Add labels and selectors to all resources. If the label key already is present on the resource,
|
||||
the value will be overridden.</p>
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-warning">
|
||||
<p>Selectors for resources such as Deployments and Services shouldn’t be changed once the
|
||||
resource has been applied to a cluster.</p>
|
||||
<p>Changing commonLabels to live resources could result in failures.</p>
|
||||
|
||||
</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:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonLabels</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">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="example">Example</h2>
|
||||
<h3 id="file-input">File Input</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">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonLabels</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">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<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">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>- deploy.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- service.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"># deploy.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>example<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"># service.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>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>Service<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>example<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h3 id="build-output">Build Output</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>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>Service<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">labels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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>example<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">selector</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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:#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">labels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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>example<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">selector</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">matchLabels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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">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">labels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/589ddcb4faa1170e1cd549a41b11f18e146197d8">kustomize docs tweaks (589ddcb4)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/commonlabels/index.xml
Normal file
17
docs/api-reference/kustomization/commonlabels/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – commonLabels</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/</link>
|
||||
<description>Recent content in commonLabels on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
881
docs/api-reference/kustomization/components/index.html
Normal file
881
docs/api-reference/kustomization/components/index.html
Normal file
@@ -0,0 +1,881 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>components | Kustomize</title><meta property="og:title" content="components" />
|
||||
<meta property="og:description" content="Compose kustomizations.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="components">
|
||||
<meta itemprop="description" content="Compose kustomizations.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="components"/>
|
||||
<meta name="twitter:description" content="Compose kustomizations.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>components | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/components/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/components/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/components/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=components" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/">components</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>components</h1>
|
||||
<div class="lead">Compose kustomizations.</div>
|
||||
<p><em>Coming soon</em></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/components/index.xml
Normal file
17
docs/api-reference/kustomization/components/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – components</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/</link>
|
||||
<description>Recent content in components on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
952
docs/api-reference/kustomization/configmapgenerator/index.html
Normal file
952
docs/api-reference/kustomization/configmapgenerator/index.html
Normal file
@@ -0,0 +1,952 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>configMapGenerator | Kustomize</title><meta property="og:title" content="configMapGenerator" />
|
||||
<meta property="og:description" content="Generate ConfigMap resources.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="configMapGenerator">
|
||||
<meta itemprop="description" content="Generate ConfigMap resources.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="configMapGenerator"/>
|
||||
<meta name="twitter:description" content="Generate ConfigMap resources.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>configMapGenerator | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/configmapgenerator/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/configmapgenerator/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/configmapgenerator/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=configMapGenerator" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/">configMapGenerator</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>configMapGenerator</h1>
|
||||
<div class="lead">Generate ConfigMap resources.</div>
|
||||
<p>Each entry in this list results in the creation of
|
||||
one ConfigMap resource (it’s a generator of n maps).</p>
|
||||
<p>The example below creates four ConfigMaps:</p>
|
||||
<ul>
|
||||
<li>first, with the names and contents of the given files</li>
|
||||
<li>second, with key/value as data using key/value pairs from files</li>
|
||||
<li>third, also with key/value as data, directly specified using <code>literals</code></li>
|
||||
<li>and a fourth, which sets an annotation and label via <code>options</code> for that single ConfigMap</li>
|
||||
</ul>
|
||||
<p>Each configMapGenerator item accepts a parameter of
|
||||
<code>behavior: [create|replace|merge]</code>.
|
||||
This allows an overlay to modify or
|
||||
replace an existing configMap from the parent.</p>
|
||||
<p>Also, each entry has an <code>options</code> field, that has the
|
||||
same subfields as the kustomization file’s <code>generatorOptions</code> field.</p>
|
||||
<p>This <code>options</code> field allows one to add labels and/or
|
||||
annotations to the generated instance, or to individually
|
||||
disable the name suffix hash for that instance.
|
||||
Labels and annotations added here will not be overwritten
|
||||
by the global options associated with the kustomization
|
||||
file <code>generatorOptions</code> field. However, due to how
|
||||
booleans behave, if the global <code>generatorOptions</code> field
|
||||
specifies <code>disableNameSuffixHash: true</code>, this will
|
||||
trump any attempt to locally override it.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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:#8f5902;font-style:italic"># These labels are added to all configmaps and secrets.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">generatorOptions</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">labels</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">fruit</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apple<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">configMapGenerator</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>my-java-server-props<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">behavior</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>merge<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- application.properties<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- more.properties<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>my-java-server-env-file-vars<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">envs</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>- my-server-env.properties<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- more-server-props.env<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>my-java-server-env-vars<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">literals</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>- JAVA_HOME=/opt/java/jdk<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- JAVA_TOOL_OPTIONS=-agentlib<span style="color:#000;font-weight:bold">:</span>hprof<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">options</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">disableNameSuffixHash</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">pet</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>dog<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>dashboards<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- mydashboard.json<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">options</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">annotations</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">dashboard</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">"1"</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">app.kubernetes.io/name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">"app1"</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>It is also possible to
|
||||
<a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-the-key-to-use-when-creating-a-configmap-from-a-file">define a key</a>
|
||||
to set a name different than the filename.</p>
|
||||
<p>The example below creates a ConfigMap
|
||||
with the name of file as <code>myFileName.ini</code>
|
||||
while the <em>actual</em> filename from which the
|
||||
configmap is created is <code>whatever.ini</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">configMapGenerator</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>app-whatever<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- myFileName.ini=whatever.ini<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – configMapGenerator</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/</link>
|
||||
<description>Recent content in configMapGenerator on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
907
docs/api-reference/kustomization/crds/index.html
Normal file
907
docs/api-reference/kustomization/crds/index.html
Normal file
@@ -0,0 +1,907 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>crds | Kustomize</title><meta property="og:title" content="crds" />
|
||||
<meta property="og:description" content="Adding CRD support
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="crds">
|
||||
<meta itemprop="description" content="Adding CRD support
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="crds"/>
|
||||
<meta name="twitter:description" content="Adding CRD support
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>crds | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/crds/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/crds/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/crds/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=crds" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/">crds</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>crds</h1>
|
||||
<div class="lead">Adding CRD support</div>
|
||||
<p>Each entry in this list should be a relative path to
|
||||
a file for custom resource definition (CRD).</p>
|
||||
<p>The presence of this field is to allow kustomize be
|
||||
aware of CRDs and apply proper
|
||||
transformation for any objects in those types.</p>
|
||||
<p>Typical use case: A CRD object refers to a
|
||||
ConfigMap object. In a kustomization, the ConfigMap
|
||||
object name may change by adding namePrefix,
|
||||
nameSuffix, or hashing. The name reference for this
|
||||
ConfigMap object in CRD object need to be updated
|
||||
with namePrefix, nameSuffix, or hashing in the
|
||||
same way.</p>
|
||||
<p>The annotations can be put into openAPI definitions are:</p>
|
||||
<ul>
|
||||
<li>“x-kubernetes-annotation”: "”</li>
|
||||
<li>“x-kubernetes-label-selector”: "”</li>
|
||||
<li>“x-kubernetes-identity”: "”</li>
|
||||
<li>“x-kubernetes-object-ref-api-version”: “v1”,</li>
|
||||
<li>“x-kubernetes-object-ref-kind”: “Secret”,</li>
|
||||
<li>“x-kubernetes-object-ref-name-key”: “name”,</li>
|
||||
</ul>
|
||||
<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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">crds</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>- crds/typeA.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- crds/typeB.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/crds/index.xml
Normal file
17
docs/api-reference/kustomization/crds/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – crds</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/</link>
|
||||
<description>Recent content in crds on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
897
docs/api-reference/kustomization/generatoroptions/index.html
Normal file
897
docs/api-reference/kustomization/generatoroptions/index.html
Normal file
@@ -0,0 +1,897 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>generatorOptions | Kustomize</title><meta property="og:title" content="generatorOptions" />
|
||||
<meta property="og:description" content="Control behavior of [ConfigMap](/kustomize/api-reference/kustomization/configmapgenerator) and [Secret](/kustomize/api-reference/kustomization/secretgenerator) generators.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="generatorOptions">
|
||||
<meta itemprop="description" content="Control behavior of [ConfigMap](/kustomize/api-reference/kustomization/configmapgenerator) and [Secret](/kustomize/api-reference/kustomization/secretgenerator) generators.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="generatorOptions"/>
|
||||
<meta name="twitter:description" content="Control behavior of [ConfigMap](/kustomize/api-reference/kustomization/configmapgenerator) and [Secret](/kustomize/api-reference/kustomization/secretgenerator) generators.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>generatorOptions | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/generatoroptions/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/generatoroptions/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/generatoroptions/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=generatorOptions" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/">generatorOptions</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>generatorOptions</h1>
|
||||
<div class="lead">Control behavior of <a href="/kustomize/api-reference/kustomization/configmapgenerator">ConfigMap</a> and <a href="/kustomize/api-reference/kustomization/secretgenerator">Secret</a> generators.</div>
|
||||
<p>Additionally, generatorOptions can be set on a per resource level within each
|
||||
generator. For details on per-resource generatorOptions usage see
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator">field-name-configMapGenerator</a> and See <a href="/kustomize/api-reference/kustomization/secretgenerator">field-name-secretGenerator</a>.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">generatorOptions</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:#8f5902;font-style:italic"># labels to add to all generated resources</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">kustomize.generated.resources</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>somevalue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># annotations to add to all generated resources</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</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">kustomize.generated.resource</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>somevalue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># disableNameSuffixHash is true disables the default behavior of adding a</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># suffix to the names of generated resources that is a hash of</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the resource contents.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">disableNameSuffixHash</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 15, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/518147c129f831913d33226cf17068d0d4270f41">add zh docsy (518147c1)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/generatoroptions/index.xml
Normal file
17
docs/api-reference/kustomization/generatoroptions/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – generatorOptions</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/</link>
|
||||
<description>Recent content in generatorOptions on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
917
docs/api-reference/kustomization/images/index.html
Normal file
917
docs/api-reference/kustomization/images/index.html
Normal file
@@ -0,0 +1,917 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>images | Kustomize</title><meta property="og:title" content="images" />
|
||||
<meta property="og:description" content="Modify the name, tags and/or digest for images.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="images">
|
||||
<meta itemprop="description" content="Modify the name, tags and/or digest for images.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="images"/>
|
||||
<meta name="twitter:description" content="Modify the name, tags and/or digest for images.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>images | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/images/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/images/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/images/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=images" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/">images</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>images</h1>
|
||||
<div class="lead">Modify the name, tags and/or digest for images.</div>
|
||||
<p>Images modify the name, tags and/or digest for images without creating patches. E.g. Given this
|
||||
kubernetes Deployment fragment:</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">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:#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">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">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>mypostgresdb<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>postgres<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">8</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>nginxapp<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>nginx<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.7.9</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>myapp<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>my-demo-app<span style="color:#000;font-weight:bold">:</span>latest<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>alpine-app<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>alpine<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.7</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>one can change the <code>image</code> in the following ways:</p>
|
||||
<ul>
|
||||
<li><code>postgres:8</code> to <code>my-registry/my-postgres:v1</code>,</li>
|
||||
<li>nginx tag <code>1.7.9</code> to <code>1.8.0</code>,</li>
|
||||
<li>image name <code>my-demo-app</code> to <code>my-app</code>,</li>
|
||||
<li>alpine’s tag <code>3.7</code> to a digest value</li>
|
||||
</ul>
|
||||
<p>all with the following <em>kustomization</em>:</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">images</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>postgres<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-registry/my-postgres<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newTag</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<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>nginx<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newTag</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.8.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>my-demo-app<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-app<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>alpine<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">digest</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>sha256<span style="color:#000;font-weight:bold">:</span>24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/images/index.xml
Normal file
17
docs/api-reference/kustomization/images/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – images</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/</link>
|
||||
<description>Recent content in images on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
996
docs/api-reference/kustomization/index.html
Normal file
996
docs/api-reference/kustomization/index.html
Normal file
@@ -0,0 +1,996 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>kustomization.yaml | Kustomize</title><meta property="og:title" content="kustomization.yaml" />
|
||||
<meta property="og:description" content="kustomization.yaml fields and API
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="kustomization.yaml">
|
||||
<meta itemprop="description" content="kustomization.yaml fields and API
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="kustomization.yaml"/>
|
||||
<meta name="twitter:description" content="kustomization.yaml fields and API
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>kustomization.yaml | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=kustomization.yaml" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>kustomization.yaml</h1>
|
||||
<div class="lead">kustomization.yaml fields and API</div>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/bases/">bases</a>
|
||||
</h5>
|
||||
<p>Add resources from a kustomization dir.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/">commonAnnotations</a>
|
||||
</h5>
|
||||
<p>Add annotations to add all resources.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/">commonLabels</a>
|
||||
</h5>
|
||||
<p>Add labels and selectors to add all resources.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/components/">components</a>
|
||||
</h5>
|
||||
<p>Compose kustomizations.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/">configMapGenerator</a>
|
||||
</h5>
|
||||
<p>Generate ConfigMap resources.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/crds/">crds</a>
|
||||
</h5>
|
||||
<p>Adding CRD support</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/">generatorOptions</a>
|
||||
</h5>
|
||||
<p>Control behavior of <a href="/kustomize/api-reference/kustomization/configmapgenerator">ConfigMap</a> and <a href="/kustomize/api-reference/kustomization/secretgenerator">Secret</a> generators.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/images/">images</a>
|
||||
</h5>
|
||||
<p>Modify the name, tags and/or digest for images.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/">namePrefix</a>
|
||||
</h5>
|
||||
<p>Prepends the value to the names of all resources and references.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/">namespace</a>
|
||||
</h5>
|
||||
<p>Adds namespace to all resources.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/">nameSuffix</a>
|
||||
</h5>
|
||||
<p>Appends the value to the names of all resources and references.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/patches/">patches</a>
|
||||
</h5>
|
||||
<p>Patch resources</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/">patchesJson6902</a>
|
||||
</h5>
|
||||
<p>Patch resources using the <a href="https://tools.ietf.org/html/rfc6902">json 6902 standard</a></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/">patchesStrategicMerge</a>
|
||||
</h5>
|
||||
<p>Patch resources using the strategic merge patch standard.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/">replicas</a>
|
||||
</h5>
|
||||
<p>Change the number of replicas for a resource.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/resources/">resources</a>
|
||||
</h5>
|
||||
<p>Resources to include.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/">secretGenerator</a>
|
||||
</h5>
|
||||
<p>Generate Secret resources.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="entry">
|
||||
<h5>
|
||||
<a href="/kustomize/api-reference/kustomization/vars/">vars</a>
|
||||
</h5>
|
||||
<p>Substitute name references.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
803
docs/api-reference/kustomization/index.xml
Normal file
803
docs/api-reference/kustomization/index.xml
Normal file
@@ -0,0 +1,803 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – kustomization.yaml</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/</link>
|
||||
<description>Recent content in kustomization.yaml on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: bases</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/bases/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-warning">
|
||||
<p>The <code>bases</code> field was deprecated in v2.1.0</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>Move entries into the <a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/kustomization/resources">resources</a>
|
||||
field. This allows bases - which are still a
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/kustomization/glossary#base">central concept</a> - to be
|
||||
ordered relative to other input resources.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: commonAnnotations</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonannotations/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Add annotations to all resources. If the annotation key already is present on the resource,
|
||||
the value will be overridden.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonAnnotations</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">oncallPager</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">800-555-1212</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="example">Example</h2>
|
||||
<h3 id="file-input">File Input</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">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonAnnotations</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">oncallPager</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">800-555-1212</span><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">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>- deploy.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"># deploy.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>example<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:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h3 id="build-output">Build Output</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>example<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</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">oncallPager</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">800-555-1212</span><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:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: commonLabels</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/commonlabels/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Add labels and selectors to all resources. If the label key already is present on the resource,
|
||||
the value will be overridden.</p>
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-warning">
|
||||
<p>Selectors for resources such as Deployments and Services shouldn&rsquo;t be changed once the
|
||||
resource has been applied to a cluster.</p>
|
||||
<p>Changing commonLabels to live resources could result in failures.</p>
|
||||
|
||||
</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:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonLabels</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">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="example">Example</h2>
|
||||
<h3 id="file-input">File Input</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">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">commonLabels</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">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<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">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>- deploy.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- service.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"># deploy.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>example<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"># service.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>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>Service<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>example<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h3 id="build-output">Build Output</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>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>Service<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">labels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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>example<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">selector</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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:#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">labels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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>example<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">selector</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">matchLabels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<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">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">labels</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">app</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>bingo<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">owner</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alice<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">someName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>someValue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: components</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/components/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p><em>Coming soon</em></p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: configMapGenerator</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/configmapgenerator/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Each entry in this list results in the creation of
|
||||
one ConfigMap resource (it&rsquo;s a generator of n maps).</p>
|
||||
<p>The example below creates four ConfigMaps:</p>
|
||||
<ul>
|
||||
<li>first, with the names and contents of the given files</li>
|
||||
<li>second, with key/value as data using key/value pairs from files</li>
|
||||
<li>third, also with key/value as data, directly specified using <code>literals</code></li>
|
||||
<li>and a fourth, which sets an annotation and label via <code>options</code> for that single ConfigMap</li>
|
||||
</ul>
|
||||
<p>Each configMapGenerator item accepts a parameter of
|
||||
<code>behavior: [create|replace|merge]</code>.
|
||||
This allows an overlay to modify or
|
||||
replace an existing configMap from the parent.</p>
|
||||
<p>Also, each entry has an <code>options</code> field, that has the
|
||||
same subfields as the kustomization file&rsquo;s <code>generatorOptions</code> field.</p>
|
||||
<p>This <code>options</code> field allows one to add labels and/or
|
||||
annotations to the generated instance, or to individually
|
||||
disable the name suffix hash for that instance.
|
||||
Labels and annotations added here will not be overwritten
|
||||
by the global options associated with the kustomization
|
||||
file <code>generatorOptions</code> field. However, due to how
|
||||
booleans behave, if the global <code>generatorOptions</code> field
|
||||
specifies <code>disableNameSuffixHash: true</code>, this will
|
||||
trump any attempt to locally override it.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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:#8f5902;font-style:italic"># These labels are added to all configmaps and secrets.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">generatorOptions</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">labels</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">fruit</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apple<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">configMapGenerator</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>my-java-server-props<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">behavior</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>merge<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- application.properties<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- more.properties<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>my-java-server-env-file-vars<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">envs</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>- my-server-env.properties<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- more-server-props.env<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>my-java-server-env-vars<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">literals</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>- JAVA_HOME=/opt/java/jdk<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- JAVA_TOOL_OPTIONS=-agentlib<span style="color:#000;font-weight:bold">:</span>hprof<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">options</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">disableNameSuffixHash</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">pet</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>dog<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>dashboards<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- mydashboard.json<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">options</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">annotations</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">dashboard</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">app.kubernetes.io/name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;app1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>It is also possible to
|
||||
<a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-the-key-to-use-when-creating-a-configmap-from-a-file">define a key</a>
|
||||
to set a name different than the filename.</p>
|
||||
<p>The example below creates a ConfigMap
|
||||
with the name of file as <code>myFileName.ini</code>
|
||||
while the <em>actual</em> filename from which the
|
||||
configmap is created is <code>whatever.ini</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">configMapGenerator</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>app-whatever<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- myFileName.ini=whatever.ini<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: crds</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/crds/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Each entry in this list should be a relative path to
|
||||
a file for custom resource definition (CRD).</p>
|
||||
<p>The presence of this field is to allow kustomize be
|
||||
aware of CRDs and apply proper
|
||||
transformation for any objects in those types.</p>
|
||||
<p>Typical use case: A CRD object refers to a
|
||||
ConfigMap object. In a kustomization, the ConfigMap
|
||||
object name may change by adding namePrefix,
|
||||
nameSuffix, or hashing. The name reference for this
|
||||
ConfigMap object in CRD object need to be updated
|
||||
with namePrefix, nameSuffix, or hashing in the
|
||||
same way.</p>
|
||||
<p>The annotations can be put into openAPI definitions are:</p>
|
||||
<ul>
|
||||
<li>&ldquo;x-kubernetes-annotation&rdquo;: &quot;&rdquo;</li>
|
||||
<li>&ldquo;x-kubernetes-label-selector&rdquo;: &quot;&rdquo;</li>
|
||||
<li>&ldquo;x-kubernetes-identity&rdquo;: &quot;&rdquo;</li>
|
||||
<li>&ldquo;x-kubernetes-object-ref-api-version&rdquo;: &ldquo;v1&rdquo;,</li>
|
||||
<li>&ldquo;x-kubernetes-object-ref-kind&rdquo;: &ldquo;Secret&rdquo;,</li>
|
||||
<li>&ldquo;x-kubernetes-object-ref-name-key&rdquo;: &ldquo;name&rdquo;,</li>
|
||||
</ul>
|
||||
<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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">crds</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>- crds/typeA.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- crds/typeB.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: generatorOptions</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/generatoroptions/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Additionally, generatorOptions can be set on a per resource level within each
|
||||
generator. For details on per-resource generatorOptions usage see
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/kustomization/configmapgenerator">field-name-configMapGenerator</a> and See <a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/kustomization/secretgenerator">field-name-secretGenerator</a>.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">generatorOptions</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:#8f5902;font-style:italic"># labels to add to all generated resources</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">kustomize.generated.resources</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>somevalue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># annotations to add to all generated resources</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</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">kustomize.generated.resource</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>somevalue<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># disableNameSuffixHash is true disables the default behavior of adding a</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># suffix to the names of generated resources that is a hash of</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the resource contents.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">disableNameSuffixHash</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: images</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/images/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Images modify the name, tags and/or digest for images without creating patches. E.g. Given this
|
||||
kubernetes Deployment fragment:</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">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:#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">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">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>mypostgresdb<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>postgres<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">8</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>nginxapp<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>nginx<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.7.9</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>myapp<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>my-demo-app<span style="color:#000;font-weight:bold">:</span>latest<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>alpine-app<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>alpine<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.7</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>one can change the <code>image</code> in the following ways:</p>
|
||||
<ul>
|
||||
<li><code>postgres:8</code> to <code>my-registry/my-postgres:v1</code>,</li>
|
||||
<li>nginx tag <code>1.7.9</code> to <code>1.8.0</code>,</li>
|
||||
<li>image name <code>my-demo-app</code> to <code>my-app</code>,</li>
|
||||
<li>alpine&rsquo;s tag <code>3.7</code> to a digest value</li>
|
||||
</ul>
|
||||
<p>all with the following <em>kustomization</em>:</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">images</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>postgres<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-registry/my-postgres<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newTag</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<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>nginx<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newTag</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.8.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>my-demo-app<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">newName</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-app<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>alpine<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">digest</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>sha256<span style="color:#000;font-weight:bold">:</span>24a0c4b4a4c0eb97a1aabb8e29f18e917d05abfe1b7a7c07857230879ce7d3d3<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: namePrefix</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">namePrefix</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alices-<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>A deployment named <code>wordpress</code> would become <code>alices-wordpress</code>.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: namespace</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-namespace<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Will override the existing namespace if it is set on a resource, or add it
|
||||
if it is not set on a resource.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: nameSuffix</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namesuffix/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namesuffix/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">nameSuffix</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-v2<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>A deployment named <code>wordpress</code> would become <code>wordpress-v2</code>.</p>
|
||||
<p><strong>Note:</strong> The suffix is appended before the content hash if the resource type is ConfigMap or Secret.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: patches</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patches/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patches/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Patches (also call overlays) add or override fields on resources. They are provided using the
|
||||
<code>patches</code> Kustomization field.</p>
|
||||
<p>The <code>patches</code> field contains a list of patches to be applied in the order they are specified.</p>
|
||||
<p>Each patch may:</p>
|
||||
<ul>
|
||||
<li>be either a <a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/glossary#patchstrategicmerge">strategic merge</a> patch, or a <a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/glossary#patchjson6902">JSON</a> patch</li>
|
||||
<li>be either a file, or an inline string</li>
|
||||
<li>target a single resource or multiple resources</li>
|
||||
</ul>
|
||||
<p>The patch target selects resources by group, version, kind, name, namespace, labelSelector and
|
||||
annotationSelector. Any resource which matches all the <strong>specified</strong> fields has the patch applied
|
||||
to it (regular expressions).</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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><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">group</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apps<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>deploy.*<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">&#34;env=dev&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotationSelector</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;zone=west&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">patch</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">-
|
||||
</span><span style="color:#8f5902;font-style:italic"> - op: replace</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>/some/existing/path<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>value<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>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">&#34;env=dev&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>The <code>name</code> and <code>namespace</code> fields of the patch target selector are
|
||||
automatically anchored regular expressions. This means that the value <code>myapp</code>
|
||||
is equivalent to <code>^myapp$</code>.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: patchesJson6902</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patchesjson6902/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patchesjson6902/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>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 <a href="https://tools.ietf.org/html/rfc6902">https://tools.ietf.org/html/rfc6902</a></p>
|
||||
<p>target field points to a kubernetes object within the same kustomization
|
||||
by the object&rsquo;s group, version, kind, name and namespace.
|
||||
path field is a relative file path of a JSON patch file.
|
||||
The content in this patch file can be either in JSON format as</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json"> <span style="color:#000;font-weight:bold">[</span>
|
||||
<span style="color:#000;font-weight:bold">{</span><span style="color:#204a87;font-weight:bold">&#34;op&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;add&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#204a87;font-weight:bold">&#34;path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;/some/new/path&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#204a87;font-weight:bold">&#34;value&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;value&#34;</span><span style="color:#000;font-weight:bold">},</span>
|
||||
<span style="color:#000;font-weight:bold">{</span><span style="color:#204a87;font-weight:bold">&#34;op&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;replace&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#204a87;font-weight:bold">&#34;path&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;/some/existing/path&#34;</span><span style="color:#000;font-weight:bold">,</span> <span style="color:#204a87;font-weight:bold">&#34;value&#34;</span><span style="color:#000;font-weight:bold">:</span> <span style="color:#4e9a06">&#34;new value&#34;</span><span style="color:#000;font-weight:bold">}</span>
|
||||
<span style="color:#000;font-weight:bold">]</span>
|
||||
</code></pre></div><p>or in YAML format as</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">op</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>add<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>/some/new/path<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- <span style="color:#204a87;font-weight:bold">op</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>replace<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>/some/existing/path<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>value<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:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">patchesJson6902</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">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-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>add_init_container.yaml<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">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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>Service<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>my-service<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>add_service_annotation.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>The patch content can be an inline string as well:</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">patchesJson6902</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">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>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">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-deployment<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">patch</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">-
|
||||
</span><span style="color:#8f5902;font-style:italic"> - op: add</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>/some/new/path<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">op</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>replace<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>/some/existing/path<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;new value&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: patchesStrategicMerge</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patchesstrategicmerge/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/patchesstrategicmerge/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Each entry in this list should be either a relative
|
||||
file path or an inline content
|
||||
resolving to a partial or complete resource
|
||||
definition.</p>
|
||||
<p>The names in these (possibly partial) resource
|
||||
files must match names already loaded via the
|
||||
<code>resources</code> field. These entries are used to
|
||||
<em>patch</em> (modify) the known resources.</p>
|
||||
<p>Small patches that do one thing are best, e.g. modify
|
||||
a memory request/limit, change an env var in a
|
||||
ConfigMap, etc. Small patches are easy to review and
|
||||
easy to mix together in overlays.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">patchesStrategicMerge</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>- service_port_8888.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- deployment_increase_replicas.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- deployment_increase_memory.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>The patch content can be a inline string as well.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">patchesStrategicMerge</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:#8f5902;font-style:italic">-
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: apps/v1</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">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>nginx<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">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">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>nginx<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>nignx<span style="color:#000;font-weight:bold">:</span>latest<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Note that kustomize does not support more than one patch
|
||||
for the same object that contain a <em>delete</em> directive. To remove
|
||||
several fields / slice elements from an object create a single
|
||||
patch that performs all the needed deletions.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: replicas</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/replicas/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/replicas/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Given this kubernetes Deployment fragment:</p>
|
||||
<pre><code># deployment.yaml
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: deployment-name
|
||||
spec:
|
||||
replicas: 3
|
||||
</code></pre><p>one can change the number of replicas to 5
|
||||
by adding the following to your kustomization:</p>
|
||||
<pre><code>apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
replicas:
|
||||
- name: deployment-name
|
||||
count: 5
|
||||
</code></pre><p>This field accepts a list, so many resources can
|
||||
be modified at the same time.</p>
|
||||
<p>As this declaration does not take in a <code>kind:</code> nor a <code>group:</code>
|
||||
it will match any <code>group</code> and <code>kind</code> that has a matching name and
|
||||
that is one of:</p>
|
||||
<ul>
|
||||
<li><code>Deployment</code></li>
|
||||
<li><code>ReplicationController</code></li>
|
||||
<li><code>ReplicaSet</code></li>
|
||||
<li><code>StatefulSet</code></li>
|
||||
</ul>
|
||||
<p>For more complex use cases, revert to using a patch.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: resources</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/resources/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/resources/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Each entry in this list must be a path to a <em>file</em>, or a path (or URL) referring to another
|
||||
kustomization <em>directory</em>, e.g.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">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>- myNamespace.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- sub-dir/some-deployment.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- ../../commonbase<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span>- github.com/kubernetes-sigs/kustomize/examples/multibases<span style="color:#000;font-weight:bold">?</span>ref=v1<span style="color:#0000cf;font-weight:bold">.0.6</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>- github.com/kubernets-sigs/kustomize/examples/helloWorld<span style="color:#000;font-weight:bold">?</span>ref=test-branch<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Resources will be read and processed in depth-first order.</p>
|
||||
<p>Files should contain k8s resources in YAML form. A file may contain multiple resources separated by
|
||||
the document marker <code>---</code>. File paths should be specified <em>relative</em> to the directory holding the
|
||||
kustomization file containing the <code>resources</code> field.</p>
|
||||
<p>Directory specification can be relative, absolute, or part of a URL. URL specifications should
|
||||
follow the <a href="https://github.com/hashicorp/go-getter#url-format">hashicorp URL</a> format. The directory must contain a <code>kustomization.yaml</code> file.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: secretGenerator</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/secretegenerator/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/secretegenerator/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Each entry in the argument list results in the creation of one Secret resource (it&rsquo;s a generator of N secrets).</p>
|
||||
<p>This works like the <a href="https://kubernetes-sigs.github.io/kustomize/kustomize/api-reference/kustomization/configmapgenerator">configMapGenerator</a>.</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">secretGenerator</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>app-tls<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- secret/tls.cert<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- secret/tls.key<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;kubernetes.io/tls&#34;</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>app-tls-namespaced<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># you can define a namespace to generate</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># a secret in, defaults to: &#34;default&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>apps<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- tls.crt=catsecret/tls.cert<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- tls.key=secret/tls.key<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;kubernetes.io/tls&#34;</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>env_file_secret<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">envs</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>- env.txt<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<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>secret-with-annotation<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">files</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>- app-config.yaml<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">options</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">annotations</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">app_config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;true&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</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">app.kubernetes.io/name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;app2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Api-Reference: vars</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/vars/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/vars/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Vars are used to capture text from one resource&rsquo;s field
|
||||
and insert that text elsewhere - a reflection feature.</p>
|
||||
<p>For example, suppose one specifies the name of a k8s Service
|
||||
object in a container&rsquo;s command line, and the name of a
|
||||
k8s Secret object in a container&rsquo;s environment variable,
|
||||
so that the following would work:</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:#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>myimage<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">command</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;start&#34;</span><span style="color:#000;font-weight:bold">,</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;--host&#34;</span><span style="color:#000;font-weight:bold">,</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;$(MY_SERVICE_NAME)&#34;</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">env</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>SECRET_TOKEN<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>$(SOME_SECRET_NAME)<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>To do so, add an entry to <code>vars:</code> as follows:</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>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">vars</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>SOME_SECRET_NAME<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">objref</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>Secret<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>my-secret<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>v1<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>MY_SERVICE_NAME<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">objref</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>Service<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>my-service<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>v1<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">fieldref</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">fieldpath</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>metadata.name<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>ANOTHER_DEPLOYMENTS_POD_RESTART_POLICY<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">objref</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>my-deployment<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">fieldref</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">fieldpath</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>spec.template.spec.restartPolicy<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>A var is a tuple of variable name, object
|
||||
reference and field reference within that object.
|
||||
That&rsquo;s where the text is found.</p>
|
||||
<p>The field reference is optional; it defaults to
|
||||
<code>metadata.name</code>, a normal default, since kustomize
|
||||
is used to generate or modify the names of
|
||||
resources.</p>
|
||||
<p>At time of writing, only string type fields are
|
||||
supported. No ints, bools, arrays etc. It&rsquo;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 &lsquo;$(FOO)&rsquo;,
|
||||
can only be placed in particular fields of
|
||||
particular objects as specified by kustomize&rsquo;s
|
||||
configuration data.</p>
|
||||
<p>The default config data for vars is at <a href="https://kubernetes-sigs.github.io/kustomize/konfig/builtinpluginconsts/varreference.go">/api/konfig/builtinpluginconsts/varreference.go</a>
|
||||
Long story short, the default targets are all
|
||||
container command args and env value fields.</p>
|
||||
<p>Vars should <em>not</em> be used for inserting names in
|
||||
places where kustomize is already handling that
|
||||
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.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
885
docs/api-reference/kustomization/nameprefix/index.html
Normal file
885
docs/api-reference/kustomization/nameprefix/index.html
Normal file
@@ -0,0 +1,885 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>namePrefix | Kustomize</title><meta property="og:title" content="namePrefix" />
|
||||
<meta property="og:description" content="Prepends the value to the names of all resources and references.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="namePrefix">
|
||||
<meta itemprop="description" content="Prepends the value to the names of all resources and references.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="namePrefix"/>
|
||||
<meta name="twitter:description" content="Prepends the value to the names of all resources and references.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>namePrefix | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/nameprefix/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/nameprefix/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/nameprefix/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=namePrefix" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/">namePrefix</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>namePrefix</h1>
|
||||
<div class="lead">Prepends the value to the names of all resources and references.</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:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">namePrefix</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>alices-<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>A deployment named <code>wordpress</code> would become <code>alices-wordpress</code>.</p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/nameprefix/index.xml
Normal file
17
docs/api-reference/kustomization/nameprefix/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – namePrefix</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/</link>
|
||||
<description>Recent content in namePrefix on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/nameprefix/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
886
docs/api-reference/kustomization/namespace/index.html
Normal file
886
docs/api-reference/kustomization/namespace/index.html
Normal file
@@ -0,0 +1,886 @@
|
||||
<!doctype html>
|
||||
<html lang="en" class="no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="generator" content="Hugo 0.73.0" />
|
||||
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/index.xml">
|
||||
|
||||
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico" >
|
||||
<link rel="apple-touch-icon" href="/kustomize/favicons/apple-touch-icon-180x180.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-36x36.png" sizes="36x36">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-48x48.png" sizes="48x48">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-72x72.png" sizes="72x72">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-144x144.png" sizes="144x144">
|
||||
<link rel="icon" type="image/png" href="/kustomize/favicons/android-192x192.png" sizes="192x192">
|
||||
|
||||
<title>namespace | Kustomize</title><meta property="og:title" content="namespace" />
|
||||
<meta property="og:description" content="Adds namespace to all resources.
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/" />
|
||||
<meta property="og:site_name" content="Kustomize" />
|
||||
<meta itemprop="name" content="namespace">
|
||||
<meta itemprop="description" content="Adds namespace to all resources.
|
||||
"><meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="namespace"/>
|
||||
<meta name="twitter:description" content="Adds namespace to all resources.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" as="style">
|
||||
<link href="/kustomize/scss/main.min.818a933df0186c907f1faea6730835dd5fa01c3b53af36bb68396dc80a2d3c45.css" rel="stylesheet" integrity="">
|
||||
|
||||
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.3.1.min.js"
|
||||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://kubernetes-sigs.github.io/kustomize//css/asciinema-player.css" />
|
||||
|
||||
<title>namespace | Kustomize</title>
|
||||
</head>
|
||||
<body class="td-section">
|
||||
<header>
|
||||
|
||||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
|
||||
<a class="navbar-brand" href="/kustomize/">
|
||||
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Kustomize</span>
|
||||
</a>
|
||||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/installation/" ><span>Installation</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/guides/" ><span>Guides</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link active" href="/kustomize/api-reference/" ><span class="active">API Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="https://github.com/kubernetes-sigs/kustomize/tree/master/examples" target="_blank" ><span>Example</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/faq/" ><span>FAQ</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/blog/" ><span>Blog</span></a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item mr-4 mb-2 mb-lg-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="nav-link" href="/kustomize/contributing/" ><span>Contributing</span></a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/namespace/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-nav d-none d-lg-block">
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
<div class="container-fluid td-outer">
|
||||
<div class="td-main">
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="td-sidebar-menu" class="td-sidebar__inner">
|
||||
|
||||
<form class="td-sidebar__search d-flex align-items-center">
|
||||
|
||||
|
||||
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
|
||||
|
||||
<div class="nav-item dropdown d-block d-lg-none">
|
||||
|
||||
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
English
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
|
||||
<a class="dropdown-item" href="/kustomize/zh/api-reference/kustomization/namespace/">简体中文</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">API Reference</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-reference">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">kustomization.yaml</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomization">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/bases/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">bases</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationbases">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonannotations/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonAnnotations</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonannotations">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/commonlabels/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">commonLabels</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcommonlabels">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/components/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">components</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcomponents">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/configmapgenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">configMapGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationconfigmapgenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/crds/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">crds</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationcrds">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/generatoroptions/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">generatorOptions</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationgeneratoroptions">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/images/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">images</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationimages">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/nameprefix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">namePrefix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnameprefix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namespace/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">namespace</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse show" id="kustomizeapi-referencekustomizationnamespace">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/namesuffix/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">nameSuffix</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationnamesuffix">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patches/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patches</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatches">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesjson6902/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesJson6902</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesjson6902">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/patchesstrategicmerge/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">patchesStrategicMerge</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationpatchesstrategicmerge">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/replicas/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">replicas</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationreplicas">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/resources/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">resources</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationresources">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/secretegenerator/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">secretGenerator</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationsecretegenerator">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/kustomization/vars/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">vars</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referencekustomizationvars">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="td-sidebar-nav__section pr-md-3">
|
||||
<li class="td-sidebar-nav__section-title">
|
||||
<a href="/kustomize/api-reference/glossary/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Glossary</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li class="collapse " id="kustomizeapi-referenceglossary">
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/edit/master/site/content/en/api-reference/kustomization/namespace/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new?title=namespace" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
|
||||
|
||||
<a href="https://github.com/kubernetes-sigs/kustomize/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
|
||||
|
||||
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
|
||||
<ol class="breadcrumb spb-1">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/">API Reference</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item" >
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/">kustomization.yaml</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/">namespace</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>namespace</h1>
|
||||
<div class="lead">Adds namespace to all resources.</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:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kustomize.config.k8s.io/v1beta1<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>Kustomization<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">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-namespace<span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Will override the existing namespace if it is set on a resource, or add it
|
||||
if it is not set on a resource.</p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="panel-line">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified June 7, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/42497c664f619a36cc86156e366b53099bd633cb">Convert docs to docsy (42497c66)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="bg-dark py-5 row d-print-none">
|
||||
<div class="container-fluid mx-sm-5">
|
||||
<div class="row">
|
||||
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
|
||||
<a class="text-white" target="_blank" href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
|
||||
|
||||
|
||||
|
||||
<ul class="list-inline mb-0">
|
||||
|
||||
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
|
||||
<a class="text-white" target="_blank" href="https://github.com/kubernetes-sigs/kustomize">
|
||||
<i class="fab fa-github"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
|
||||
<small class="text-white">© 2020 Kubernetes Authors All Rights Reserved</small>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/kustomize/js/main.min.35b203b3c2114e187f6e4bbf0903c511aaaac5535186321e3b5e364656b6de0c.js" integrity="sha256-NbIDs8IRThh/bku/CQPFEaqqxVNRhjIeO142Rla23gw=" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://kubernetes-sigs.github.io/kustomize//js/asciinema-player.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
docs/api-reference/kustomization/namespace/index.xml
Normal file
17
docs/api-reference/kustomization/namespace/index.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Kustomize – namespace</title>
|
||||
<link>https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/</link>
|
||||
<description>Recent content in namespace on Kustomize</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://kubernetes-sigs.github.io/kustomize/api-reference/kustomization/namespace/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user