restart_process: make compatible with k8s_custom_deploy #393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
#391
The restart_process extension works by setting the
docker_build
entrypoint
arg to point at its restart wrapper script. However, the wayk8s_custom_deploy
works,docker_build
'sentrypoint
is ignored, which means anyone usingrestart_process
withk8s_custom_deploy
would find their processes would not be restarted on update.Solution
When making the child image for restart_process, also set the docker image's entrypoint itself to the restart wrapper script.
This means
k8s_custom_deploy
will now work withrestart_process
unlessk8s_custom_deploy
returns yaml that setsContainerSpec.Command
. In that case, the process will silently fail to restart and not provide the user any hints.We still set
docker_build
'sentrypoint
. This is sometimes redundant, but needed so that thek8s_yaml
that sets ContainerSpec.Command continues to work with this extension.