mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
update docs site
This commit is contained in:
@@ -439,39 +439,7 @@
|
||||
<h1>Filing Bugs</h1>
|
||||
<div class="lead">How to file bugs and fix Kustomize bugs</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/bugs" />
|
||||
<p>File issues as desired, but if you’ve found a problem
|
||||
with how <code>kustomize build</code> works, please report</p>
|
||||
<ul>
|
||||
<li>the output of <code>kustomize version</code>,</li>
|
||||
<li>the input (the content of <code>kustomization.yaml</code>
|
||||
and any files it refers to),</li>
|
||||
<li>the expected YAML output.</li>
|
||||
</ul>
|
||||
<h2 id="if-you-have-go-installed">If you have <code>go</code> installed</h2>
|
||||
<p>kustomize has a simple test harness in the <a href="https://github.com/kubernetes-sigs/kustomize/tree/master/api/krusty">krusty
|
||||
package</a> for specifying a kustomization’s input and the
|
||||
expected output.</p>
|
||||
<p>Copy one of those tests, e.g. this <a href="https://github.com/kubernetes-sigs/kustomize/tree/master/api/krusty/customconfigreusable_test.go">reusable custom
|
||||
transformer test</a>, to a new test file in the
|
||||
krusty package.</p>
|
||||
<p>Insert the inputs you want to use, and run it as
|
||||
you’d run the reusable custom transformer test:</p>
|
||||
<pre><code>(cd api; go test -run TestReusableCustomTransformers ./krusty)
|
||||
</code></pre><p>The output will demonstrate the bug or missing feature.</p>
|
||||
<p>Record this output in the test file in a call to
|
||||
<code>AssertActualEqualsExpected</code>, per all the other tests
|
||||
in the <a href="https://github.com/kubernetes-sigs/kustomize/tree/master/api/krusty">krusty package</a>. This makes the test pass,
|
||||
albeit with output demonstrating behavior you
|
||||
presumably want to change.</p>
|
||||
<p>Send the new test in a PR, along with commentary (in
|
||||
the test) on what you’d prefer to see.</p>
|
||||
<p>The person who fixes the bug then has a clear bug
|
||||
reproduction and a test to modify when the bug is
|
||||
fixed.</p>
|
||||
<p>Any bug fix first requires a test demonstrating the bug
|
||||
(so we have permanent regression coverage), so if the
|
||||
<em>bug reporter</em> does this, it saves time and avoids
|
||||
misunderstandings.</p>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -501,7 +469,7 @@ misunderstandings.</p>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -439,14 +439,7 @@
|
||||
<h1>Community Engagment</h1>
|
||||
<div class="lead">Joining SIG-CLI and the Kubernetes community</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/community" />
|
||||
<p>Kustomize is a sub project of the Kubernetes <a href="https://github.com/kubernetes/community/tree/master/sig-cli#cli-special-interest-group">CLI special interest group</a> and follows the Kubernetes
|
||||
project <a href="https://github.com/kubernetes/community/blob/master/community-membership.md#community-membership">contributor roles</a>.</p>
|
||||
<p>If you are interested in contributing towards Kustomize or getting more involved with the community:</p>
|
||||
<ul>
|
||||
<li>join the <a href="https://groups.google.com/forum/#!forum/kubernetes-sig-cli">mailing list</a> and reach out</li>
|
||||
<li>join the <a href="https://kubernetes.slack.com/messages/sig-cli">slack channel</a> and reach out</li>
|
||||
<li>attend one of the <a href="https://docs.google.com/document/d/1r0YElcXt6G5mOWxwZiXgGu_X6he3F--wKwg-9UBc29I/edit?usp=sharing">bi-weekly meetings</a> (alternating Wednesdays at 9:00am Pacific Time)</li>
|
||||
</ul>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -476,7 +469,7 @@ project <a href="https://github.com/kubernetes/community/blob/master/community-m
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -403,20 +403,6 @@
|
||||
|
||||
|
||||
|
||||
<nav id="TableOfContents">
|
||||
<ul>
|
||||
<li><a href="#prerequisites">Prerequisites</a></li>
|
||||
<li><a href="#development">Development</a></li>
|
||||
<li><a href="#publishing">Publishing</a></li>
|
||||
<li><a href="#publishing-docs-to-your-kustomize-fork">Publishing docs to your kustomize fork</a>
|
||||
<ul>
|
||||
<li><a href="#setup-github-pages-for-the-fork">Setup GitHub Pages for the fork</a></li>
|
||||
<li><a href="#publish-to-the-forks-github-pages">Publish to the fork’s GitHub Pages</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -453,71 +439,7 @@
|
||||
<h1>Writing Docs</h1>
|
||||
<div class="lead">How to make Kustomize docs contributions</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/docs" />
|
||||
<p>Kustomize uses <a href="https://www.docsy.dev">Docsy</a> for the site, and was
|
||||
forked from the <a href="https://github.com/google/docsy-example">docsy-example</a></p>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<ul>
|
||||
<li><a href="https://gohugo.io/getting-started/installing/#fetch-from-github">Install hugo</a></li>
|
||||
<li>Clone kustomize
|
||||
<ul>
|
||||
<li><code>git clone git@github.com:kubernetes-sigs/kustomize && cd kustomize/</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="development">Development</h2>
|
||||
<p>The doc input files are in the <code>site</code> directory. The site can be hosted locally using
|
||||
<code>hugo serve</code>.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#204a87">cd</span> site/
|
||||
hugo serve
|
||||
</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-shell" data-lang="shell">...
|
||||
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
|
||||
Web Server is available at http://localhost:1313/kustomize/ <span style="color:#ce5c00;font-weight:bold">(</span><span style="color:#204a87">bind</span> address 127.0.0.1<span style="color:#ce5c00;font-weight:bold">)</span>
|
||||
</code></pre></div><h2 id="publishing">Publishing</h2>
|
||||
<p>Hugo compiles the files under <code>site</code> Hugo into html which it puts in the <code>docs</code> folder:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#204a87">cd</span> site/
|
||||
hugo
|
||||
</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-shell" data-lang="shell"> <span style="color:#000;font-weight:bold">|</span> EN
|
||||
-------------------+-----
|
||||
Pages <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">99</span>
|
||||
Paginator pages <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">0</span>
|
||||
Non-page files <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">0</span>
|
||||
Static files <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">47</span>
|
||||
Processed images <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">0</span>
|
||||
Aliases <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">2</span>
|
||||
Sitemaps <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">1</span>
|
||||
Cleaned <span style="color:#000;font-weight:bold">|</span> <span style="color:#0000cf;font-weight:bold">0</span>
|
||||
</code></pre></div><p>Add the <code>site/</code> and <code>docs/</code> folders to a commit, then create a PR.</p>
|
||||
<h2 id="publishing-docs-to-your-kustomize-fork">Publishing docs to your kustomize fork</h2>
|
||||
<p>It is possible to have the kustomize docs published to your forks github pages.</p>
|
||||
<h3 id="setup-github-pages-for-the-fork">Setup GitHub Pages for the fork</h3>
|
||||
<ol>
|
||||
<li>Go to the <em>forked repo’s</em> <strong>Settings</strong> tab
|
||||
<ul>
|
||||
<li>e.g. <a href="https://github.com/pwittrock/kustomize">https://github.com/pwittrock/kustomize</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Go to the <strong>GitHub Pages</strong> section</li>
|
||||
<li>Set the source to master branch <strong>/docs folder</strong></li>
|
||||
</ol>
|
||||
<h3 id="publish-to-the-forks-github-pages">Publish to the fork’s GitHub Pages</h3>
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-info">
|
||||
<p>Changes must be pushed to the fork’s <strong>master branch</strong> to be served as the fork’s GitHub Page.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<ol>
|
||||
<li>Make a change to a file under <code>site/content</code></li>
|
||||
<li>Run <code>hugo</code> from the <code>site/</code> directory</li>
|
||||
<li>Add the <code>site</code> and <code>docs</code> directories to the <strong>master branch</strong></li>
|
||||
<li>Commit and push the changes to the <em>remote fork’s</em> <strong>master branch</strong></li>
|
||||
<li>After a few minutes, the docs should be served from the fork’s GitHub Page
|
||||
<ul>
|
||||
<li>e.g. <a href="https://pwittrock.github.io/kustomize/">https://pwittrock.github.io/kustomize/</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -547,7 +469,7 @@ hugo
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -439,39 +439,7 @@
|
||||
<h1>Contributing Features</h1>
|
||||
<div class="lead">How to contribute features</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/features" />
|
||||
<p>Following is the process for proposing a new Kustomize feature:</p>
|
||||
<ol>
|
||||
<li>Check the <a href="https://kubernetes-sigs.github.io/kustomize/faq/eschewedfeatures/">eschewed feature list</a> to see if the feature has already been proposed</li>
|
||||
<li>File an <a href="https://github.com/kubernetes-sigs/kustomize/issues">issue</a> describing the desired feature
|
||||
<ul>
|
||||
<li>label it <a href="https://github.com/kubernetes-sigs/kustomize/labels/kind%2Ffeature">kind/feature</a></li>
|
||||
<li>the motivation for the feature</li>
|
||||
<li>example of how you would accomplish the motivating task <em>without</em> the feature</li>
|
||||
<li>example of how you would accomplish the motivating task <em>with</em> the feature</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Email the <a href="/kustomize/contributing/community/">sig-cli</a> mailing list with the issue</li>
|
||||
<li>Present the issue at <a href="/kustomize/contributing/community/">sig-cli</a> bi-weekly meeting on Zoom
|
||||
<ul>
|
||||
<li>add it to the <a href="https://docs.google.com/document/d/1r0YElcXt6G5mOWxwZiXgGu_X6he3F--wKwg-9UBc29I/edit#heading=h.himo1st0tqyy">meeting agenda</a> doc</li>
|
||||
<li>be present to discuss the feature</li>
|
||||
<li>response may be – move forward with a PoC, not to move forward, defer and come back later,
|
||||
or more information is needed.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Address the feedback on the issue
|
||||
<ul>
|
||||
<li>Possibly write a KEP for tracking the feature</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Implement the feature and send a PR
|
||||
<ul>
|
||||
<li>Add <a href="https://github.com/kubernetes-sigs/kustomize/blob/a8b9741866cf8e0c43e643ab7a9f40a3bd7e2a4d/api/filters/imagetag/imagetag_test.go#L15">table-driven</a> tests</li>
|
||||
<li>Expect comments on the PR within 2 weeks</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Kustomize team will release the kustomize <code>api</code> and <code>kustomize</code> modules</li>
|
||||
</ol>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -501,7 +469,7 @@ or more information is needed.</li>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -439,100 +439,7 @@
|
||||
<h1>Writing Code</h1>
|
||||
<div class="lead">How to modify Kustomize</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/howitworks" />
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-info">
|
||||
<p>To build kustomize using the locally modified modules, <code>replace</code> statements must be added to
|
||||
the <code>kustomize/go.mod</code>.</p>
|
||||
<p>e.g. if code in <code>api</code> was modified, a <code>replace</code> statement would need to be added for the
|
||||
<code>kustomize/api</code> module.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>Call stack when running <code>kustomize build</code>, with links to code.</p>
|
||||
<h2 id="run-build">Run build</h2>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/kustomize/internal/commands/build/build.go#L121">RunBuild</a>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/krusty/kustomizer.go#L32">MakeKustomizer</a></li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/krusty/kustomizer.go#L47">Run</a>: 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.
|
||||
<ul>
|
||||
<li>Create factories
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/k8sdeps/transformer/factory.go#L17">tranformer.NewFactoryImpl</a></li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/resmap/factory.go#L21">resmap.NewFactory</a>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/resource/factory.go#L23">resource.NewFactory</a>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/k8sdeps/kunstruct/factory.go#L28">kustruct.NewKunstructuredFactoryImpl</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/loader/loader.go#L19">loader.NewLoader</a></li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/k8sdeps/validator/validators.go#L23">validator.NewKustValidator</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L38">NewKustTarget</a></li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L54">Load</a></li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L109">MakeCustomizeResMap</a>: details in next section</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/kustomize/internal/commands/build/build.go#L143">emitResources</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 id="make-resource-map">Make resource map</h2>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L117">makeCustomizeResMap</a>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L196">AccumulateTarget</a>: 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.
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L302">accummulateResources</a>: fills the given resourceAccumulator with resources read from the given list of paths.</li>
|
||||
<li>Merge config from builtin and CRDs</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L239">runGenerators</a>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget_configplugin.go#L28">configureBuiltinGenerators</a>
|
||||
<ul>
|
||||
<li>ConfigMapGenerator</li>
|
||||
<li>SecretGenerator</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="">configureExternalGenerators</a></li>
|
||||
<li>Iterate all generators</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L274">runTransfomers</a>
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget_configplugin.go#L44">configureBuiltinTransformers</a>
|
||||
<ul>
|
||||
<li>PatchStrategicMergeTransformer</li>
|
||||
<li>PatchTransformer</li>
|
||||
<li>NamespaceTransformer</li>
|
||||
<li>PrefixSuffixTransformer</li>
|
||||
<li>LabelTransformer</li>
|
||||
<li>AnnotationsTransformer</li>
|
||||
<li>PatchJson6902Transformer</li>
|
||||
<li>ReplicaCountTransformer</li>
|
||||
<li>ImageTagTransformer</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L291">configureExternalTransformers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/accumulator/resaccumulator.go#L64">MergeVars</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>The following steps must be done last, not as part of the recursion implicit in AccumulateTarget.
|
||||
<ul>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/target/kusttarget.go#L153">addHashesToNames</a></li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/accumulator/resaccumulator.go#L160">FixBackReferences</a>: Given that names have changed (prefixs/suffixes added), fix all the back references to those names.</li>
|
||||
<li><a href="https://github.com/kubernetes-sigs/kustomize/blob/c7d78970fb86782dbdded3a93944b774f826071f/api/internal/accumulator/resaccumulator.go#L141">ResolveVars</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -562,7 +469,7 @@ the <code>kustomize/go.mod</code>.</p>
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -403,19 +403,6 @@
|
||||
|
||||
|
||||
|
||||
<nav id="TableOfContents">
|
||||
<ul>
|
||||
<li>
|
||||
<ul>
|
||||
<li><a href="#install-go-113">Install go 1.13</a></li>
|
||||
<li><a href="#install-kubeval">Install kubeval</a></li>
|
||||
<li><a href="#install-gnu-tools">Install gnu tools</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#make-everything">Make everything</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -452,22 +439,7 @@
|
||||
<h1>MacOS Dev Guide</h1>
|
||||
<div class="lead">How to develop on MacOS</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/mac" />
|
||||
<p>First install the tools to build and run tests</p>
|
||||
<h3 id="install-go-113">Install go 1.13</h3>
|
||||
<p><a href="https://golang.org/doc/install">Instructions</a></p>
|
||||
<p>Add <code>go</code> to your PATH</p>
|
||||
<h3 id="install-kubeval">Install kubeval</h3>
|
||||
<p><a href="https://github.com/instrumenta/kubeval">Instructions</a></p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">go get github.com/instrumenta/kubeval
|
||||
</code></pre></div><p>Add <code>kubeval</code> to your PATH</p>
|
||||
<h3 id="install-gnu-tools">Install gnu tools</h3>
|
||||
<p><a href="https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/">Instructions</a></p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew install coreutils wget gnu-sed tree
|
||||
</code></pre></div><p>Add the new tools to your PATH</p>
|
||||
<h2 id="make-everything">Make everything</h2>
|
||||
<p>Verify your install by running <code>make</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">make
|
||||
</code></pre></div><p>Be default, this runs all tests needed to qualify a pull request.</p>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -497,7 +469,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -403,16 +403,6 @@
|
||||
|
||||
|
||||
|
||||
<nav id="TableOfContents">
|
||||
<ul>
|
||||
<li><a href="#pre-reqs">Pre-Reqs</a>
|
||||
<ul>
|
||||
<li><a href="#if-you-are-tryin-to-run-these-tests-locally-you-can-follow-these-instructions">If you are tryin to run these tests locally you can follow these instructions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -449,83 +439,7 @@
|
||||
<h1>Windows Dev Guide</h1>
|
||||
<div class="lead">How to develop on Windows</div>
|
||||
<meta http-equiv="refresh" content="0; url=https://kubectl.docs.kubernetes.io/contributing/kustomize/windows" />
|
||||
<p>This is the PowerShell script to run all go tests for Kustomize on a windows based platform which mimics /build/pre-commit.sh</p>
|
||||
<h2 id="pre-reqs">Pre-Reqs</h2>
|
||||
<ul>
|
||||
<li>PowerShell installed
|
||||
<ul>
|
||||
<li>PowerShell Core is supported</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>go installed</li>
|
||||
<li>golangci-lint installed</li>
|
||||
<li>mdrip installed</li>
|
||||
</ul>
|
||||
<p>This script should output to the current console and return an exit code if all tests are successful(0) or any failed(1).</p>
|
||||
<h3 id="if-you-are-tryin-to-run-these-tests-locally-you-can-follow-these-instructions">If you are tryin to run these tests locally you can follow these instructions</h3>
|
||||
<p>Assume:</p>
|
||||
<ul>
|
||||
<li>Running a stock Windows 10 system</li>
|
||||
<li>Local Admin rights.</li>
|
||||
<li>You can open <a href="http://lmgtfy.com/?iie=1&q=How+to+open+powershell+as+administrator">PowerShell as administrator</a></li>
|
||||
<li>You should be knowledgeable enough to pull source for packages into your GO <code>src</code> directory
|
||||
<ul>
|
||||
<li>Yes, this means you also need to know a bit about <strong>git</strong> usually</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 id="step-1---install-go">Step 1 - Install Go</h4>
|
||||
<ul>
|
||||
<li><a href="https://golang.org/dl/">Install Go</a> - please use the msi
|
||||
<ul>
|
||||
<li>If you use chocolatey - it’s using the zip not msi and assumptions on where go is located are made for you.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 id="step-2---install-go-packages">Step 2 - Install Go Packages</h4>
|
||||
<ul>
|
||||
<li>Open new PowerShell Administrative window
|
||||
<ul>
|
||||
<li>Install golangci-lint
|
||||
<ul>
|
||||
<li><code>go get -u github.com/golangci/golangci-lint/cmd/golangci-lint</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Install mdrip
|
||||
<ul>
|
||||
<li><code>go get github.com/monopole/mdrip</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>You should now be able to issue these commands and see comparable responses</p>
|
||||
<pre><code>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}...
|
||||
...
|
||||
</code></pre><h4 id="step-3---get-source-and-test">Step 3 - Get Source and Test</h4>
|
||||
<ul>
|
||||
<li>In your GoRoot src
|
||||
<ul>
|
||||
<li><code>Example: C:\_go\src</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Navigate to the Kustomize <code>travis</code> directory
|
||||
<ul>
|
||||
<li><code>Example: C:\_go\src\sigs.k8s.io\kustomize\scripts</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Now Execute:
|
||||
<ul>
|
||||
<li><code>.\Invoke-PreCommit.ps1</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>This should run all pre-commit tests thus defined in the script.</p>
|
||||
<p>Moved to <a href="https://github.com/kubernetes-sigs/cli-experimental">https://github.com/kubernetes-sigs/cli-experimental</a></p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
@@ -555,7 +469,7 @@ Usage: C:\_go\bin\mdrip.exe {fileName}...
|
||||
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 4, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/0834e152b203ffeccfbbf1ddd3c1f49debdac341">Redirect kustomize docs to the new unified site. (0834e152)</a>
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified November 11, 2020: <a href="https://github.com/kubernetes-sigs/kustomize/commit/71b763888cad614abb44b3086e291fe72d601080">Remove duplicate kustomize docs content (71b76388)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user