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

Create separate agent daemonsets on windows for container insights and application signals #90

Merged
merged 10 commits into from
Sep 4, 2024

Conversation

lisguo
Copy link
Contributor

@lisguo lisguo commented Aug 28, 2024

Issue #, if available: N/A

Description of changes:
Currently, kubernetes networking is not supported on windows containers with host networking:

The following networking functionality is not supported on Windows nodes:

    Host networking mode

From https://kubernetes.io/docs/concepts/services-networking/windows-networking/

We need host networking to have the agent run as a host process container to retrieve container insights metrics from HCS (Host Compute Service).

In order to allow container insights and application signals, we need 2 daemonsets for windows. One running as a host process container, and another that is not.

This PR introduces a a new daemonset specifically for container insights cloudwatch-agent-windows-container-insights, and the current cloudwatch-agent-windows will be used for application signals.

This PR also addressing missing cluster name in the windows configs

Testing
Ran helm template:

helm template amazon-cloudwatch-observability charts/amazon-cloudwatch-observability --set clusterName=test-dotnet --set region=us-east-1 --include-crds --namespace amazon-cloudwatch 

Pods:

NAMESPACE           NAME                                                              READY   STATUS                 RESTARTS       AGE
amazon-cloudwatch   amazon-cloudwatch-observability-controller-manager-65955f4bvddt   1/1     Running                0              4m14s
amazon-cloudwatch   cloudwatch-agent-t9wcr                                            1/1     Running                0              4m13s
amazon-cloudwatch   cloudwatch-agent-windows-container-insights-ffbdw                 1/1     Running                0              3m26s
amazon-cloudwatch   cloudwatch-agent-windows-rr8ls                                    1/1     Running                0              3m26s
amazon-cloudwatch   cloudwatch-agent-xddb2                                            1/1     Running                0              4m13s

services

kubectl get services -n amazon-cloudwatch
NAME                                                     TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
amazon-cloudwatch-observability-webhook-service          ClusterIP   10.100.223.138   <none>        443/TCP                      4m26s
cloudwatch-agent                                         ClusterIP   10.100.79.246    <none>        4315/TCP,4316/TCP,2000/TCP   4m24s
cloudwatch-agent-headless                                ClusterIP   None             <none>        4315/TCP,4316/TCP,2000/TCP   4m24s
cloudwatch-agent-monitoring                              ClusterIP   10.100.8.181     <none>        8888/TCP                     4m24s
cloudwatch-agent-windows                                 ClusterIP   10.100.157.47    <none>        4315/TCP,4316/TCP,2000/TCP   3m37s
cloudwatch-agent-windows-container-insights              ClusterIP   10.100.39.29     <none>        4315/TCP,4316/TCP,2000/TCP   3m37s
cloudwatch-agent-windows-container-insights-headless     ClusterIP   None             <none>        4315/TCP,4316/TCP,2000/TCP   3m37s
cloudwatch-agent-windows-container-insights-monitoring   ClusterIP   10.100.240.0     <none>        8888/TCP                     3m37s
cloudwatch-agent-windows-headless                        ClusterIP   None             <none>        4315/TCP,4316/TCP,2000/TCP   3m37s
cloudwatch-agent-windows-monitoring                      ClusterIP   10.100.105.192   <none>        8888/TCP                     3m37s
dcgm-exporter-service                                    ClusterIP   10.100.202.190   <none>        9400/TCP                     4m24s
neuron-monitor-service                                   ClusterIP   10.100.157.169   <none>        8000/TCP                     4m24s

AmazonCloudWatchAgent resources

kubectl describe amazoncloudwatchagent cloudwatch-agent-windows -n amazon-cloudwatch
Name:         cloudwatch-agent-windows
Namespace:    amazon-cloudwatch
Labels:       app.kubernetes.io/managed-by=amazon-cloudwatch-agent-operator
Annotations:  <none>
API Version:  cloudwatch.aws.amazon.com/v1alpha1
Kind:         AmazonCloudWatchAgent
Metadata:
  Creation Timestamp:  2024-08-29T21:02:58Z
  Generation:          2
  Resource Version:    6245391
  UID:                 de98c358-d07f-4326-a8d4-08192f334c7a
Spec:
  Config:  {"agent":{"region":"us-east-1"},"logs":{"metrics_collected":{"application_signals":{"hosted_in":"test-dotnet"}}},"traces":{"traces_collected":{"application_signals":{}}}}
kubectl describe amazoncloudwatchagent cloudwatch-agent-windows-container-insights -n amazon-cloudwatch
Name:         cloudwatch-agent-windows-container-insights
Namespace:    amazon-cloudwatch
Labels:       app.kubernetes.io/managed-by=amazon-cloudwatch-agent-operator
Annotations:  <none>
API Version:  cloudwatch.aws.amazon.com/v1alpha1
Kind:         AmazonCloudWatchAgent
Metadata:
  Creation Timestamp:  2024-08-29T21:20:20Z
  Generation:          1
  Resource Version:    6245408
  UID:                 7c1fa594-3517-4655-b593-9c8266a4040e
Spec:
  Config:  {"agent":{"region":"us-east-1"},"logs":{"metrics_collected":{"kubernetes":{"cluster_name":"test-dotnet","enhanced_container_insights":true}}}}

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

@lisguo lisguo changed the title Create 2 agent daemonsets for windows for container insights, and application signals Create separate agent daemonsets on windows for container insights and application signals Aug 29, 2024
mitali-salvi
mitali-salvi previously approved these changes Aug 29, 2024
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