-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(ecs): enable Enhanced Observability for Container Insights #32622
base: main
Are you sure you want to change the base?
feat(ecs): enable Enhanced Observability for Container Insights #32622
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
…insights' into feat-aws-ecs-enhanced-container-insights
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
LGTM, mostly nitpicks and additional integration coverage
@@ -69,9 +69,17 @@ export interface ClusterProps { | |||
* If true CloudWatch Container Insights will be enabled for the cluster | |||
* | |||
* @default - Container Insights will be disabled for this cluster. | |||
* @deprecated See `containerInsightsLevel` |
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.
* @deprecated See `containerInsightsLevel` | |
* @deprecated See {@link containerInsightsV2} |
There are a few more references to containerInsightsLevel
, I'm guessing that was refactored at some point?
/** | ||
* The CloudWatch Container Insights configuration for the cluster | ||
* | ||
* @default - Container Insights configuration will not be set for the cluster |
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.
A bit ambiguous, that does not indicate the actual default value. I'm assuming the insights would be disabled?
@@ -224,6 +232,10 @@ export class Cluster extends Resource implements ICluster { | |||
physicalName: props.clusterName, | |||
}); | |||
|
|||
if ((props.containerInsights !== undefined) && props.containerInsightsV2) { | |||
throw new Error('You can only specify either containerInsights or containerInsightsLevel. Alternatively, you can leave both blank'); |
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.
More straightforward wording
throw new Error('You can only specify either containerInsights or containerInsightsLevel. Alternatively, you can leave both blank'); | |
throw new Error('You cannot set both containerInsights and containerInsightsV2'); |
new integ.IntegTest(app, 'ClusterNeuronAmi', { | ||
testCases: [stack], | ||
}); | ||
|
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.
You should add an assertion to make sure that the setting is properly applied, running a DescribeClusters should get you the setting, see docs
Issue # (if applicable)
Closes #32618.
Reason for this change
Container Insights with enhanced observability was recently announced and released for ECS. Cloudformation and the L1 CFN construct support setting this at cluster level. This adds the Container Insights with enhanced observability as an option for the existing L2 Cluster construct.
Description of changes
ENHANCED was added to the ContainerInsights enum. A new containerInsightsV2 property was added to the Cluster construct with the type ContainerInsights. The existing containerInsights property was marked as deprecated.
Description of how you validated changes
Unit and Integration tests were added.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license