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

Config reloader does not find TLS cert #199

Open
atombender opened this issue Aug 28, 2024 · 1 comment
Open

Config reloader does not find TLS cert #199

atombender opened this issue Aug 28, 2024 · 1 comment
Labels
defect Suspected defect such as a bug or regression

Comments

@atombender
Copy link

What version were you using?

1.2.2

What environment was the server running in?

Kubernetes 1.29.7 on GKE.

Is this defect reproducible?

Not sure.

Given the capability you are leveraging, describe your expectation?

The config reloader should start without issues.

Given the expectation, what is the defect you are observing?

After upgrading the Helm chart, which upgrades the config reloader from 0.14.2 to 0.15.0, the reloader began failing with this output on startup:

2024/08/26 09:54:20 Starting NATS Server Reloader v0.15.0
Error: /etc/nats-certs/gateway/tls.crt, does not exist

Using a test pod etc., I have verified that the file exists and is readable.

I suspect the cause is the new logic (added after reloader 0.14.2) that tries to parse out cert files from the config file. This logic doesn't use a real parser, and uses a bunch of gnarly regexps and string manipulating to dig out file names, which I think is a bad idea.

In theory is that on Kubernetes, mounted secrets are actually symlinks that resolve to rather weird paths, and that this trips up the logic somehow:

$ ls /etc/nats-certs/gateway/tls.crt
/etc/nats-certs/gateway/tls.crt -> ..data/tls.crt
@atombender atombender added the defect Suspected defect such as a bug or regression label Aug 28, 2024
@Jarema
Copy link
Member

Jarema commented Aug 30, 2024

Thanks for reporting the issue.

We will take look into this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants