GithubHelp home page GithubHelp logo

Comments (6)

tonyespy avatar tonyespy commented on August 16, 2024

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.

jpwhitemn avatar jpwhitemn commented on August 16, 2024

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.

drasko avatar drasko commented on August 16, 2024

@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.

tsconn23 avatar tsconn23 commented on August 16, 2024

PR #75 created. Feel free to comment/approve.

from edgex-go.

tsconn23 avatar tsconn23 commented on August 16, 2024

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.

tsconn23 avatar tsconn23 commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.