-
Notifications
You must be signed in to change notification settings - Fork 28
Implemented TargetAllocator resource deployments. #208
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
Implemented TargetAllocator resource deployments. #208
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.
I focused on changes since my last review. I will take a deeper look after these changes
internal/manifests/targetallocator/adapters/config_to_prom_config.go
Outdated
Show resolved
Hide resolved
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.
I think with the provided testing this should work
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.
Could you run the linter on the code ?
make fmt
or make goimports
* Adding support for NodeJS auto instrumentation and integ tests (#220) * Support configurable resources for NodeJS. (#225) * Supporting JMX annotations (#240) * Add support for a supplemental YAML configuration for the CloudWatchAgent (#241) * Changed naming for OTLP container ports from agent JSON (#252) * Updated Release Notes for 1.8.0 (#251) * Adjust EKS add-on integration test service count expectations (#256) * Add integration tests for JMX. (#250) * Implemented Target Allocator Container (#214) * Implemented TargetAllocator resource deployments. (#208) * Update cmd/amazon-cloudwatch-agent-target-allocator/config/config.go Co-authored-by: Musa <musaasad@amazon.com> * Update internal/config/main.go Co-authored-by: Musa <musaasad@amazon.com> --------- Co-authored-by: Parampreet Singh <50599809+Paramadon@users.noreply.github.com> Co-authored-by: Musa <musaasad@amazon.com> Co-authored-by: Mitali Salvi <44349099+mitali-salvi@users.noreply.github.com> Co-authored-by: Jeffrey Chien <chienjef@amazon.com>
* Implemented Target Allocator Container (#214) * Merge `main` into `target-allocator` (#232) NodeJS merging-in from main * Supporting K8s 1.31 (#222) (#236) Co-authored-by: Mitali Salvi <44349099+mitali-salvi@users.noreply.github.com> * Implemented TargetAllocator resource deployments. (#208) * Adding target-allocator label to service selectors (#242) * Target allocator TLS Implementation (#239) * Ta https server (#2921) * Added https server, tests, secret marshalling --------- Co-authored-by: ItielOlenick <67790309+ItielOlenick@users.noreply.github.com> * [Target Allocator] Enable Deployment and Daemonset modes for Agent (#253) * Changes error to warning * [CI/CD] Add Target Allocator(TA) Build to Build and Upload Workflow (#247) * edited workflow * Clean up managed resources when disabled (#255) * Reconciler now removes un-used managed resources for CWA collector * remove pprof endpoint (#260) * [TA] One service per Target Allocator (#259) * added one-service per TA * Setup cert-watcher for TA server cert (#264) * [TA] Target Allocator TLS Unit-tests (#265) * TLS tests * Injecting Prometheus path if not specified in agent config (#258) * Injecting Prom path if it doesn't exist * Rebasing Target Allocator Branch to Main (#266) * Adding support for NodeJS auto instrumentation and integ tests (#220) * Support configurable resources for NodeJS. (#225) * Supporting JMX annotations (#240) * Add support for a supplemental YAML configuration for the CloudWatchAgent (#241) * Changed naming for OTLP container ports from agent JSON (#252) * Updated Release Notes for 1.8.0 (#251) * Adjust EKS add-on integration test service count expectations (#256) * Add integration tests for JMX. (#250) * Implemented Target Allocator Container (#214) * Implemented TargetAllocator resource deployments. (#208) * Update cmd/amazon-cloudwatch-agent-target-allocator/config/config.go Co-authored-by: Musa <musaasad@amazon.com> * Update internal/config/main.go Co-authored-by: Musa <musaasad@amazon.com> --------- Co-authored-by: Parampreet Singh <50599809+Paramadon@users.noreply.github.com> Co-authored-by: Musa <musaasad@amazon.com> Co-authored-by: Mitali Salvi <44349099+mitali-salvi@users.noreply.github.com> Co-authored-by: Jeffrey Chien <chienjef@amazon.com> --------- Co-authored-by: Musa <musaasad@amazon.com> Co-authored-by: Mitali Salvi <44349099+mitali-salvi@users.noreply.github.com> Co-authored-by: ItielOlenick <67790309+ItielOlenick@users.noreply.github.com> Co-authored-by: Kaushik Surya <108111936+sky333999@users.noreply.github.com> Co-authored-by: Parampreet Singh <50599809+Paramadon@users.noreply.github.com> Co-authored-by: Jeffrey Chien <chienjef@amazon.com>
Description of changes
Dockerfile
andMakefile
to include thetarget-allocator
.prometheus
andtarget-allocator
types.target-allocator
functionality for theamazon-cloudwatch-agent-operator
, which does the following:prometheus
configuration is provided alongside enablingtargetAllocator
in theAmazonCloudWatchAgent
custom resource for a given cluster, then theamazon-cloudwatch-agent-operator
will build and deploy resources (ConfigMap, Deployment, ServiceAccount, and Service) alongside theamazon-cloudwatch-agent
.target-allocator
, which assigns a replica fortarget-allocator
to ensure a pod replica is running (currently uses upstream image fortarget-allocator
).prometheus
configuration is provided; similar to applying https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/service/cwagent-prometheus/prometheus-eks.yaml.Manual testing
make generate && make manifests && make test
. [amazon-cloudwatch-agent-operator
repo]make container
.kubectl edit deployment amazon-cloudwatch-observability-controller-manager -n amazon-cloudwatch
and added the operator image. [K8s cluster]kubectl apply -f config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml --server-side --force-conflicts
.kubectl edit amazoncloudwatchagent cloudwatch-agent -n amazon-cloudwatch
and added below:Note:
targetAllocatorServiceAcct
needs to have permissions set up before we can use it.ConfigMaps


(when TA is disabled)

(when TA is enabled)

Note: The
amazon-cloudwatch-agent
package will need to be updated to parse this newprometheus.yaml
format.Deployments

ServiceAccounts

Services

Pods

Prometheus Volume & VolumeMount

Files to be edited/included from upstream in future
Makefile
cmd/otel-allocator
Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.