Skip to content

[CP 1681] [NO-JIRA] build: resolve kubectl version dynamically via stable.txt - #655

Merged
spraveenio merged 2 commits into
ROCm:mainfrom
ci-penbot-01:CP.O2O.pensando.gpu-operator.1681.rocm.gpu-operator.main
Sep 23, 2026
Merged

spraveenio merged 2 commits into
ROCm:mainfrom
ci-penbot-01:CP.O2O.pensando.gpu-operator.1681.rocm.gpu-operator.main

Conversation

@ci-penbot-01

@ci-penbot-01 ci-penbot-01 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

cp of pensando/gpu-operator#1681


Source PR Description (pensando/gpu-operator#1681):

Summary

Replace the hardcoded kubectl pin in `Dockerfile.build` with a dynamic lookup via `stable.txt`, matching the pattern already used in `Dockerfile` and `tests/k8s-e2e/Dockerfile.e2e`. No more manual bump PRs when a new kubectl stable is released.

Changes

File Change
`Dockerfile.build` kubectl install: hardcoded `v1.36.2` → dynamic `stable.txt` lookup

Before:
```dockerfile
RUN curl -o /usr/local/bin/kubectl -LO 'https://dl.k8s.io/release/v1.36.2/bin/linux/amd64/kubectl' &&
chmod +x /usr/local/bin/kubectl
```

After:
```dockerfile
RUN KUBECTL_VERSION=$(curl -Ls https://dl.k8s.io/release/stable.txt) &&
curl -o /usr/local/bin/kubectl -LO "https://dl.k8s.io/release/\${KUBECTL_VERSION}/bin/linux/amd64/kubectl" &&
chmod +x /usr/local/bin/kubectl
```

Plan: docs-internal/knowledge/plans/2026-09-22-bump-kubectl-oc-versions.md

Test plan

  • `docker build -f Dockerfile.build .` succeeds
  • `kubectl version --client` inside the resulting image reports current stable
  • CI Dockerfile lint passes

Risks

Low — kubectl is backwards-compatible. Rollback: revert to a pinned version in `Dockerfile.build`.

🤖 Generated with Claude Code

Cherrypick triggered by: ACP-Automation

spraveenio and others added 2 commits September 23, 2026 23:00
…#1681)

Replace the hardcoded kubectl pin (v1.36.2) in Dockerfile.build with a
dynamic lookup against https://dl.k8s.io/release/stable.txt, matching
the pattern already used in Dockerfile and tests/k8s-e2e/Dockerfile.e2e.

Plan: docs-internal/knowledge/plans/2026-09-22-bump-kubectl-oc-versions.md

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 8adebb8619c8c306e96bfe2052dd06002afd54a9)

@spraveenio spraveenio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@spraveenio
spraveenio merged commit e83aed7 into ROCm:main Sep 23, 2026
11 of 13 checks passed
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