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 configuration #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jnan806
Copy link
Collaborator

@jnan806 jnan806 commented Feb 13, 2023

Signed-off-by: Jiangnan Jia jnan0806@gmail.com

Describe what this PR does / why we need it

Add configuration support

Does this pull request fix one issue?

Fixed #18

Describe how you did it

  1. add option style API in NewControlPlane for other control-plane to integrate
  2. Add Priority of loading config: NewControlPlane Options > SystemEnv > YamlFile > Default
    by this Priority order makes the unique value, when config-items were provided by several way,
  3. If start OpenSergo directly, can also provide config-items by command args, which will adapt to NewControlPlane Options.

Describe how to verify it

  1. exec ./main -h to get command args helps
  2. add different values in command args, SystemEnv, yaml file
# command args : -p means give a port -c means the path of config
./main -p 8080 -c /opensergo.yaml
# SystemEnv: /etc/profile
OPENSERGO_ENDPOINT_PORT=8081
# /opensergo.yaml    filePath which was given by command above
endpointPort: 8082

Special notes for reviews

Signed-off-by: Jiangnan Jia <jnan0806@gmail.com>
@sczyh30
Copy link
Member

sczyh30 commented Feb 15, 2023

cc @123liuziming @panxiaojun233

@sczyh30 sczyh30 added kind/feature Category issues or PRs related to feature request. area/configuration Issue related to configurations of the control plane labels Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration Issue related to configurations of the control plane kind/feature Category issues or PRs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support configuration for OpenSergo control plane
2 participants