Remove duplicate kustomize docs content

This commit is contained in:
Phillip Wittrock
2020-11-11 08:29:43 -08:00
parent 630fc9b973
commit 71b763888c
57 changed files with 53 additions and 4673 deletions

View File

@@ -9,51 +9,4 @@ description: >
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/bugs" />
[krusty package]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/krusty
[reusable custom transformer test]: https://github.com/kubernetes-sigs/kustomize/tree/master/api/krusty/customconfigreusable_test.go
File issues as desired, but if you've found a problem
with how `kustomize build` works, please report
* the output of `kustomize version`,
* the input (the content of `kustomization.yaml`
and any files it refers to),
* the expected YAML output.
## If you have `go` installed
kustomize has a simple test harness in the [krusty
package] for specifying a kustomization's input and the
expected output.
Copy one of those tests, e.g. this [reusable custom
transformer test], to a new test file in the
krusty package.
Insert the inputs you want to use, and run it as
you'd run the reusable custom transformer test:
```
(cd api; go test -run TestReusableCustomTransformers ./krusty)
```
The output will demonstrate the bug or missing feature.
Record this output in the test file in a call to
`AssertActualEqualsExpected`, per all the other tests
in the [krusty package]. This makes the test pass,
albeit with output demonstrating behavior you
presumably want to change.
Send the new test in a PR, along with commentary (in
the test) on what you'd prefer to see.
The person who fixes the bug then has a clear bug
reproduction and a test to modify when the bug is
fixed.
Any bug fix first requires a test demonstrating the bug
(so we have permanent regression coverage), so if the
_bug reporter_ does this, it saves time and avoids
misunderstandings.
Moved to https://github.com/kubernetes-sigs/cli-experimental

View File

@@ -9,18 +9,4 @@ description: >
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/community" />
[CLI special interest group]: https://github.com/kubernetes/community/tree/master/sig-cli#cli-special-interest-group
[contributor roles]: https://github.com/kubernetes/community/blob/master/community-membership.md#community-membership
[mailing list]: https://groups.google.com/forum/#!forum/kubernetes-sig-cli
[bi-weekly meetings]: https://docs.google.com/document/d/1r0YElcXt6G5mOWxwZiXgGu_X6he3F--wKwg-9UBc29I/edit?usp=sharing
[slack channel]: https://kubernetes.slack.com/messages/sig-cli
Kustomize is a sub project of the Kubernetes [CLI special interest group] and follows the Kubernetes
project [contributor roles].
If you are interested in contributing towards Kustomize or getting more involved with the community:
- join the [mailing list] and reach out
- join the [slack channel] and reach out
- attend one of the [bi-weekly meetings] (alternating Wednesdays at 9:00am Pacific Time)
Moved to https://github.com/kubernetes-sigs/cli-experimental

View File

@@ -9,76 +9,4 @@ description: >
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/docs" />
Kustomize uses [Docsy](https://www.docsy.dev) for the site, and was
forked from the [docsy-example](https://github.com/google/docsy-example)
## Prerequisites
- [Install hugo](https://gohugo.io/getting-started/installing/#fetch-from-github)
- Clone kustomize
- `git clone git@github.com:kubernetes-sigs/kustomize && cd kustomize/`
## Development
The doc input files are in the `site` directory. The site can be hosted locally using
`hugo serve`.
```shell script
cd site/
hugo serve
```
```shell script
...
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/kustomize/ (bind address 127.0.0.1)
```
## Publishing
Hugo compiles the files under `site` Hugo into html which it puts in the `docs` folder:
```shell script
cd site/
hugo
```
```shell script
| EN
-------------------+-----
Pages | 99
Paginator pages | 0
Non-page files | 0
Static files | 47
Processed images | 0
Aliases | 2
Sitemaps | 1
Cleaned | 0
```
Add the `site/` and `docs/` folders to a commit, then create a PR.
## Publishing docs to your kustomize fork
It is possible to have the kustomize docs published to your forks github pages.
### Setup GitHub Pages for the fork
1. Go to the *forked repo's* **Settings** tab
- e.g. [https://github.com/pwittrock/kustomize](https://github.com/pwittrock/kustomize)
2. Go to the **GitHub Pages** section
3. Set the source to master branch **/docs folder**
### Publish to the fork's GitHub Pages
{{% pageinfo color="info" %}}
Changes must be pushed to the fork's **master branch** to be served as the fork's GitHub Page.
{{% /pageinfo %}}
1. Make a change to a file under `site/content`
2. Run `hugo` from the `site/` directory
3. Add the `site` and `docs` directories to the **master branch**
4. Commit and push the changes to the *remote fork's* **master branch**
5. After a few minutes, the docs should be served from the fork's GitHub Page
- e.g. [https://pwittrock.github.io/kustomize/](https://pwittrock.github.io/kustomize/)
Moved to https://github.com/kubernetes-sigs/cli-experimental

View File

@@ -8,32 +8,4 @@ description: >
---
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/features" />
[issue]: https://github.com/kubernetes-sigs/kustomize/issues
[sig-cli]: /kustomize/contributing/community/
[meeting agenda]: https://docs.google.com/document/d/1r0YElcXt6G5mOWxwZiXgGu_X6he3F--wKwg-9UBc29I/edit#heading=h.himo1st0tqyy
[KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cli
[table-driven]: https://github.com/kubernetes-sigs/kustomize/blob/a8b9741866cf8e0c43e643ab7a9f40a3bd7e2a4d/api/filters/imagetag/imagetag_test.go#L15
[eschewed feature list]: https://kubernetes-sigs.github.io/kustomize/faq/eschewedfeatures/
[kind/feature]: https://github.com/kubernetes-sigs/kustomize/labels/kind%2Ffeature
Following is the process for proposing a new Kustomize feature:
1. Check the [eschewed feature list] to see if the feature has already been proposed
2. File an [issue] describing the desired feature
- label it [kind/feature]
- the motivation for the feature
- example of how you would accomplish the motivating task *without* the feature
- example of how you would accomplish the motivating task *with* the feature
3. Email the [sig-cli] mailing list with the issue
4. Present the issue at [sig-cli] bi-weekly meeting on Zoom
- add it to the [meeting agenda] doc
- be present to discuss the feature
- response may be -- move forward with a PoC, not to move forward, defer and come back later,
or more information is needed.
5. Address the feedback on the issue
- Possibly write a KEP for tracking the feature
6. Implement the feature and send a PR
- Add [table-driven] tests
- Expect comments on the PR within 2 weeks
7. Kustomize team will release the kustomize `api` and `kustomize` modules
Moved to https://github.com/kubernetes-sigs/cli-experimental

View File

@@ -9,60 +9,4 @@ description: >
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/howitworks" />
{{% pageinfo color="info" %}}
To build kustomize using the locally modified modules, `replace` statements must be added to
the `kustomize/go.mod`.
e.g. if code in `api` was modified, a `replace` statement would need to be added for the
`kustomize/api` module.
{{% /pageinfo %}}
Call stack when running `kustomize build`, with links to code.
## Run build
* [RunBuild](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/kustomize/internal/commands/build/build.go#L121)
* [MakeKustomizer](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/krusty/kustomizer.go#L32)
* [Run](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/krusty/kustomizer.go#L47): performs a kustomization. It uses its internal filesystem reference to read the file at the given path argument, interpret it as a kustomization.yaml file, perform the kustomization it represents, and return the resulting resources.
* Create factories
* [tranformer.NewFactoryImpl](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/k8sdeps/transformer/factory.go#L17)
* [resmap.NewFactory](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/resmap/factory.go#L21)
* [resource.NewFactory](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/resource/factory.go#L23)
* [kustruct.NewKunstructuredFactoryImpl](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/k8sdeps/kunstruct/factory.go#L28)
* [loader.NewLoader](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/loader/loader.go#L19)
* [validator.NewKustValidator](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/k8sdeps/validator/validators.go#L23)
* [NewKustTarget](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L38)
* [Load](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L54)
* [MakeCustomizeResMap](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L109): details in next section
* [emitResources](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/kustomize/internal/commands/build/build.go#L143)
## Make resource map
* [makeCustomizeResMap](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L117)
* [AccumulateTarget](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L196): returns a new ResAccumulator, holding customized resources and the data/rules used to do so. The name back references and vars are not yet fixed.
* [accummulateResources](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L302): fills the given resourceAccumulator with resources read from the given list of paths.
* Merge config from builtin and CRDs
* [runGenerators](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L239)
* [configureBuiltinGenerators](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget_configplugin.go#L28)
* ConfigMapGenerator
* SecretGenerator
* [configureExternalGenerators]()
* Iterate all generators
* [runTransfomers](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L274)
* [configureBuiltinTransformers](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget_configplugin.go#L44)
* PatchStrategicMergeTransformer
* PatchTransformer
* NamespaceTransformer
* PrefixSuffixTransformer
* LabelTransformer
* AnnotationsTransformer
* PatchJson6902Transformer
* ReplicaCountTransformer
* ImageTagTransformer
* [configureExternalTransformers](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L291)
* [MergeVars](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/accumulator/resaccumulator.go#L64)
* The following steps must be done last, not as part of the recursion implicit in AccumulateTarget.
* [addHashesToNames](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L153)
* [FixBackReferences](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/accumulator/resaccumulator.go#L160): Given that names have changed (prefixs/suffixes added), fix all the back references to those names.
* [ResolveVars](https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/accumulator/resaccumulator.go#L141)
Moved to https://github.com/kubernetes-sigs/cli-experimental

View File

@@ -8,40 +8,4 @@ description: >
---
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/mac" />
First install the tools to build and run tests
### Install go 1.13
[Instructions](https://golang.org/doc/install)
Add `go` to your PATH
### Install kubeval
[Instructions](https://github.com/instrumenta/kubeval)
```sh
go get github.com/instrumenta/kubeval
```
Add `kubeval` to your PATH
### Install gnu tools
[Instructions](https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/)
```sh
brew install coreutils wget gnu-sed tree
```
Add the new tools to your PATH
## Make everything
Verify your install by running `make`:
```sh
make
```
Be default, this runs all tests needed to qualify a pull request.
Moved to https://github.com/kubernetes-sigs/cli-experimental

View File

@@ -9,60 +9,4 @@ description: >
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/windows" />
This is the PowerShell script to run all go tests for Kustomize on a windows based platform which mimics /build/pre-commit.sh
## Pre-Reqs
- PowerShell installed
- PowerShell Core is supported
- go installed
- golangci-lint installed
- mdrip installed
This script should output to the current console and return an exit code if all tests are successful(0) or any failed(1).
### If you are tryin to run these tests locally you can follow these instructions
Assume:
- Running a stock Windows 10 system
- Local Admin rights.
- You can open [PowerShell as administrator](http://lmgtfy.com/?iie=1&q=How+to+open+powershell+as+administrator)
- You should be knowledgeable enough to pull source for packages into your GO ```src``` directory
- Yes, this means you also need to know a bit about **git** usually
#### Step 1 - Install Go
- [Install Go](https://golang.org/dl/) - please use the msi
- If you use chocolatey - it's using the zip not msi and assumptions on where go is located are made for you.
#### Step 2 - Install Go Packages
- Open new PowerShell Administrative window
- Install golangci-lint
- ```go get -u github.com/golangci/golangci-lint/cmd/golangci-lint```
- Install mdrip
- ```go get github.com/monopole/mdrip```
You should now be able to issue these commands and see comparable responses
```
C:\...> golangci-lint --help
Smart, fast linters runner. Run it in cloud for every GitHub pull request on https://golangci.com
...
C:\...> mdrip --help
Usage: C:\_go\bin\mdrip.exe {fileName}...
...
```
#### Step 3 - Get Source and Test
- In your GoRoot src
- ```Example: C:\_go\src```
- Navigate to the Kustomize `travis` directory
- ```Example: C:\_go\src\sigs.k8s.io\kustomize\scripts```
- Now Execute:
- ```.\Invoke-PreCommit.ps1```
This should run all pre-commit tests thus defined in the script.
Moved to https://github.com/kubernetes-sigs/cli-experimental