|
|
@@ -360,6 +360,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
+ <li class="md-nav__item">
|
|
|
+ <a href="../guides-controller-class/" class="md-nav__link">
|
|
|
+ Controller Classes
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<li class="md-nav__item">
|
|
|
<a href="../guides-all-keys-one-secret/" class="md-nav__link">
|
|
|
All keys, One secret
|
|
|
@@ -1056,15 +1068,22 @@ then clone the repo:</p>
|
|
|
<span class="nb">cd</span> external-secrets
|
|
|
</code></pre></div>
|
|
|
|
|
|
-<p>If you want to run controller tests you also need to install kubebuilder's <code>envtest</code>:</p>
|
|
|
-<div class="highlight"><pre><span></span><code>export KUBEBUILDER_TOOLS_VERSION='1.20.2' # check for latest version or a version that has support to what you are testing
|
|
|
+<p>If you want to run controller tests you also need to install kubebuilder's <code>envtest</code>.</p>
|
|
|
+<p>The recommended way to do so is to install <a href="https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest">setup-envtest</a></p>
|
|
|
+<p>Here is an example on how to set it up:</p>
|
|
|
+<div class="highlight"><pre><span></span><code>go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
|
|
|
|
|
|
-curl -sSLo envtest-bins.tar.gz "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-$KUBEBUILDER_TOOLS_VERSION-linux-amd64.tar.gz"
|
|
|
+# list available versions
|
|
|
+setup-envtest list --os $(go env GOOS) --arch $(go env GOARCH)
|
|
|
|
|
|
-sudo mkdir -p /usr/local/kubebuilder
|
|
|
-sudo tar -C /usr/local/kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz
|
|
|
+# To use a specific version
|
|
|
+setup-envtest use -p path 1.20.2
|
|
|
+
|
|
|
+#To set environment variables
|
|
|
+source <(setup-envtest use 1.20.2 -p env --os $(go env GOOS) --arch $(go env GOARCH))
|
|
|
</code></pre></div>
|
|
|
|
|
|
+<p>for more information, please see <a href="https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest">setup-envtest docs</a></p>
|
|
|
<h2 id="building-testing">Building & Testing</h2>
|
|
|
<p>The project uses the <code>make</code> build system. It'll run code generators, tests and
|
|
|
static code analysis.</p>
|
|
|
@@ -1102,8 +1121,15 @@ make run
|
|
|
export TAG=v2
|
|
|
export IMAGE=eso-local
|
|
|
|
|
|
+#For building in linux
|
|
|
docker build . -t $IMAGE:$TAG --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux
|
|
|
|
|
|
+#For building in MacOS (OSX)
|
|
|
+#docker build . -t $IMAGE:$TAG --build-arg TARGETARCH=amd64 --build-arg TARGETOS=darwin
|
|
|
+
|
|
|
+#For building in ARM
|
|
|
+#docker build . -t $IMAGE:$TAG --build-arg TARGETARCH=arm --build-arg TARGETOS=linux
|
|
|
+
|
|
|
make helm.generate
|
|
|
helm upgrade --install external-secrets ./deploy/charts/external-secrets/ --set image.repository=$IMAGE --set image.tag=$TAG
|
|
|
</code></pre></div>
|