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

Adding support for YAML support for CloudWatchAgent #237

Merged
merged 5 commits into from
Sep 27, 2024

Conversation

mitali-salvi
Copy link
Contributor

@mitali-salvi mitali-salvi commented Sep 25, 2024

Issue #, if available:

Description of changes:

  1. Add otelConfig field to the AmazonCloudWatchAgent CRD
  2. Add new data to the existing cloudwatch-agent config-map with the contents of otelConfig
  3. Mount the config map onto the agent container.

Testing
With the YAML passed to the agent ---

cwagentconfig.json:                                                                                                                                                          │
│ ----                                                                                                                                                                         │
│ {"agent":{"region":"us-west-2"},"logs":{"metrics_collected":{"application_signals":{"hosted_in":"my-dev-cluster"},"kubernetes":{"cluster_name":"my-dev-cluster","enhanced_co │
│ ntainer_insights":true}}},"traces":{"traces_collected":{"application_signals":{}}}}                                                                                          │
│ cwagentotelconfig.yaml:                                                                                                                                                      │
│ ----                                                                                                                                                                         │
│ exporters:                                                                                                                                                                   │
│   awsxray:                                                                                                                                                                   │
│     region: us-west-2                                                                                                                                                        │
│ processors:                                                                                                                                                                  │
│   batch: null                                                                                                                                                                │
│ receivers:                                                                                                                                                                   │
│   otlp:                                                                                                                                                                      │
│     protocols:                                                                                                                                                               │
│       grpc:                                                                                                                                                                  │
│         endpoint: 0.0.0.0:4317                                                                                                                                               │
│       http:                                                                                                                                                                  │
│         endpoint: 0.0.0.0:4318                                                                                                                                               │
│ service:                                                                                                                                                                     │
│   pipelines:                                                                                                                                                                 │
│     traces/xray:                                                                                                                                                             │
│       exporters:                                                                                                                                                             │
│       - awsxray                                                                                                                                                              │
│       processors:                                                                                                                                                            │
│       - batch                                                                                                                                                                │
│       receivers:                                                                                                                                                             │
│       - otlp      

When the YAML is deleted from the custom resource, the reconciler will delete the config-map data entry and volume mount item

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

@mitali-salvi mitali-salvi merged commit f238449 into yaml-support Sep 27, 2024
2 checks passed
@mitali-salvi mitali-salvi deleted the yamlSupport branch September 27, 2024 15:02
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.

3 participants