Skip to content

Commit

Permalink
Update kind and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
matthchr committed Apr 18, 2023
1 parent 303006d commit b50e974
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ RUN ./install-dependencies.sh devcontainer && rm install-dependencies.sh

# Setup envtest
# NB: if you change this, dev.sh also likely needs updating, also need to update the env below
RUN setup-envtest use 1.23.5 --bin-dir /usr/local/envtest/bin
RUN setup-envtest use 1.26.1 --bin-dir /usr/local/envtest/bin
# Set the KUBEBUILDER_ASSETS variable. Ideally we could do source <(setup-envtest use --bin-dir /usr/local/envtest/bin -i -p env)
# but there's no way to dynamically set an env variable for all container users.
# Many usages of this container are from docker exec task <x>, where no shell is invoked and the entrypoint is not run
# (entrypoint is only run on start, not on exec). Due to that, the following approaches do not work:
# - ~/.bashrc - only works for one user in a shell but we must support -u $(id -u ${USER}):$(id -g ${USER}) which means the container could run as more than 1 user
# - /etc/profile or /etc/profile.d - only works for one user in a login shell
ENV KUBEBUILDER_ASSETS=/usr/local/envtest/bin/k8s/1.23.5-linux-amd64
ENV KUBEBUILDER_ASSETS=/usr/local/envtest/bin/k8s/1.26.1-linux-amd64
ENV PATH=$KUBEBUILDER_ASSETS:$PATH

# Make kubectl completions work with 'k' alias
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ go-install() {
fi
}

go-install conversion-gen k8s.io/code-generator/cmd/conversion-gen@v0.24.3
go-install controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2
go-install kind sigs.k8s.io/kind@v0.14.0
go-install conversion-gen k8s.io/code-generator/cmd/conversion-gen@v0.26.4
go-install controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.3
go-install kind sigs.k8s.io/kind@v0.18.0
go-install kustomize sigs.k8s.io/kustomize/kustomize/[email protected]

# for docs site
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ install-test-tools: install-tools
&& go get github.com/axw/gocov/gocov \
&& go get github.com/AlekSi/gocov-xml \
&& go get github.com/wadey/gocovmerge \
&& go get sigs.k8s.io/kind@v0.14.0
&& go get sigs.k8s.io/kind@v0.18.0
rm -r $(TEST_TOOLS_MOD_DIR)

.PHONY: install-tools
Expand Down
2 changes: 1 addition & 1 deletion dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $GIT_ROOT/.devcontainer/install-dependencies.sh --skip-installed

# Setup envtest binaries and define KUBEBUILDER_ASSETS
# NB: if you change this, .devcontainer/Dockerfile also likely needs updating
if ! ENVTEST=$("$TOOL_DEST/setup-envtest" use --print env 1.23.5) ; then
if ! ENVTEST=$("$TOOL_DEST/setup-envtest" use --print env 1.26.1) ; then
echo "Failed to setup envtest"
exit 1
fi
Expand Down

0 comments on commit b50e974

Please sign in to comment.