Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ USER ${UID}:${GID}
ENTRYPOINT ["/manager"]


FROM gcr.io/distroless/base-debian12:latest@sha256:9e9b50d2048db3741f86a48d939b4e4cc775f5889b3496439343301ff54cdba8 AS distroless
FROM gcr.io/distroless/base-debian12:latest@sha256:347a41e7f263ea7f7aba1735e5e5b1439d9e41a9f09179229f8c13ea98ae94cf AS distroless
ARG UID
ARG GID

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-refresher
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ USER ${UID}:${GID}
ENTRYPOINT ["/manager"]


FROM gcr.io/distroless/base-debian12:latest@sha256:9e9b50d2048db3741f86a48d939b4e4cc775f5889b3496439343301ff54cdba8 AS distroless
FROM gcr.io/distroless/base-debian12:latest@sha256:347a41e7f263ea7f7aba1735e5e5b1439d9e41a9f09179229f8c13ea98ae94cf AS distroless
ARG UID
ARG GID

Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/imagepullsecrets/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ maintainers:
sources:
- https://github.com/banzaicloud/backyards

version: 0.3.16
appVersion: 0.3.16
version: 0.3.17
appVersion: 0.3.17
2 changes: 1 addition & 1 deletion deploy/charts/imagepullsecrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ securityContext:
- ALL
image:
repository: ghcr.io/banzaicloud/imagepullsecrets
tag: v0.3.16
tag: v0.3.17
pullPolicy: IfNotPresent

imagePullSecrets: []
Expand Down
51 changes: 48 additions & 3 deletions scripts/install_envtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,51 @@ if [ ! -e bin/"${target_dir_name}" ]; then
if [ "$os" == "darwin" ] && [ "$arch" == "arm64" ]; then
arch="amd64"
fi
curl -sSL "https://go.kubebuilder.io/test-tools/$version/$os/$arch" | tar -xz -C /tmp/
Comment thread
pinaki124 marked this conversation as resolved.
mv "/tmp/kubebuilder" bin/"${target_dir_name}"
fi
# Download to temp file first and validate before extracting
temp_file=$(mktemp)
if curl -sSL "https://go.kubebuilder.io/test-tools/$version/$os/$arch" -o "$temp_file" && tar -tzf "$temp_file" >/dev/null 2>&1; then
tar -xz -C /tmp/ -f "$temp_file"
mv "/tmp/kubebuilder" bin/"${target_dir_name}"
Comment thread
rajnish-cloudbees marked this conversation as resolved.
Outdated
else
# Fallback: try setup-envtest to obtain the binaries if the download fails or is not a valid gzip file
echo "Attempting to install setup-envtest@release-0.22..."
if go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.22; then
echo "setup-envtest installed successfully"

# Use explicit path instead of relying on PATH
setup_envtest="$(go env GOPATH)/bin/setup-envtest"
temp_envtest_dir=$(mktemp -d)
if "$setup_envtest" use ${version} --bin-dir "${temp_envtest_dir}"; then
Comment thread
rajnish-cloudbees marked this conversation as resolved.
Outdated
Comment thread
rajnish-cloudbees marked this conversation as resolved.
Outdated
mkdir -p bin/"${target_dir_name}/bin"
find "${temp_envtest_dir}" -type f \( -name "etcd" -o -name "kube-apiserver" -o -name "kubectl" \) -exec cp {} bin/"${target_dir_name}/bin/" \;
chmod -R 755 bin/"${target_dir_name}/bin/"

Comment thread
rajnish-cloudbees marked this conversation as resolved.
Outdated
# Quick verification that binaries exist
if [ ! -f "bin/${target_dir_name}/bin/etcd" ] || [ ! -f "bin/${target_dir_name}/bin/kube-apiserver" ] || [ ! -f "bin/${target_dir_name}/bin/kubectl" ]; then
echo "ERROR: Required binaries missing after setup-envtest"
exit 1
fi

# Fix permissions before cleanup to avoid "permission denied" errors
chmod -R u+w "${temp_envtest_dir}" 2>/dev/null || true
rm -rf "${temp_envtest_dir}"
echo "Successfully installed envtest tools via setup-envtest"
else
# Fail explicitly when we can't obtain real binaries
echo "ERROR: Failed to install envtest tools. setup-envtest installed but could not download version ${version}."
echo "This likely means version ${version} is not available from the envtest repository."
chmod -R u+w "${temp_envtest_dir}" 2>/dev/null || true
rm -rf "${temp_envtest_dir}"
exit 1
fi
else
# Fail explicitly when we can't obtain real binaries
echo "ERROR: Failed to install envtest tools. setup-envtest installation failed."
echo "This likely means:"
echo "1. The kubebuilder.io URL is not accessible or returns invalid data"
echo "2. setup-envtest tool installation failed"
exit 1
fi
fi
rm -f "$temp_file"
fi
Loading