-
Notifications
You must be signed in to change notification settings - Fork 48
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
“nsc generate config --nats-resolver” will output extra commas in resolver_preload #650
Comments
nsc/cmd/natsresolverconfigbuilder.go Line 87 in 01db6f2
|
If you save it to a file, does it work?
On my config:
|
Wondering how you are importing the file |
So did some more experiment: This is a config file that imports
Save the resolver as auth.conf
|
In the above cases the contents for the auth is saved directly to a file, and it is loaded by the server without errors wondering what your setup is doing, as I have the commas in there and it works. |
Also what server version are you using? |
Hi aricart, I use helm chart to install on k8s, so I copy the cmd output and use it in value.yaml, then when helm to merge the values, I think it will take the commas as a part of string value to merge. then will meet error when the instance is starting. @aricart |
I use the official helm chart, and install like this "helm upgrade --install nats nats/nats -f nats.yaml". The nats.yaml is like: config: |
looks like you are assuming that it is yaml, but it is conf, not yaml. |
yes, right, because the doc said nats config is combined benifits of yaml and json, so it will let me think the output config is usable in yaml by mistake. and in the doc of helm chart, there's an example to enable resolver with helm merge, in that example says to copy the output of nsc, so I copied with comma, I thought the comma is some magic char by mistake. so in my opinion, the comma here is a little useless, but let people confusing. |
What version were you using?
2.8.6
What environment was the server running in?
k8s
Is this defect reproducible?
yes, just copy direct output of "nsc generate config --nats-resolver"
Given the capability you are leveraging, describe your expectation?
the output of command "nsc generate config --nats-resolver" will be something like below, there's a commas at the end of the account jwt. if someone copies this and use it in config file, will fail to start server. The correct value has no commas.
"
Later changes to the system account take precedence over the system account jwt listed here.
resolver_preload: {
AD46U: eyJ0***JnCQ,
}
"
Given the expectation, what is the defect you are observing?
server fails to start since the incorrect commas
The text was updated successfully, but these errors were encountered: