Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Development Guidelines Update #95

Closed
jonatasbaldin opened this issue Mar 30, 2021 · 3 comments · Fixed by #364
Closed

Local Development Guidelines Update #95

jonatasbaldin opened this issue Mar 30, 2021 · 3 comments · Fixed by #364

Comments

@jonatasbaldin
Copy link
Contributor

Hi there,

This is not an issue, more like an idea to contribute to the Development Guidelines. I'm using these commands to get the operator up and running in a Kind cluster locally (if you want to test some K8S integration that needs more than make run).

# get cluster up and running
kind create cluster
# does everything else
export TAG=v2
export IMAGE=eso-local

GOOS=linux make build
docker build . -t $IMAGE:$TAG
kind load docker-image $IMAGE:$TAG
make helm.generate
helm upgrade --install external-secrets ./deploy/charts/external-secrets/ --set image.repository=$IMAGE --set image.tag=$TAG

If need a new version, I just update TAG and run the last script all over again.

What do you think about adding this info to the contribution guidelines?

@jonatasbaldin jonatasbaldin changed the title Local Development Guidelines? Local Development Guidelines Update Mar 30, 2021
@knelasevero
Copy link
Member

I like this :)

BTW we now have github discussions enabled in the repo: https://github.com/external-secrets/external-secrets/discussions

We can use it for forum like threads when it makes sense

@knelasevero
Copy link
Member

knelasevero commented May 31, 2021

Oh, I think that we need to tell devs to install kubebuilder on our dev guides, this is missing right now:

would be something like our ci

export  KUBEBUILDER_VERSION='2.3.1'

curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/v"$KUBEBUILDER_VERSION"/kubebuilder_"$KUBEBUILDER_VERSION"_linux_amd64.tar.gz > kubebuilder_"$KUBEBUILDER_VERSION"_linux_amd64.tar.gz          

tar -xvf kubebuilder_"$KUBEBUILDER_VERSION"_linux_amd64.tar.gz          

sudo mv kubebuilder_"$KUBEBUILDER_VERSION"_linux_amd64 /usr/local/kubebuilder

We cannot run controller tests without it, right?

@alekc
Copy link
Contributor

alekc commented Sep 6, 2021

Just adding this one here for now before opening a new issue pr:

To have a different install of kubebuilder (local to project)

export KUBEBUILDER_TOOLS_VERSION='1.20.2'

curl -sSLo envtest-bins.tar.gz "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-$KUBEBUILDER_TOOLS_VERSION-linux-amd64.tar.gz"

 mkdir kubebuilder
 tar -C ./kubebuilder --strip-components=1 -zvxf envtest-bins.tar.gz
 export KUBEBUILDER_ASSETS=$(pwd)/kubebuilder/bin/
 make test

Also, we should bring in kubernetes-sigs/controller-runtime#1488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants