mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
demos --> examples
examples/ is pretty standard whereas demos/ isn't. So I just refactored that. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
1. Fork the repo, develop and test your code.
|
1. Fork the repo, develop and test your code.
|
||||||
See the [github workflow guide].
|
See the [github workflow guide].
|
||||||
1. For _new features_, provide a markdown-based demo following
|
1. For _new features_, provide a markdown-based demo following
|
||||||
the pattern established in the [demos](demos) directory.
|
the pattern established in the [examples](examples) directory.
|
||||||
Run `bin/pre-commit.sh` to test your demo.
|
Run `bin/pre-commit.sh` to test your demo.
|
||||||
1. Submit a pull request.
|
1. Submit a pull request.
|
||||||
|
|
||||||
|
|||||||
52
README.md
52
README.md
@@ -1,26 +1,3 @@
|
|||||||
[KEP]: https://github.com/kubernetes/community/blob/master/keps/sig-cli/0008-kustomize.md
|
|
||||||
[`make`]: https://www.gnu.org/software/make
|
|
||||||
[`sed`]: https://www.gnu.org/software/sed
|
|
||||||
[applied]: docs/glossary.md#apply
|
|
||||||
[base]: docs/glossary.md#base
|
|
||||||
[declarative configuration]: docs/glossary.md#declarative-application-management
|
|
||||||
[demo]: demos/README.md
|
|
||||||
[demos]: demos/README.md
|
|
||||||
[imageBase]: docs/base.jpg
|
|
||||||
[imageOverlay]: docs/overlay.jpg
|
|
||||||
[install]: INSTALL.md
|
|
||||||
[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]: https://github.com/kubernetes-sigs/kustomize/releases
|
|
||||||
[resource]: docs/glossary.md#resource
|
|
||||||
[resources]: docs/glossary.md#resource
|
|
||||||
[sig-cli]: https://github.com/kubernetes/community/blob/master/sig-cli/README.md
|
|
||||||
[variant]: docs/glossary.md#variant
|
|
||||||
[variants]: docs/glossary.md#variant
|
|
||||||
[workflows]: docs/workflows.md
|
|
||||||
|
|
||||||
# kustomize
|
# kustomize
|
||||||
|
|
||||||
`kustomize` lets you customize raw, template-free YAML
|
`kustomize` lets you customize raw, template-free YAML
|
||||||
@@ -37,7 +14,7 @@ and it's like [`sed`], in that it emits editted text.
|
|||||||
|
|
||||||
**Installation**: Download a binary from the [release
|
**Installation**: Download a binary from the [release
|
||||||
page], or see these [install] notes. Then try one of
|
page], or see these [install] notes. Then try one of
|
||||||
the tested [demos].
|
the tested [examples].
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -126,16 +103,39 @@ you are a submodule fan).
|
|||||||
|
|
||||||
Generate YAML with
|
Generate YAML with
|
||||||
|
|
||||||
```
|
```sh
|
||||||
kustomize build ~/someApp/overlays/production
|
kustomize build ~/someApp/overlays/production
|
||||||
```
|
```
|
||||||
|
|
||||||
The YAML can be directly [applied] to a cluster:
|
The YAML can be directly [applied] to a cluster:
|
||||||
|
|
||||||
> ```
|
> ```sh
|
||||||
> kustomize build ~/someApp/overlays/production | kubectl apply -f -
|
> kustomize build ~/someApp/overlays/production | kubectl apply -f -
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
This tool is sponsored by [sig-cli] ([KEP]).
|
This tool is sponsored by [sig-cli] ([KEP]).
|
||||||
|
|
||||||
|
|
||||||
|
[KEP]: https://github.com/kubernetes/community/blob/master/keps/sig-cli/0008-kustomize.md
|
||||||
|
[`make`]: https://www.gnu.org/software/make
|
||||||
|
[`sed`]: https://www.gnu.org/software/sed
|
||||||
|
[applied]: docs/glossary.md#apply
|
||||||
|
[base]: docs/glossary.md#base
|
||||||
|
[declarative configuration]: docs/glossary.md#declarative-application-management
|
||||||
|
[examples]: examples/README.md
|
||||||
|
[imageBase]: docs/base.jpg
|
||||||
|
[imageOverlay]: docs/overlay.jpg
|
||||||
|
[install]: INSTALL.md
|
||||||
|
[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]: https://github.com/kubernetes-sigs/kustomize/releases
|
||||||
|
[resource]: docs/glossary.md#resource
|
||||||
|
[resources]: docs/glossary.md#resource
|
||||||
|
[sig-cli]: https://github.com/kubernetes/community/blob/master/sig-cli/README.md
|
||||||
|
[variant]: docs/glossary.md#variant
|
||||||
|
[variants]: docs/glossary.md#variant
|
||||||
|
[workflows]: docs/workflows.md
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ function testGoTest {
|
|||||||
go test -v ./...
|
go test -v ./...
|
||||||
}
|
}
|
||||||
|
|
||||||
function testDemos {
|
function testExamples {
|
||||||
mdrip --mode test --label test README.md ./demos
|
mdrip --mode test --label test README.md ./examples
|
||||||
}
|
}
|
||||||
|
|
||||||
runTest testGoFmt
|
runTest testGoFmt
|
||||||
runTest testGoImports
|
runTest testGoImports
|
||||||
runTest testGoVet
|
runTest testGoVet
|
||||||
runTest testGoTest
|
runTest testGoTest
|
||||||
runTest testDemos
|
runTest testExamples
|
||||||
|
|
||||||
exit $rc
|
exit $rc
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Demos
|
# Examples
|
||||||
|
|
||||||
These demos assume that `kustomize` is on your `$PATH`.
|
These examples assume that `kustomize` is on your `$PATH`.
|
||||||
|
|
||||||
They are covered by [pre-commit](../bin/pre-commit.sh)
|
They are covered by [pre-commit](../bin/pre-commit.sh)
|
||||||
tests, and should work with HEAD
|
tests, and should work with HEAD
|
||||||
@@ -51,7 +51,7 @@ mkdir -p $BASE
|
|||||||
|
|
||||||
curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
|
curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
|
||||||
/kubernetes-sigs/kustomize\
|
/kubernetes-sigs/kustomize\
|
||||||
/master/demos/helloWorld\
|
/master/examples/helloWorld\
|
||||||
/{configMap,deployment,kustomization,service}.yaml"
|
/{configMap,deployment,kustomization,service}.yaml"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
# This script assumes that the process running it has
|
# This script assumes that the process running it has
|
||||||
# checked out the kubernetes-sigs/kustomize repo, and
|
# checked out the kubernetes-sigs/kustomize repo, and
|
||||||
# has cd'ed into it (i.e. the directory above "demos")
|
# has cd'ed into it (i.e. the directory above "examples")
|
||||||
# before running it.
|
# before running it.
|
||||||
#
|
#
|
||||||
# At time of writing, its 'call point' was in
|
# At time of writing, its 'call point' was in
|
||||||
@@ -79,6 +79,6 @@ function runTest {
|
|||||||
|
|
||||||
setUpEnv
|
setUpEnv
|
||||||
|
|
||||||
pushd demos
|
pushd examples
|
||||||
runTest ldap/integration_test.sh ldap/base
|
runTest ldap/integration_test.sh ldap/base
|
||||||
popd
|
popd
|
||||||
@@ -45,7 +45,7 @@ mkdir -p $BASE
|
|||||||
|
|
||||||
CONTENT="https://raw.githubusercontent.com\
|
CONTENT="https://raw.githubusercontent.com\
|
||||||
/kubernetes-sigs/kustomize\
|
/kubernetes-sigs/kustomize\
|
||||||
/master/demos/ldap"
|
/master/examples/ldap"
|
||||||
|
|
||||||
curl -s -o "$BASE/#1" "$CONTENT/base\
|
curl -s -o "$BASE/#1" "$CONTENT/base\
|
||||||
/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}"
|
/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}"
|
||||||
@@ -29,7 +29,7 @@ Download them:
|
|||||||
```
|
```
|
||||||
curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\
|
curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\
|
||||||
/kubernetes-sigs/kustomize\
|
/kubernetes-sigs/kustomize\
|
||||||
/master/demos/mySql\
|
/master/examples/mySql\
|
||||||
/{deployment,secret,service}.yaml"
|
/{deployment,secret,service}.yaml"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ Download them:
|
|||||||
```
|
```
|
||||||
CONTENT="https://raw.githubusercontent.com\
|
CONTENT="https://raw.githubusercontent.com\
|
||||||
/kubernetes-sigs/kustomize\
|
/kubernetes-sigs/kustomize\
|
||||||
/master/demos/springboot"
|
/master/examples/springboot"
|
||||||
|
|
||||||
curl -s -o "$DEMO_HOME/#1.yaml" \
|
curl -s -o "$DEMO_HOME/#1.yaml" \
|
||||||
"$CONTENT/base/{deployment,service}.yaml"
|
"$CONTENT/base/{deployment,service}.yaml"
|
||||||
Reference in New Issue
Block a user