Skip to content

Conversation

@danopia
Copy link
Member

@danopia danopia commented Sep 18, 2025

For each client:

  1. InCluster needs environment variable NODE_EXTRA_CA_CERTS=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt.

    • I don't see how to configure TLS in-process without depending on npm:undici.
    • But alas, it's what we need to do. I don't think I can get away with excluding it from deno.json either.
      • Leading to ~1.5MB wasted download for Deno users :(
  2. KubectlRaw needs to be ported from Deno.Command to node:child_process which I don't really want to do 😒

  3. KubeConfig has similar constraints as InCluster works now

  4. KubectlProxy seems to work fine.

No transport is working under nodejs.

For via-kubectl-raw, I think I'm being made to switch from Deno.Command API
to `node:child_process` API in all cases, so giving up the nicer Deno API surface.

For via-kubeconfig, I don't see a good path to do server certificates
under nodejs. I'm just calling fetch() and on nodejs one must use
`import "undici";` to get the certificate trusting logic.
NodeJS can't natively run it with its basic type stripping
Maybe not a problem given that we'd publish to JSR which would do the
better type conversion. Could revert after nodejs is in a good place.
@danopia danopia changed the title Try out NodeJS support Add basic libary support for NodeJS Jan 24, 2026
@danopia danopia marked this pull request as ready for review January 28, 2026 00:45
@danopia danopia changed the title Add basic libary support for NodeJS v0.8.1: Add basic libary support for NodeJS Jan 28, 2026
@danopia danopia merged commit 75301f9 into main Jan 28, 2026
9 checks passed
@danopia danopia deleted the nodejs-support branch January 28, 2026 00:45
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