Skip to content

Commit

Permalink
remove need for calling traefik with sudo (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktaubeneck authored May 14, 2024
1 parent b12f9eb commit 5e2f2ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ansible/provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@
mode: '0775'
remote_src: yes

- name: Grant CAP_NET_BIND_SERVICE capability to traefik binary
command:
cmd: 'setcap cap_net_bind_service=+ep {{ ansible_env.HOME }}/draft/traefik'
warn: no
become: yes

- name: Start helper sidecar
shell: >
source .venv/bin/activate &&
Expand Down
2 changes: 1 addition & 1 deletion sidecar/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def start_traefik_command(
"SIDECAR_PORT": str(sidecar_port),
"CERT_DIR": config_path,
}
cmd = "sudo -E ./traefik --configFile=sidecar/traefik/traefik.yaml"
cmd = "./traefik --configFile=sidecar/traefik/traefik.yaml"
return Command(cmd=cmd, env=env)


Expand Down

0 comments on commit 5e2f2ff

Please sign in to comment.