Skip to content

Commit f55f561

Browse files
committed
Update kubebuilder installation in the build root dockerfile
Update the base.Dockerfile (the dockerfile specified in the `build_root` stanza in the o/release ci-operator configuration) and ensure that kubebuilder can be successfully installed. The following errors were identified in recent e2e runs: ```bash $ curl -L "https://go.kubebuilder.io/dl/${KUBEBUILDER_RELEASE}/${OS}/${ARCH}" | tar -xz -C /tmp/ ... Complete! % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 68 100 68 0 0 230 0 --:--:-- --:--:-- --:--:-- 230 100 20604 100 20604 0 0 60958 0 --:--:-- --:--:-- --:--:-- 60958 gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now ``` When inspecting locally, the output file was HTML-based: ```bash $ file ./kubebuilder file kubebuilder kubebuilder: HTML document, UTF-8 Unicode text, with very long lines ``` Replace the kubebuilder release URL to use the github release download link, instead of the https://go.kubebuilder.io/dl domain.
1 parent fc5e9b5 commit f55f561

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

base.Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8
44

55
ARG KUBEBUILDER_RELEASE=2.3.1
66
# Install test dependencies
7+
# TODO(tflannag): This is a quick fix to kubebuilder's quick start instructions
8+
# that were failing e2e tests. We'll want to update our o/release ci-operator
9+
# configuration to allow build_root changes to be reflected in a PR vs.
10+
# instead of the CI pipeline always defaulting to building the HEAD version
11+
# of the dockerfile:
12+
# - https://docs.ci.openshift.org/docs/architecture/ci-operator/#build-root-image
13+
# Note(tflannag): We ran into some issues curling from the https://go.kubebuilder.io/dl
14+
# domain as the output file was HTLM-based, so curl from the github releases
15+
# until this has been resolved.
716
RUN yum install -y skopeo && \
817
export OS=$(go env GOOS) && \
918
export ARCH=$(go env GOARCH) && \
10-
curl -L "https://go.kubebuilder.io/dl/${KUBEBUILDER_RELEASE}/${OS}/${ARCH}" | tar -xz -C /tmp/ && \
19+
curl -L "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${KUBEBUILDER_RELEASE}/kubebuilder_${KUBEBUILDER_RELEASE}_${OS}_${ARCH}.tar.gz" | tar -xz -C /tmp/ && \
1120
mv /tmp/kubebuilder_${KUBEBUILDER_RELEASE}_${OS}_${ARCH}/ /usr/local/kubebuilder && \
1221
export PATH=$PATH:/usr/local/kubebuilder/bin && \
22+
kubebuilder version && \
1323
echo "Kubebuilder installation complete!"

0 commit comments

Comments
 (0)