Skip to content

fix(ingestion): cap kubernetes client below 36.0.0 - #28331

Merged
IceS2 merged 1 commit into
mainfrom
fix/pin-kubernetes-below-36
May 21, 2026
Merged

IceS2 merged 1 commit into
mainfrom
fix/pin-kubernetes-below-36

Conversation

@IceS2

@IceS2 IceS2 commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

One-line dependency cap to recover the KubernetesSecretsManager in the hybrid runner. The unbounded >=21.0.0 pin let the post-2026-05-19 image build pull kubernetes==36.0.0, which regressed in-cluster auth.

- "kubernetes>=21.0.0",  # Kubernetes client for secrets manager
+ "kubernetes>=21.0.0,<36",  # 36.0.0 regressed in-cluster auth (https://github.com/kubernetes-client/python/issues/2582)

Why

kubernetes==36.0.0 broke the KubernetesSecretsManager:

  • Configuration.auth_settings() (v36) looks up the bearer token under api_key['BearerToken'], but load_incluster_config() / load_kube_config() still write it to api_key['authorization'].
  • The mismatch means no Authorization header is sent. The API treats the request as system:anonymous → 403 Forbidden when reading the secret, which surfaces to the caller as password authentication failed.

Proof it's the client, not env / RBAC

  • curl with the same mounted SA token returns 200.
  • kubernetes==35.0.0 works.
  • kubernetes==36.0.0 doesn't.

Upstream tracking (open, unfixed)

Why <36 and not !=36.0.0

<36 keeps the resolver on the known-good 35.x line and protects against any other 36.x regression discovered before upstream fixes 2582. Once upstream ships a fix, this becomes !=36.0.0 or a fixed >=36.x.

Test plan

  • Diff is the one line shown above
  • CI re-resolves dependencies to a 35.x kubernetes
  • Image build no longer pulls 36.0.0
  • Hybrid runner can read secrets again (verify in staging)

kubernetes==36.0.0 regressed in-cluster authentication, breaking the
KubernetesSecretsManager in the hybrid runner.

Mechanism:
- Configuration.auth_settings() in v36 looks up the bearer token under
  api_key['BearerToken'], but load_incluster_config() / load_kube_config()
  still write it to api_key['authorization']. The mismatch means no
  Authorization header is sent — the API treats the request as
  system:anonymous and returns 403 Forbidden when reading the secret.
  The caller surfaces this as "password authentication failed."

Proof it's the client, not env/RBAC:
- curl with the same mounted SA token returns 200.
- kubernetes 35.0.0 works; 36.0.0 doesn't.

Upstream is open and unfixed:
- kubernetes-client/python#2582
- kubernetes-client/python#2584

The previous unbounded `>=21.0.0` pin caused the post-2026-05-19 image
build to pull 36.0.0. Capping to <36 keeps us on the working 35.x line
and guards against further 36.x regressions until upstream ships a
patch — at which point this becomes `!=36.0.0` or a fixed `>=36.x`.
@IceS2
IceS2 requested a review from a team as a code owner May 21, 2026 08:44
Copilot AI review requested due to automatic review settings May 21, 2026 08:44
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels May 21, 2026
@gitar-bot

gitar-bot Bot commented May 21, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

Caps the kubernetes client dependency below 36.0.0 to prevent a regression in in-cluster authentication. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR caps the Python kubernetes client dependency for the ingestion package to avoid pulling kubernetes==36.x, which (per the linked upstream issues) regresses in-cluster authentication and breaks KubernetesSecretsManager usage in certain environments (e.g., hybrid runner).

Changes:

  • Update ingestion base dependency spec from kubernetes>=21.0.0 to kubernetes>=21.0.0,<36 to prevent installing the regressing 36.x line.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (9 flaky)

✅ 4150 passed · ❌ 0 failed · 🟡 9 flaky · ⏭️ 90 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 779 0 2 11
🟡 Shard 3 777 0 2 8
🟡 Shard 4 786 0 2 12
✅ Shard 5 773 0 0 47
🟡 Shard 6 736 0 3 8
🟡 9 flaky test(s) (passed on retry)
  • Features/IncidentManager.spec.ts › Next, Previous and page indicator (shard 2, 1 retry)
  • Features/KnowledgeCenter.spec.ts › Article mentions in description should working for Knowledge Center (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Flow/ExploreAggregationCountsMatching.spec.ts › should verify left panel counts and tab search results for normal search (shard 3, 1 retry)
  • Pages/ClassificationConditionalRendering.spec.ts › Should show loader then render classification content on initial page load (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Set & Update all CP types on apiCollection (shard 4, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary CSV import preserves typed relations (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Tag.spec.ts › Verify Owner Add Delete (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@IceS2
IceS2 merged commit a06f64b into main May 21, 2026
55 checks passed
@IceS2
IceS2 deleted the fix/pin-kubernetes-below-36 branch May 21, 2026 12:45
IceS2 added a commit that referenced this pull request May 21, 2026
kubernetes==36.0.0 regressed in-cluster authentication, breaking the
KubernetesSecretsManager in the hybrid runner.

Mechanism:
- Configuration.auth_settings() in v36 looks up the bearer token under
  api_key['BearerToken'], but load_incluster_config() / load_kube_config()
  still write it to api_key['authorization']. The mismatch means no
  Authorization header is sent — the API treats the request as
  system:anonymous and returns 403 Forbidden when reading the secret.
  The caller surfaces this as "password authentication failed."

Proof it's the client, not env/RBAC:
- curl with the same mounted SA token returns 200.
- kubernetes 35.0.0 works; 36.0.0 doesn't.

Upstream is open and unfixed:
- kubernetes-client/python#2582
- kubernetes-client/python#2584

The previous unbounded `>=21.0.0` pin caused the post-2026-05-19 image
build to pull 36.0.0. Capping to <36 keeps us on the working 35.x line
and guards against further 36.x regressions until upstream ships a
patch — at which point this becomes `!=36.0.0` or a fixed `>=36.x`.
IceS2 added a commit that referenced this pull request May 21, 2026
kubernetes==36.0.0 regressed in-cluster authentication, breaking the
KubernetesSecretsManager in the hybrid runner.

Mechanism:
- Configuration.auth_settings() in v36 looks up the bearer token under
  api_key['BearerToken'], but load_incluster_config() / load_kube_config()
  still write it to api_key['authorization']. The mismatch means no
  Authorization header is sent — the API treats the request as
  system:anonymous and returns 403 Forbidden when reading the secret.
  The caller surfaces this as "password authentication failed."

Proof it's the client, not env/RBAC:
- curl with the same mounted SA token returns 200.
- kubernetes 35.0.0 works; 36.0.0 doesn't.

Upstream is open and unfixed:
- kubernetes-client/python#2582
- kubernetes-client/python#2584

The previous unbounded `>=21.0.0` pin caused the post-2026-05-19 image
build to pull 36.0.0. Capping to <36 keeps us on the working 35.x line
and guards against further 36.x regressions until upstream ships a
patch — at which point this becomes `!=36.0.0` or a fixed `>=36.x`.

This branch was previously deployed

1 inactive deployment
test — 513cc9a1 Deployed May 21, 2026 by IceS2 via playwright-ci-postgresql (2, 6) #47982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants