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

feat!: Update Kubernetes client to v1 #188

Merged
merged 1 commit into from
Dec 23, 2024
Merged

feat!: Update Kubernetes client to v1 #188

merged 1 commit into from
Dec 23, 2024

Conversation

meyfa
Copy link
Member

@meyfa meyfa commented Dec 23, 2024

Updates the K8s client to the recently released v1.0.0.

This resolves all vulnerabilities reported for Foreman by npm audit, since the K8s client v1 switched from the deprecated request library to node-fetch.

BREAKING CHANGE: Kubernetes client v1 requires HTTPS for connecting to the Kubernetes API server. While this should not cause any problems in practice, as Kubernetes API servers are typically exposed over HTTPS, it would still break non-standard HTTP-only setups.

Replaces #187

Additional Context

The most relevant code change is due to the new error classes used by the client, which no longer seem to expose request headers like before, so we are able to simplify our request logic quite a bit. However, to avoid future regressions, the test code is modified to recurse through the errors and check for anything suspicious.

Checklist

  • The pull request title meets the Conventional Commits specification and optionally includes the scope, for example: feat: Add social login

@meyfa meyfa requested a review from a team as a code owner December 23, 2024 12:43
Updates the K8s client to the recently released v1.0.0.

This resolves all vulnerabilities reported for Foreman by `npm audit`, since
the K8s client v1 switched from the deprecated `request` library to
`node-fetch`.

The most relevant code change is due to the new error classes used by the
client, which no longer seem to expose request headers like before, so we
are able to simplify our request logic quite a bit. However, to avoid future
regressions, the test code is modified to recurse through the errors and
check for anything suspicious.

BREAKING CHANGE: Kubernetes client v1 requires HTTPS for connecting to
the Kubernetes API server. While this should not cause any problems in
practice, as Kubernetes API servers are typically exposed over HTTPS, it
would still break non-standard HTTP-only setups.
@meyfa meyfa force-pushed the feat/k8s-client-v1 branch from d8805c3 to 5b7ce88 Compare December 23, 2024 12:46
@meyfa meyfa merged commit 2c09c9e into main Dec 23, 2024
4 checks passed
@meyfa meyfa deleted the feat/k8s-client-v1 branch December 23, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants