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

Support Optional includes in configuration file #5297

Open
cintolas opened this issue Apr 10, 2024 · 1 comment
Open

Support Optional includes in configuration file #5297

cintolas opened this issue Apr 10, 2024 · 1 comment
Labels
proposal Enhancement idea or proposal

Comments

@cintolas
Copy link

cintolas commented Apr 10, 2024

Proposed change

Currently if the include file is missing, the nats server will fail with a parse error

host: 0.0.0.0
port: $PORT
authorization: {
  token: $TOKEN
}

include ./nats-cluster.conf
PORT=4225 TOKEN="a1234" nats-server -c ~/nats/nats.conf 
nats-server: error parsing include file './nats-cluster.conf', open /home/peter/nats/nats-cluster.conf: no such file or directory

Feature Request

Add a way to specify that this include is optional

include? ./nats-cluster.conf

If the file is missing, continue

Use case

We are creating clusters where High Availability (HA) is optional.
We would like to keep the default configuration as simple as possible and allow the power users to extend the options as needed.

This will allow systemd service files to stay the same since the config file doesn't change

Contribution

No response

@cintolas cintolas added the proposal Enhancement idea or proposal label Apr 10, 2024
@wallyqs
Copy link
Member

wallyqs commented Apr 10, 2024

I like this idea, could be an alternative to always including empty files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

2 participants