This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
caddy-lb-policy-switch: Add docs and adjust verbose mode
- Loading branch information
Showing
2 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,53 @@ | ||
# | ||
# Caddy LB-Policy Switcher configuration | ||
# | ||
|
||
|
||
# Caddy API URLs | ||
# Format: "username:password@host:port" | ||
# Example: "testusername:testpassword@localhost:2019" | ||
CADDY_API_URLS=( | ||
"testusername:testpassword@localhost:2019" | ||
"testusername:testpassword@localhost:2019" | ||
) | ||
|
||
# Caddy server/vHost names | ||
# The script will switch the LB policy for these servers | ||
# Format: "vhost_name" | ||
# Example: ":80" or "test.com" | ||
CADDY_SERVERS=( | ||
"test.com" | ||
"test2.com" | ||
) | ||
|
||
# Caddy whoami LB URLs | ||
# | ||
# The script will adjust the priority of the CADDY_API_URLS according to the first that respond | ||
# to these urls. | ||
# | ||
# The URL must use https://github.com/traefik/whoami and a hostname that matches the example below | ||
# Example output: | ||
# Hostname test-test2-test3 will result in https://api.test3.test2.test.biz.tr | ||
# | ||
# Format: "url" | ||
# Example: "whoami.test.com" | ||
CADDY_LB_URLS=( | ||
"whoami.test.com" | ||
"whoami.test2.com" | ||
) | ||
|
||
# Threshold to exit after a certain number of no changes. | ||
NO_CHANGES_EXIT_THRESHOLD=1 | ||
|
||
# Override config even if it is the same | ||
SERVER_OVERRIDE_CONFIG=1 | ||
|
||
# Loop order | ||
# SERVERS: Prioritize servers | ||
# API_URLS: Prioritize API URLs | ||
# Default: "API_URLS" | ||
LOOP_ORDER="API_URLS" | ||
|
||
# Disables dynamic API URLs | ||
# If set to 1, the script will not use the CADDY_LB_URLS to adjust the priority of the CADDY_API_URLS | ||
NO_DYNAMIC_API_URLS=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters