Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Enable custom health checks for ECS plugin #4473

Merged
merged 6 commits into from
Mar 6, 2023

Conversation

paladin-devops
Copy link
Contributor

@paladin-devops paladin-devops commented Feb 1, 2023

Closes #4455. Co-authored with @cicoyle.

if c.HealthCheck != nil {
if c.HealthCheck.Timeout >= c.HealthCheck.Interval {
return status.Errorf(codes.FailedPrecondition, "the health check "+
"timeout must be less than the interval")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should include the interval and timeout in the error message!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the doc fields to Documentation, but make gen/website-mdx didn't generate the updated .mdx files 🤔 still looking into it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember right, if it's a new markdown file, you have to manually @include it in like: https://github.com/hashicorp/waypoint/blob/main/website/content/plugins/aws-ec2.mdx. Not sure if that's the issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ECS platform plugin docs indeed are included. Even more weirdly, this is passing the CircleCI website-mdx check... maybe it's because all of the fields in the new struct are optional?


// Matcher is the HTTP codes to use when checking for a successful response from a target.
// The range is 200 to 599. The default is 200-399.
Matcher *elbv2.Matcher `hcl:"matcher,optional"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document this config struct in the Documentation() func below!

"Health check settings for the app.",
docs.SubFields(func(doc *docs.SubFieldDoc) {
doc.SetField("protocol",
"The protocol for the health check to use.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if our docs have a special field for this, but it would be nice to say what the valid protocols are!

Copy link
Member

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments

builtin/aws/ecs/platform.go Outdated Show resolved Hide resolved
builtin/aws/ecs/platform.go Outdated Show resolved Hide resolved
builtin/aws/ecs/platform.go Outdated Show resolved Hide resolved
Copy link
Member

@catsby catsby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on the changes after my feedback

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugin/ecs: Custom Health Checks Improved health check interface for ECS plugin
4 participants