forked from kelseyhightower/confd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix file backend (kelseyhightower#686)
Fix file backend
- Loading branch information
1 parent
5601717
commit 1957caa
Showing
17 changed files
with
372 additions
and
238 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
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
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
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
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
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
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,27 +1,39 @@ | ||
#!/bin/bash | ||
|
||
export HOSTNAME="localhost" | ||
|
||
cat <<EOT >> test.yaml | ||
mkdir backends1 backends2 | ||
cat <<EOT >> backends1/1.yaml | ||
key: foobar | ||
database: | ||
- host: 127.0.0.1 | ||
- password: p@sSw0rd | ||
- port: "3306" | ||
- username: confd | ||
host: 127.0.0.1 | ||
password: p@sSw0rd | ||
port: "3306" | ||
username: confd | ||
EOT | ||
|
||
cat <<EOT >> backends1/2.yaml | ||
upstream: | ||
- app1: 10.0.1.10:8080 | ||
- app2: 10.0.1.11:8080 | ||
app1: 10.0.1.10:8080 | ||
app2: 10.0.1.11:8080 | ||
EOT | ||
|
||
cat <<EOT >> backends2/1.yaml | ||
nested: | ||
app1: 10.0.1.10:8080 | ||
app2: 10.0.1.11:8080 | ||
EOT | ||
|
||
cat <<EOT >> backends2/2.yaml | ||
prefix: | ||
database: | ||
- host: 127.0.0.1 | ||
- password: p@sSw0rd | ||
- port: "3306" | ||
- username: confd | ||
host: 127.0.0.1 | ||
password: p@sSw0rd | ||
port: "3306" | ||
username: confd | ||
upstream: | ||
app1: 10.0.1.10:8080 | ||
app2: 10.0.1.11:8080 | ||
EOT | ||
|
||
# Run confd | ||
confd --onetime --log-level debug --confdir ./integration/confdir --backend file --file test.yaml --watch | ||
confd --onetime --log-level debug --confdir ./integration/confdir --backend file --file backends1/ --file backends2/ --watch |
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
Oops, something went wrong.