Skip to content

Commit

Permalink
Merge pull request #43 from projectsyn/fix/init-container-caddy-command
Browse files Browse the repository at this point in the history
Fix `caddy` command line in init container to work with Caddy v2.6
  • Loading branch information
simu authored Sep 28, 2022
2 parents 1b5e39d + 424acd2 commit 2c2e238
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion component/caddy-config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ local base_config = {
configmap: kube.ConfigMap(common.caddy.cm_name) {
data: {
'render-config': |||
pw=`caddy hash-password -plaintext ${BASIC_AUTH_PASSWORD}`
set -e
pw=`caddy hash-password --plaintext ${BASIC_AUTH_PASSWORD}`
sed -e "s/THE_PASSWORD/${pw}/" /etc/caddy/caddy.json.tpl > /etc/caddy.out/caddy.json
|||,
'caddy.json.tpl': '%s' % [ base_config ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ data:
{"handle": [{"body": "OK", "handler": "static_response", "status_code": 200}],
"match": [{"path": ["/healthz"]}]}, {"handle": [{"handler": "reverse_proxy", "upstreams":
[{"dial": "127.0.0.1:8000"}]}]}]}}}}}'
render-config: 'pw=`caddy hash-password -plaintext ${BASIC_AUTH_PASSWORD}`
render-config: 'set -e
pw=`caddy hash-password --plaintext ${BASIC_AUTH_PASSWORD}`
sed -e "s/THE_PASSWORD/${pw}/" /etc/caddy/caddy.json.tpl > /etc/caddy.out/caddy.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
template:
metadata:
annotations:
acme-dns.syn.tools/config-hash: 589762392e4ab772b0a0f78dcaf597f1
acme-dns.syn.tools/config-hash: 56d9e9226cc4305ac6bbe74574a0cd92
labels:
name: acme-dns
spec:
Expand Down

0 comments on commit 2c2e238

Please sign in to comment.