Skip to content
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

Add healthcheck variables to support deploying non-custom docker containers #460

Closed
wants to merge 2 commits into from

Conversation

rocketnova
Copy link
Contributor

Ticket

N/A

Changes

What was added, updated, or removed in this PR.

  • Add a variables to service child module:
    • enable_healthcheck
    • healthcheck_path
    • healthcheck_type
    • healthcheck_start_period

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers.

I've used the service module a few times now to deploy open source solutions that we don't custom create. These docker images often need a little bit of massaging, but generally benefit from many of the same resources we use when deploying custom docker images. One thing that often needs to be altered are the ECS and ALB healthchecks. This PR adds the following terraform variables to the service child module to provide additional flexibility while allowing for our existing defaults.

  • enable_healthcheck: defaults to true. Setting to false will disable healthchecks for the container in both ECS and ALB
  • healthcheck_path: defaults to /health. Allows root modules to set the healthcheck to another path depending on what the docker container provides
  • healthcheck_type: defaults to wget. Allows for non-custom docker containers that come with curl built-in but not wget
  • healthcheck_start_period: defaults to 0. Allows for setting a much longer grace period for non-custom docker containers that might take a long time to boot up.

I've found this really useful, but I would like to hear whether this is helpful to include in the template.

Testing

Provide evidence that the code works as expected. Explain what was done for testing and the results of the test plan. Include screenshots, GIF demos, shell commands or output to help show the changes working as expected. ProTip: you can drag and drop or paste images into this textbox.

I could use some assistance on how we want to write tests for this, if any.

@rocketnova rocketnova marked this pull request as draft September 26, 2023 23:59
@rocketnova
Copy link
Contributor Author

Closing this in favor of #474

@rocketnova rocketnova closed this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant