Comments (6)
My vote would be for a command-line option, as environment variables can be set via a number of different ways, and thus can be hard to keep track of, whereas there's only one place a command-line argument can be specified, and it's easy to inspect the command-line options passed to a running process (at least it's easy on Linux, not sure about Windows).
from edgex-go.
Based on our Go project call yesterday, I have Trevor working on this for core-data. We'll work on a few of these options and provide something for people to look at once we think we have something in place that we are satisfied with - and get everyone's opinion. As we discussed yesterday, it would be nice to eventually replicate the type of escalating mechanism that Java has (property file, command line, ENV, etc.). However, we might start simple and then incorporate other options as we go (and as we need) but try to facilitate that type of extension.
from edgex-go.
@tonyespy no need to open command line for passing just one single option: location of the file. This makes code more complicated - you are adding dependencies to parse command line options, send help to command line, etc - this SW will not be run by hand, there will be management service that will be running the services.
Using command line here in my opinion goes against programming principles of simplicity and producing tighter code with smaller and simpler binaries. Parsing command is not only useless but probably adds additional security risks, while all ENV variables can (and probably will be) stocked in Vault: https://www.vaultproject.io/intro/use-cases.html#general-secret-storage - At a bare minimum, Vault can be used for the storage of any secrets. For example, Vault would be a fantastic way to store sensitive environment variables, database credentials, API keys, etc.
from edgex-go.
PR #75 created. Feel free to comment/approve.
from edgex-go.
PR has been merged. If there are no follow-up comments/discussion in 24 hours, I'll close the issue as resolved.
from edgex-go.
During a call with @jpwhitemn @tonyespy this afternoon, it was decided we would add command line support as well. For now the order of precedence will be as follows:
1.) cmd line
2.) environment variable
3.) hard-coded location
from edgex-go.
Related Issues (20)
- Notification Retention and Persistent Caps implementation
- Notifications amount is still over than MaxCap after executing the purge job
- Add LastConnected metric to device services common config
- need to improve core-data fuzzing test coverage with swagger file update
- [Core Metadata] Handle plugged devices moving from one node to another node HOT 3
- Separate Common API from each service's swagger in to common swagger HOT 1
- Can quic be used instead of http? HOT 5
- message connected twice HOT 2
- The secretstore service will deadlock, when vault uses clustered mode and the health check configured in secretstore is for Standby nodes HOT 12
- invalid query parameter, yes has to be true or false HOT 1
- Environment Variables don't work HOT 3
- 【Core Data】How to Enable Device Data Storage Service and read Data HOT 4
- [Fuzzing support-notifications] add support-notification fuzzing test and update swagger file if needed
- Support notifications should be able to communicate with authenticated EdgeX endpoints HOT 5
- When accessing the AppService menu, an error occurs: "Oops!!! registry center service is unavailable! HOT 1
- Check the auto events before adding or updating the Device
- [Core Metadata] Add "parent" field to Device objects HOT 4
- Add Core Keeper Service HOT 2
- Add bypassValidation query parameter for POST Device API
- Bump golang libraries to fix CVEs in Napa branch HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edgex-go.