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

Add config from environment and config path flag #745

Merged
merged 4 commits into from
Oct 12, 2021

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Oct 12, 2021

Thinking about adding the TLS flags for #711, I found that it could be handy, specially for the containerized registry, to allow to include these settings using environment variables (see #746).

So for example to add certificates to a containerized registry, one needs to mount the certificates as volumes, and add the environment variables, what is a common practice. Using flags only, the command line needs to be modified, what can override other defaults as the default address or -disable-package-validation, included in current distribution images.

This change includes:

  • Some documentation notes about how the registry can be configured.
  • A new flag -config to select the configuration file.
  • Flags can be provided using environment variables. Flags have precedence over environment variables.

Related to #711.

@jsoriano jsoriano requested a review from mtojek October 12, 2021 09:48
@jsoriano jsoriano self-assigned this Oct 12, 2021
@elasticmachine
Copy link

elasticmachine commented Oct 12, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-12T11:37:37.475+0000

  • Duration: 5 min 29 sec

  • Commit: 2c79acf

Test stats 🧪

Test Results
Failed 0
Passed 117
Skipped 0
Total 117

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea, but let's document in the repository's README.

@jsoriano
Copy link
Member Author

I like this idea, but let's document in the repository's README.

It is already mentioned in the paragraphs added to the README, should I add something else there?

@mtojek
Copy link
Contributor

mtojek commented Oct 12, 2021

I missed this while reviewing. Maybe add also a sample one liner showing how it maps (-dry-run vs EPR_DRY_RUN).

@jsoriano jsoriano requested a review from mtojek October 12, 2021 18:33
@jsoriano jsoriano merged commit b6a1c7a into elastic:master Oct 12, 2021
@jsoriano jsoriano deleted the flags-from-env branch October 12, 2021 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants