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

How to configure relative path to TLS files #236

Closed
foal opened this issue Feb 10, 2025 · 1 comment
Closed

How to configure relative path to TLS files #236

foal opened this issue Feb 10, 2025 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@foal
Copy link

foal commented Feb 10, 2025

The configuration works if I use the absolute path, but if I try to relative path (relative to config.yaml) can't connect to the cluster

If I put the ca.crt to same folder as config.yaml

failed to create cluster admin: failed to setup tls config: open ./ca.crt
or
failed to create cluster admin: failed to setup tls config: open ca.crt

if I try to use path from home ~

failed to create cluster admin: failed to setup tls config: open ~/.config/kafkactl/ca.crt

Nothing works.

@d-rk
Copy link
Collaborator

d-rk commented Feb 11, 2025

This is related to #218

Currently, the working dir is not changed by kafkactl. So, relative paths should be relative to whereever you are atm.

This should easily be changed here:
https://github.com/deviceinsight/kafkactl/blob/main/internal/global/config.go#L126

By using:
https://pkg.go.dev/os#Chdir

@d-rk d-rk added enhancement New feature or request good first issue Good for newcomers labels Feb 11, 2025
@d-rk d-rk closed this as completed in 687df0d Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants