mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-15 17:51:01 +00:00
Update the devguide (#2588)
Signed-off-by: shuheiktgw <s-kitagawa@mercari.com>
This commit is contained in:
parent
bb68e04407
commit
2566798d08
1 changed files with 4 additions and 25 deletions
|
@ -10,28 +10,6 @@ cd external-secrets
|
||||||
|
|
||||||
_Note: many of the `make` commands use [yq](https://github.com/mikefarah/yq), version 4.2X.X or higher._
|
_Note: many of the `make` commands use [yq](https://github.com/mikefarah/yq), version 4.2X.X or higher._
|
||||||
|
|
||||||
If you want to run controller tests you also need to install kubebuilder's `envtest`.
|
|
||||||
|
|
||||||
The recommended way to do so is to install [setup-envtest](https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest)
|
|
||||||
|
|
||||||
Here is an example on how to set it up:
|
|
||||||
|
|
||||||
```
|
|
||||||
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
|
|
||||||
|
|
||||||
# list available versions
|
|
||||||
setup-envtest list --os $(go env GOOS) --arch $(go env GOARCH)
|
|
||||||
|
|
||||||
# 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))
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
for more information, please see [setup-envtest docs](https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest)
|
|
||||||
|
|
||||||
Our helm chart is tested using `helm-unittest`. You will need it to run tests locally if you modify the helm chart. Install it with the following command:
|
Our helm chart is tested using `helm-unittest`. You will need it to run tests locally if you modify the helm chart. Install it with the following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -50,7 +28,7 @@ make build
|
||||||
make docker.build IMG=external-secrets:latest
|
make docker.build IMG=external-secrets:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Run tests and lint the code: *(golangci-lint@1.49.0 is needed.)*
|
Run tests and lint the code:
|
||||||
```shell
|
```shell
|
||||||
make test
|
make test
|
||||||
make lint # OR
|
make lint # OR
|
||||||
|
@ -102,8 +80,9 @@ make docker.build
|
||||||
kind load docker-image $IMAGE:$TAG -n external-secrets
|
kind load docker-image $IMAGE:$TAG -n external-secrets
|
||||||
|
|
||||||
# (Optional) Pull the image from GitHub Repo to copy into kind
|
# (Optional) Pull the image from GitHub Repo to copy into kind
|
||||||
#docker pull ghcr.io/external-secrets/external-secrets:v0.8.2
|
# docker pull ghcr.io/external-secrets/external-secrets:v0.8.2
|
||||||
#kind load docker-image ghcr.io/external-secrets/external-secrets:v0.8.2 -n external-secrets
|
# kind load docker-image ghcr.io/external-secrets/external-secrets:v0.8.2 -n external-secrets
|
||||||
|
# export TAG=v0.8.2
|
||||||
|
|
||||||
# Update helm charts and install to KinD cluster
|
# Update helm charts and install to KinD cluster
|
||||||
make helm.generate
|
make helm.generate
|
||||||
|
|
Loading…
Reference in a new issue