-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New environmental variable LETSENCRYPT_RESTART_CONTAINER #442
Conversation
Hi. I haven't forgotten about this PR but I'm still unsure about merging it (because of the project scope issue). By the way if this is to be merged it'll require a corresponding test unit. |
Yeah, don't worry. I didn't think of the test unit. |
No hurry for the test unit, at least until we've reached a decision about merging the feature or not. |
I have integrated the functionality into the existing test units (namely certs_single, certs_san, force_renew). I currently have to versions:
The thing is, that the test units on master fail on my system (even without me changing anything), and so I am reluctant to push them on these PR branch, until they run on my system. The other thing is, that the actual functionality for which the environmental variable was added (auto-renewal), is currently not even tested (see #477 ). |
Another thing that I noticed in the test units: |
Yes it should, thanks for spotting that. I've been lacking spare time for the last few weeks, I'll come back to this PR as soon as I can. Got a few thinks I want to clear first. |
I found the reason why the test units fail locally. |
Containers with this variable set to true will be restarted when their respective certificates are updated/modified.
I updated the PR to the newest master commit and pushed the new test units. |
Okay, I've just reviewed your PR, thanks for your work. I think a separate test unit for this feature would be more fitting, rather than adding more logic to three existing tests. You could just take the basic Also if your test generate extra files ( |
BTW if this wasn't clear this PR will be merged as soon as the last details are ironed out 👍 |
Added a separate "container_restart" test unit, and added temp file to .gitignore. |
app/letsencrypt_service
Outdated
@@ -126,9 +126,10 @@ function update_certs { | |||
unset LETSENCRYPT_CONTAINERS | |||
# shellcheck source=/dev/null | |||
source /app/letsencrypt_service_data | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace issues ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a side effect of "automatic indentation" of my Editor.
app/letsencrypt_service
Outdated
@@ -150,7 +151,7 @@ function update_certs { | |||
if [[ "$cert_keysize" == "<no value>" ]]; then | |||
cert_keysize=$DEFAULT_KEY_SIZE | |||
fi | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
If you can cleanup the two remaining whitespace typos and write a line of doc explaining this feature I think we're good to go. |
Done |
This PR adds an additional functionality via an additional environmental variable.
Containers with the
LETSENCRYPT_RESTART_CONTAINER
variable set to true will be restarted when their respective certificates are updated/modified.Fixes #434