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

[tctl] Don't explicitly set value for config path and preserve backwards compatibility #5731

Merged
merged 7 commits into from
Feb 26, 2021

Conversation

webvictim
Copy link
Contributor

@webvictim webvictim commented Feb 25, 2021

Fixes #5725

Historically, this is tctl's precedence order for OSS (most important at the top):

  • CLI flags
  • Values from config file provided on command line via -c/--config
  • Values from Teleport's default config file path (/etc/teleport.yaml) if present
    • if this file is not present, ignore it and continue
  • Defaults

This precedence order was changed (and was broken) in #5483 (changes in bold):

  • CLI flags
  • Values from config file provided on command line via -c/--config
  • Values from config file provided via TELEPORT_CONFIG_FILE environment variable
  • Values from Teleport's default config file path (/etc/teleport.yaml)
    • if this file is not present, throw an error and exit
  • Defaults

This PR changes it to the following (which was the original intention; changes in bold):

  • CLI flags
  • Values from config file provided on command line via -c/--config
  • Values from config file provided via TELEPORT_CONFIG_FILE environment variable
  • Values from Teleport's default config file path (/etc/teleport.yaml)
    • if this file is not present, ignore it and continue
  • Defaults

Also moves a couple of copies of the same fileExists function into utils for reuse.

@webvictim webvictim added test-plan-problem Issues which have been surfaced by running the manual release test plan tctl tctl - Teleport admin tool backport-required labels Feb 25, 2021
@webvictim webvictim requested a review from r0mant as a code owner February 25, 2021 19:45
@webvictim webvictim self-assigned this Feb 25, 2021
@webvictim webvictim requested a review from russjones as a code owner February 25, 2021 19:45
@webvictim webvictim added this to the 6.0 "San Diego" milestone Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-required tctl tctl - Teleport admin tool test-plan-problem Issues which have been surfaced by running the manual release test plan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

teleport configuration location not set in docker
3 participants