Skip to content

Conversation

@quite4work
Copy link
Contributor

@quite4work quite4work commented Apr 22, 2025

It is possible to use paths relative to .kube/ in .kube/config, and kubectl also works with relative paths.

Some tools and scripts generate cluster configurations with relative paths by default, which breaks deno-kubernetes_client.

Example config:

# .kube/config
apiVersion: v1
kind: Config
clusters:
- cluster:
    certificate-authority: tls/example/ca.crt
    server: https://192.168.100.101:6443
  name: example
users:
- name: example-admin
  user:
    client-certificate: tls/example/admin.crt
    client-key: tls/example/admin.key

This relates to #9, but I’m not sure if I’ve covered all possible cases.

@danopia
Copy link
Member

danopia commented Apr 22, 2025

Thanks for the contribution. Looks straightforward on first read. I assume the submitted change fixes your usecase successfully?

The wording on #9 was inspired by wanting to keep the RawKubeConfig object as-is, so, storing the recorded path somewhere else instead.. I'd be fine dropping this expectation nowadays.

@danopia
Copy link
Member

danopia commented Apr 22, 2025

CI would like you to update deps_jsr.ts as well, since this package is currently published to both registries in parallel.

@quite4work
Copy link
Contributor Author

Been using this fix since Jun 13, 2023 quite4work@534cd80 (periodically syncing with upstream) - works great.

@danopia danopia merged commit 33dd70c into cloudydeno:main Apr 23, 2025
6 checks passed
@danopia danopia mentioned this pull request Apr 23, 2025
@danopia
Copy link
Member

danopia commented Apr 23, 2025

Tagged as v0.7.4 or https://jsr.io/@cloudydeno/[email protected]

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.

Properly handle loading KubeConfig certs/keys

2 participants