-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use tini as PID 1 The operator runs as PID 1, which is expected to reap zombie processes; since it doesn't, they get left around to take up room. This commit installs `tini` and uses it as PID 1, instead. This removes the use of ssh-agent in the `build/bin/entrypoint` script, which serves only to prevent go-git from complaining about not finding an ssh-agent socket -- and doesn't help with authentication (if no SSH key is supplied, it will simply fail the SSH handshake). * Remove build/bin scripts These are relics of old operator-sdk boilerplate. In particular, - the entrypoint script is not needed because the entrypoint can be given in the Dockerfile (and doesn't need to do anything fancy) - the user_setup script isn't needed when `useradd` is run. `useradd` would not normally be available, since the base image used for controllers is often some variation of minimal, distro-less image; but, this image uses the maximalist pulumi/pulumi base image. * Fail if SSH is used but no private key given When using SSH, a key must be obtained from somewhere. On the command line, git would either use the ssh-agent socket, or try to use a key in ~/.ssh. go-git mirrors this, by resorting to ssh-agent if it is not given any other choices. But in the operator container, it doesn't make sense to try to use ssh-agent, because there's no chance to add keys to it -- its only purpose would be to stop go-git from complaining. So: treat it as an error if someone uses an SSH git URL, but doesn't supply a private SSH key. Signed-off-by: Michael Bridgen <[email protected]>
- Loading branch information
Showing
6 changed files
with
15 additions
and
24 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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