Skip to content

Commit

Permalink
service-mesh: pass args to envoy
Browse files Browse the repository at this point in the history
This allows configuring the envoy invoked by the service mesh with additional options like for setting the log level.

Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 7, 2025
1 parent a908f97 commit b6eba6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ let
iptables-legacy
];
config = {
Cmd = [ "${pkgs.service-mesh}/bin/service-mesh" ];
# Use Entrypoint so we can append arguments.
Entrypoint = [ "${pkgs.service-mesh}/bin/service-mesh" ];
Env = [ "PATH=/bin" ]; # This is only here for policy generation.
};
};
Expand Down
5 changes: 3 additions & 2 deletions service-mesh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func run() (retErr error) {
}

log.Println("Starting envoy")

return syscall.Exec(envoyBin, []string{"envoy", "-c", envoyConfigFile}, os.Environ())
args := []string{"envoy", "-c", envoyConfigFile}
args = append(args, os.Args[1:]...)
return syscall.Exec(envoyBin, args, os.Environ())
}

0 comments on commit b6eba6f

Please sign in to comment.