From 0693856bc319861a27d662d8befe0392763693d1 Mon Sep 17 00:00:00 2001 From: Jack Henschel Date: Mon, 15 Nov 2021 10:24:04 +0100 Subject: [PATCH] Explicitly state precedence of config sources in docs (#1439) I was recently looking into the order in which oauth2-proxy evaluates it configuration options from the various sources. I think this will also be helpful for other users. Since oauth2-proxy is using viper, the order of configuration sources is as follows [1]: > Viper uses the following precedence order. Each item takes precedence over the item below it: > > explicit call to Set > flag > env > config > key/value store > default [1] https://github.com/spf13/viper/blob/master/README.md#why-viper Co-authored-by: Joel Speed --- docs/docs/configuration/overview.md | 2 +- docs/versioned_docs/version-6.1.x/configuration/overview.md | 2 +- docs/versioned_docs/version-7.0.x/configuration/overview.md | 2 +- docs/versioned_docs/version-7.1.x/configuration/overview.md | 2 +- docs/versioned_docs/version-7.2.x/configuration/overview.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs/configuration/overview.md b/docs/docs/configuration/overview.md index 5477d746..6f623063 100644 --- a/docs/docs/configuration/overview.md +++ b/docs/docs/configuration/overview.md @@ -3,7 +3,7 @@ id: overview title: Overview --- -`oauth2-proxy` can be configured via [config file](#config-file), [command line options](#command-line-options) or [environment variables](#environment-variables). +`oauth2-proxy` can be configured via [command line options](#command-line-options), [environment variables](#environment-variables) or [config file](#config-file) (in decreasing order of precedence, i.e. command line options will overwrite environment variables and environment variables will overwrite configuration file settings). ### Generating a Cookie Secret diff --git a/docs/versioned_docs/version-6.1.x/configuration/overview.md b/docs/versioned_docs/version-6.1.x/configuration/overview.md index 33450008..229aac85 100644 --- a/docs/versioned_docs/version-6.1.x/configuration/overview.md +++ b/docs/versioned_docs/version-6.1.x/configuration/overview.md @@ -3,7 +3,7 @@ id: overview title: Overview --- -`oauth2-proxy` can be configured via [config file](#config-file), [command line options](#command-line-options) or [environment variables](#environment-variables). +`oauth2-proxy` can be configured via [command line options](#command-line-options), [environment variables](#environment-variables) or [config file](#config-file) (in decreasing order of precedence, i.e. command line options will overwrite environment variables and environment variables will overwrite configuration file settings). ### Generating a Cookie Secret diff --git a/docs/versioned_docs/version-7.0.x/configuration/overview.md b/docs/versioned_docs/version-7.0.x/configuration/overview.md index f3c14c18..938a1b77 100644 --- a/docs/versioned_docs/version-7.0.x/configuration/overview.md +++ b/docs/versioned_docs/version-7.0.x/configuration/overview.md @@ -3,7 +3,7 @@ id: overview title: Overview --- -`oauth2-proxy` can be configured via [config file](#config-file), [command line options](#command-line-options) or [environment variables](#environment-variables). +`oauth2-proxy` can be configured via [command line options](#command-line-options), [environment variables](#environment-variables) or [config file](#config-file) (in decreasing order of precedence, i.e. command line options will overwrite environment variables and environment variables will overwrite configuration file settings). ### Generating a Cookie Secret diff --git a/docs/versioned_docs/version-7.1.x/configuration/overview.md b/docs/versioned_docs/version-7.1.x/configuration/overview.md index b8157753..f211f507 100644 --- a/docs/versioned_docs/version-7.1.x/configuration/overview.md +++ b/docs/versioned_docs/version-7.1.x/configuration/overview.md @@ -3,7 +3,7 @@ id: overview title: Overview --- -`oauth2-proxy` can be configured via [config file](#config-file), [command line options](#command-line-options) or [environment variables](#environment-variables). +`oauth2-proxy` can be configured via [command line options](#command-line-options), [environment variables](#environment-variables) or [config file](#config-file) (in decreasing order of precedence, i.e. command line options will overwrite environment variables and environment variables will overwrite configuration file settings). ### Generating a Cookie Secret diff --git a/docs/versioned_docs/version-7.2.x/configuration/overview.md b/docs/versioned_docs/version-7.2.x/configuration/overview.md index 5477d746..6f623063 100644 --- a/docs/versioned_docs/version-7.2.x/configuration/overview.md +++ b/docs/versioned_docs/version-7.2.x/configuration/overview.md @@ -3,7 +3,7 @@ id: overview title: Overview --- -`oauth2-proxy` can be configured via [config file](#config-file), [command line options](#command-line-options) or [environment variables](#environment-variables). +`oauth2-proxy` can be configured via [command line options](#command-line-options), [environment variables](#environment-variables) or [config file](#config-file) (in decreasing order of precedence, i.e. command line options will overwrite environment variables and environment variables will overwrite configuration file settings). ### Generating a Cookie Secret