Browse Source

docs: add more steps to dev guide

Lucas Severo Alves 4 years ago
parent
commit
45630062d6
1 changed files with 31 additions and 8 deletions
  1. 31 8
      docs/contributing-devguide.md

+ 31 - 8
docs/contributing-devguide.md

@@ -8,6 +8,17 @@ git clone https://github.com/external-secrets/external-secrets.git
 cd external-secrets
 cd external-secrets
 ```
 ```
 
 
+If you want to run controller tests you also need to install kubebuilder's `envtest`:
+
+```
+export KUBEBUILDER_TOOLS_VERSION='1.20.2' # check for latest version or a version that has support to what you are testing
+
+curl -sSLo envtest-bins.tar.gz "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-$KUBEBUILDER_TOOLS_VERSION-linux-amd64.tar.gz"
+
+sudo mkdir -p /usr/local/kubebuilder
+sudo tar -C /usr/local/kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz
+```
+
 ## Building & Testing
 ## Building & Testing
 
 
 The project uses the `make` build system. It'll run code generators, tests and
 The project uses the `make` build system. It'll run code generators, tests and
@@ -33,21 +44,19 @@ make docs
 
 
 ## Installing
 ## Installing
 
 
-To install the External Secret Operator's CRDs into a Kubernetes Cluster run:
+To install the External Secret Operator into a Kubernetes Cluster run:
 
 
 ```shell
 ```shell
-make crds.install
+helm repo add external-secrets https://charts.external-secrets.io
+helm repo update
+helm install external-secrets external-secrets/external-secrets
 ```
 ```
 
 
-Apply the sample resources:
-```shell
-kubectl apply -f docs/snippets/basic-secret-store.yaml
-kubectl apply -f docs/snippets/basic-external-secret.yaml
-```
+You can alternatively run the controller on your host system for development purposes:
 
 
-You can run the controller on your host system for development purposes:
 
 
 ```shell
 ```shell
+make crds.install
 make run
 make run
 ```
 ```
 
 
@@ -57,6 +66,20 @@ To remove the CRDs run:
 make crds.uninstall
 make crds.uninstall
 ```
 ```
 
 
+If you need to test some other k8s integrations and need the operator to be deployed to the actuall cluster while developing, you can use the following workflow:
+
+```
+kind create cluster --name external-secrets
+
+export TAG=v2
+export IMAGE=eso-local
+
+docker build . -t $IMAGE:$TAG --build-arg TARGETARCH=amd64 --build-arg TARGETOS=linux
+
+make helm.generate
+helm upgrade --install external-secrets ./deploy/charts/external-secrets/ --set image.repository=$IMAGE --set image.tag=$TAG
+```
+
 !!! note "Contributing Flow"
 !!! note "Contributing Flow"
     The HOW TO guide for contributing is at the [Contributing Process](contributing-process.md) page.
     The HOW TO guide for contributing is at the [Contributing Process](contributing-process.md) page.