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

Temporarily pin kubectl version #2997

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Conversation

patrobinson
Copy link
Contributor

Description

main build is failing

The latest k8s release hasn't been uploaded to the GCP bucket yet, which is causing our build to fail

Changes

Pin the k8s version for now

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

Copy link
Contributor

@moskyb moskyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it probably makes sense to pin this anyway, rather than blindly using whatever the latest k8s is... though i suppose this way, we run the risk of forgetting to update k8s.

either way, ✅ in favour of fixing main

Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the risk of nerd-sniping you, is there a way we could make dependabot bump this?

RUN <<EOF
set -eu

VERSION=$(wget -qO- https://dl.k8s.io/release/stable.txt)
wget -qO kubectl \
"https://storage.googleapis.com/kubernetes-release/release/$VERSION/bin/linux/$TARGETARCH/kubectl"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"https://storage.googleapis.com/kubernetes-release/release/$VERSION/bin/linux/$TARGETARCH/kubectl"
"https://storage.googleapis.com/kubernetes-release/release/${K8_VERSION}/bin/linux/$TARGETARCH/kubectl"

Copy link
Contributor

@wolfeidau wolfeidau Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrobinson @DrJosh9000 can we just pull this out of a container so we get pinning and a supported source?

wget binary feels not ideal.

The latest release hasn't been uploaded to the GCP bucket yet, which is causing our build to fail
@patrobinson patrobinson merged commit b3f1758 into main Sep 17, 2024
1 check passed
@patrobinson patrobinson deleted the temporarily-pin-k8s-version branch September 17, 2024 00:48
@patrobinson
Copy link
Contributor Author

@DrJosh9000 to do that I think we'd want to switch to using the container registry.k8s.io/kubectl:v1.31.1 instead of downloading the binary via wget, that way I think dependabot will be able to recognise the version and update it?

FROM registry.k8s.io/kubectl:v1.31.1 AS kubectl

FROM base AS runtime

ARG TARGETOS
ARG TARGETARCH

COPY --from=kubectl /kubectl /bin/kubectl

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 this pull request may close these issues.

4 participants