Skip to content

feat: bump aws-iam-authenticator to 0.7.22 and pick binaries by TARGETARCH - #462

Merged
zapraum merged 2 commits into
mainfrom
zapraum/bump-aws-iam-authenticator
Oct 21, 2026
Merged

zapraum merged 2 commits into
mainfrom
zapraum/bump-aws-iam-authenticator

Conversation

@zapraum

@zapraum zapraum commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The hokusai Docker image installs aws-iam-authenticator 0.4.0 (2019). That version only emits client.authentication.k8s.io/v1alpha1 ExecCredentials. Support for v1beta1 starts at 0.5.5.

The shared kubeconfigs in s3://artsy-citadel/k8s/ still use v1alpha1. Current clients such as kubectl 1.24+ and k9s 0.51 reject v1alpha1. Those kubeconfigs can't move to v1beta1 while this image ships 0.4.0. kubectl would reject the token with exec plugin is configured to use API version v1beta1, plugin returned version v1alpha1.

The Dockerfile also hardcodes amd64 downloads for both docker-compose and the authenticator, so the image can't be built for arm64.

Solution

  • Bump AUTHENTICATOR_VERSION from 0.4.0 to 0.7.22. 0.7.22 returns whichever ExecCredential version kubectl asks for through KUBERNETES_EXEC_INFO, so the current v1alpha1 kubeconfigs should keep working.
  • Pick binaries by TARGETARCH. BuildKit/buildx sets it per platform, and the legacy builder leaves it empty, so the build falls back to amd64. The current make build-docker-image (plain docker build on CircleCI amd64) gets the same binaries as before.
    • aws-iam-authenticator release assets are named linux_<arch> and match TARGETARCH directly (amd64, arm64; every release from 0.5.5 on ships both).
    • docker-compose names its assets x86_64/aarch64, so the Dockerfile maps them and fails on any other architecture.
  • Add -f to both curl calls, so a missing asset fails the build instead of saving an error page as the binary.

This PR doesn't publish a multi-arch image. CI still runs docker build and pushes a single-architecture image. Publishing arm64 would need docker buildx build --platform linux/amd64,linux/arm64 --push in the Makefile/CI. That's a separate change.

Testing

Built the Dockerfile up to and including the authenticator install, then ran both binaries:

Builder uname -m docker-compose aws-iam-authenticator
buildx --platform linux/amd64 x86_64 v2.40.3 0.7.22
buildx --platform linux/arm64 aarch64 v2.40.3 0.7.22
legacy (DOCKER_BUILDKIT=0) TARGETARCH empty → x86-64 binaries (checked with file) v2.40.3 0.7.22

Also tested 0.7.22 locally against kubernetes-production-draco and kubernetes-staging-leo (both v1.23.17) using a v1beta1 kubeconfig.

I didn't build the full image (it needs poetry build output) or run it in CI.

Alternatives considered

  • Download from artsy-provisioning-public, the way the orb does in feat(hokusai): bump aws-iam-authenticator 0.4.0 -> 0.7.22 orbs#178. That bucket only has linux_amd64, so every version bump would need a manual upload per architecture. GitHub releases have all architectures.
  • 0.7.23 is the newest release, but it came out on 2026-10-20. I chose 0.7.22, which is the version tested above.

To-dos

Follow-up (not in this PR)

Once this and the orb ship, the S3 kubeconfigs move to v1beta1, the stale prod-blue/pictor entries (left over from substance#279) get removed, and the hokusai.yml kubectl pin goes from 1.19.16 to 1.24.x.

Assisted-by: Claude Opus 5.5

@zapraum zapraum changed the title feat: bump aws-iam-authenticator 0.4.0 -> 0.7.22 feat: bump aws-iam-authenticator to 0.7.22 and pick binaries by TARGETARCH Oct 20, 2026
@zapraum
zapraum marked this pull request as ready for review October 20, 2026 19:50
@zapraum
zapraum requested a review from a team October 20, 2026 19:50
@zapraum
zapraum merged commit fa09ce4 into main Oct 21, 2026
2 checks passed
@zapraum
zapraum deleted the zapraum/bump-aws-iam-authenticator branch October 21, 2026 20:01
This was referenced Oct 21, 2026
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.

2 participants