aws-samples / amazon-cloudwatch-container-insights

CloudWatch Agent Dockerfile and K8s YAML templates for CloudWatch Container Insights.
MIT No Attribution
165 stars 108 forks source link

Add Prometheus metrics collection for Karpenter #135

Open mikereinhold opened 1 year ago

mikereinhold commented 1 year ago

Issue

Related to #134

Description of changes:

Add sample configuration for collecting Karpenter metrics

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

mikereinhold commented 1 year ago

Hi @SaxyPandaBear - the thought process is twofold:

  1. This Container Insights sample is pre-configured for common workloads that expose Prometheus metrics like nginx, memcached, Java, HaProxy. The AWS documentation doesn't explicitly describe how to install and configure each of these software packages either, however the sample still includes a configuration for them because it's useful to Container Insights users out of the box.
  2. Karpenter is an AWS project and exposes Prometheus metrics. It's not unreasonable to assume that EKS & Container Insights customers will use Karpenter more in the future as the project grows and it is desirable to simplify that setup by including it in the sample configuration. Additionally, it seems logical that AWS should provide sample configurations for integrating across AWS projects, like Container Insights and Karpenter.

If I was being cheeky, I'd also say that the Karpenter docs at https://karpenter.sh/ are AWS public docs and they do describe how to install and configure Karpenter 😆

SaxyPandaBear commented 1 year ago

Thanks for the much needed context. This is legitimately the first time I'm hearing about Karpenter. I'll bring it up with the team next week to see if this is on anyone's radar. I think more importantly than just putting a config sample here is coordinating with updating AWS CloudWatch public docs - to my understanding, that's the whole point of this repo. I think deciding to add Karpenter to CloudWatch on EKS docs will be a deciding factor on accepting this change