-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: fail on curl errors in devkit build #1243
base: main
Are you sure you want to change the base?
Conversation
Previously 4xx and 5xx errors were ignored, which resulted in an invalid devkit image.
curl -o /opt/cri-tools-${CRICTL_TOOLS_VERSION}-0-fips.rpm https://packages.d2iq.com/konvoy/stable/linux/repos/el/kubernetes-v${KUBERNETES_VERSION}-nokmem/x86_64/cri-tools-${CRICTL_TOOLS_VERSION}-0.x86_64.rpm && \ | ||
curl --fail -v -o /opt/cri-tools-${CRICTL_TOOLS_VERSION}-0-fips.rpm https://packages.d2iq.com/konvoy/stable/linux/repos/el/kubernetes-v${KUBERNETES_VERSION}-fips/x86_64/cri-tools-${CRICTL_TOOLS_VERSION}-0.x86_64.rpm && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously it was was pulling the nokmem version for cri-tools. Those binaries don't get modified for FIPS and are equivalent, but still better to pull the correct one.
ARG GOSS_VERSION=v0.3.23 | ||
RUN curl -L "https://github.com/goss-org/goss/releases/download/${GOSS_VERSION}/goss-linux-amd64" -o /usr/local/bin/goss-amd64 | ||
RUN chmod +rx /usr/local/bin/goss-amd64 | ||
ARG BUILDARCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were inconsistently using BUILDARCH
here, this goss binary is used on the remove machine where only linux-amd64 is supported.
The Dockerfile will always look for the amd64 version
konvoy-image-builder/Dockerfile
Lines 32 to 33 in 187d011
# Packer copies /usr/local/bin/goss-amd64 from this container to the remote host | |
COPY --from=devkit /usr/local/bin/goss-amd64 /usr/local/bin/goss-amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for fixing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
What problem does this PR solve?:
Previously 4xx and 5xx errors were ignored, which resulted in an invalid devkit image. This then lead to situations where the image was never rebuilt since the same image with that SHA was already in Dockerhub.
Which issue(s) does this PR fix?:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: