Skip to content

Commit 17e8e2a

Browse files
authored
Merge branch 'main' into mtls
2 parents 26a5bba + ccd4c17 commit 17e8e2a

11 files changed

+161
-22
lines changed

.github/workflows/amazon-cloudwatch-observability-helm-integration-test.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ jobs:
5050
- name: Set KUBECONFIG environment variable
5151
run: echo KUBECONFIG="${{ github.workspace }}/../../../.kube/config" >> $GITHUB_ENV
5252

53+
- name: Install Terraform
54+
uses: hashicorp/setup-terraform@v3
55+
with:
56+
terraform_version: "1.1.7"
57+
5358
- name: Verify Terraform version
5459
run: terraform --version
5560

@@ -106,6 +111,11 @@ jobs:
106111
- name: Set KUBECONFIG environment variable
107112
run: echo KUBECONFIG="${{ github.workspace }}/../../../.kube/config" >> $GITHUB_ENV
108113

114+
- name: Install Terraform
115+
uses: hashicorp/setup-terraform@v3
116+
with:
117+
terraform_version: "1.1.7"
118+
109119
- name: Verify Terraform version
110120
run: terraform --version
111121

@@ -161,6 +171,11 @@ jobs:
161171

162172
- name: Set KUBECONFIG environment variable
163173
run: echo KUBECONFIG="${{ github.workspace }}/../../../.kube/config" >> $GITHUB_ENV
174+
175+
- name: Install Terraform
176+
uses: hashicorp/setup-terraform@v3
177+
with:
178+
terraform_version: "1.1.7"
164179

165180
- name: Verify Terraform version
166181
run: terraform --version

RELEASE_NOTES

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
=======================================================================
2+
amazon-cloudwatch-observability v3.2.0 (2025-02-04)
3+
========================================================================
4+
New Features:
5+
* Support Logical NeuronCore configuration (LNC) with trn2
6+
7+
Enhancements:
8+
* Allow both YAML string and object for OTEL config
9+
* Add runtime metrics config for Application Signals .NET
10+
* Remove unsupported Neuron Monitor metrics
11+
* Upgrade CWAgent to v1.300052.0b1024
12+
* Upgrade CWAgent Operator to v2.1.0
13+
* Upgrade Java SDK to v1.33.0
14+
* Upgrade Python SDK to v0.8.0
15+
* Upgrade .Net SDK to v1.6.0
16+
* Upgrade NodeJS SDK to v0.5.0
17+
* Upgrade Neuron Monitor to v1.3.0
18+
119
=======================================================================
220
amazon-cloudwatch-observability v3.1.0 (2025-01-08)
321
========================================================================

charts/amazon-cloudwatch-observability/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: amazon-cloudwatch-observability
3-
version: 3.1.0
3+
version: 3.2.0
44
appVersion: 1.0.0
55
description: A Helm chart for Amazon CloudWatch Observability
66
type: application

charts/amazon-cloudwatch-observability/templates/_helpers.tpl

+7-4
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ Helper function to modify customer supplied agent config if ContainerInsights or
4646
{{/*
4747
Helper function to modify cloudwatch-agent YAML config
4848
*/}}
49-
{{- define "cloudwatch-agent.modify-yaml-config" -}}
49+
{{- define "cloudwatch-agent.modify-otel-config" -}}
5050
{{- $configCopy := deepCopy .OtelConfig }}
51+
{{- if kindIs "string" $configCopy }}
52+
{{- $configCopy = fromYaml $configCopy }}
53+
{{- end }}
5154

5255
{{- range $name, $component := $configCopy }}
53-
{{- if $component -}}
56+
{{- if and $component (kindIs "map" $component) }}
5457
{{- range $key, $value := $component }}
55-
{{- if (and (quote $value | empty) (not (hasKey $component $key))) }}
56-
{{- $component = set $component $key (dict) }}
58+
{{- if eq $value nil }}
59+
{{- $_ := set $component $key dict }}
5760
{{- end -}}
5861
{{- end }}
5962
{{- end }}

charts/amazon-cloudwatch-observability/templates/cloudwatch-agent-clusterrole.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ rules:
99
- apiGroups: [ "" ]
1010
resources: [ "pods", "pods/logs", "nodes", "nodes/proxy", "namespaces", "endpoints" ]
1111
verbs: [ "list", "watch", "get" ]
12+
- apiGroups: ["discovery.k8s.io"]
13+
resources: ["endpointslices"]
14+
verbs: ["list", "watch", "get"]
1215
- apiGroups: [ "" ]
1316
resources: [ "services" ]
1417
verbs: [ "list", "watch" ]

charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-custom-resource.yaml

+39-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data:
6262

6363
{{- $clusterName := .Values.clusterName | required ".Values.clusterName is required." -}}
6464
{{- $region := .Values.region | required ".Values.region is required." -}}
65-
65+
{{- $isROSA := eq $.Values.k8sMode "ROSA" -}}
6666
{{- range .Values.agents }}
6767
{{- $agent := merge . (deepCopy $.Values.agent) }}
6868
apiVersion: cloudwatch.aws.amazon.com/v1alpha1
@@ -77,6 +77,13 @@ spec:
7777
nodeSelector:
7878
kubernetes.io/os: linux
7979
serviceAccount: {{ $agent.serviceAccount.name | default (include "cloudwatch-agent.serviceAccountName" $) }}
80+
{{ if $isROSA }}
81+
securityContext:
82+
runAsNonRoot: false
83+
capabilities:
84+
add:
85+
- SYS_ADMIN
86+
{{ end }}
8087
priorityClassName: {{ $agent.priorityClassName | default $.Values.agent.priorityClassName }}
8188
affinity:
8289
nodeAffinity:
@@ -94,7 +101,7 @@ spec:
94101
config: {{ include "cloudwatch-agent.modify-config" (merge (dict "Config" $agent.defaultConfig) $ ) }}
95102
{{- end }}
96103
{{- if $agent.otelConfig }}
97-
otelConfig: {{ include "cloudwatch-agent.modify-yaml-config" (merge (dict "OtelConfig" $agent.otelConfig) . ) }}
104+
otelConfig: {{ include "cloudwatch-agent.modify-otel-config" (merge (dict "OtelConfig" $agent.otelConfig) . ) }}
98105
{{- end }}
99106
{{- if $agent.prometheus.config }}
100107
prometheus:
@@ -124,6 +131,12 @@ spec:
124131
readOnly: true
125132
- mountPath: /run/containerd/containerd.sock
126133
name: containerdsock
134+
- mountPath: /var/run/crio/crio.sock
135+
name: criosock
136+
- mountPath: /var/lib/containers
137+
name: criocontainer
138+
- mountPath: /var/log/pods
139+
name: criologs
127140
- mountPath: /var/lib/docker
128141
name: varlibdocker
129142
readOnly: true
@@ -147,6 +160,10 @@ spec:
147160
readOnly: true
148161
- mountPath: /var/lib/kubelet/pod-resources
149162
name: kubelet-podresources
163+
{{ if $isROSA }}
164+
- mountPath: /etc/kubernetes/kubelet-ca.crt
165+
name: kubelet-ca
166+
{{ end }}
150167
volumes:
151168
- name: kubelet-podresources
152169
hostPath:
@@ -164,6 +181,15 @@ spec:
164181
- hostPath:
165182
path: /run/containerd/containerd.sock
166183
name: containerdsock
184+
- hostPath:
185+
path: /var/run/crio/crio.sock
186+
name: criosock
187+
- hostPath:
188+
path: /var/lib/containers
189+
name: criocontainer
190+
- hostPath:
191+
path: /var/log/pods
192+
name: criologs
167193
- hostPath:
168194
path: /sys
169195
name: sys
@@ -198,6 +224,11 @@ spec:
198224
path: client.crt
199225
- key: tls.key
200226
path: client.key
227+
{{ if $isROSA }}
228+
- name: kubelet-ca
229+
hostPath:
230+
path: /etc/kubernetes/kubelet-ca.crt
231+
{{end }}
201232
env:
202233
- name: K8S_NODE_NAME
203234
valueFrom:
@@ -215,6 +246,12 @@ spec:
215246
valueFrom:
216247
fieldRef:
217248
fieldPath: metadata.namespace
249+
{{ if $isROSA }}
250+
- name: RUN_IN_ROSA
251+
value: "True"
252+
{{ end }}
253+
- name: K8S_CLUSTER_NAME
254+
value: {{ $.Values.clusterName }}
218255
{{- with $.Values.tolerations }}
219256
tolerations: {{- toYaml . | nindent 2}}
220257
{{- end }}

charts/amazon-cloudwatch-observability/templates/linux/neuron-monitor-daemonset.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
- name: PATH
3737
value: /usr/local/bin:/usr/bin:/bin:/opt/aws/neuron/bin
3838
- name: GOMEMLIMIT
39-
value: 160MiB
39+
value: 320MiB
4040
ports:
4141
- name: "metrics"
4242
port: {{ .Values.neuronMonitor.service.port }}
@@ -52,6 +52,9 @@ spec:
5252
- mountPath: /etc/amazon-cloudwatch-observability-neuron-cert/
5353
name: neurontls
5454
readOnly: true
55+
- mountPath: /opt-aws
56+
name: "aws-config"
57+
readOnly: true
5558
volumes:
5659
- name: neurontls
5760
secret:
@@ -61,6 +64,9 @@ spec:
6164
path: server.crt
6265
- key: tls.key
6366
path: server.key
67+
- name: "aws-config"
68+
hostPath:
69+
path: /opt/aws
6470
monitorConfig: |
6571
{
6672
"period": "5s",
@@ -74,19 +80,13 @@ spec:
7480
{
7581
"type": "memory_used"
7682
},
77-
{
78-
"type": "neuron_runtime_vcpu_usage"
79-
},
8083
{
8184
"type": "execution_stats"
8285
}
8386
]
8487
}
8588
],
8689
"system_metrics": [
87-
{
88-
"type": "memory_info"
89-
},
9090
{
9191
"period": "5s",
9292
"type": "neuron_hw_counters"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{ if and .Values.agent.enabled (eq .Values.k8sMode "ROSA") }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: system:openshift:scc:cloudwatch-agent-scc
6+
rules:
7+
- apiGroups: [""]
8+
resources: ["securitycontextconstraints"]
9+
verbs: ["use"]
10+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{ if and .Values.agent.enabled (eq .Values.k8sMode "ROSA") }}
2+
apiVersion: security.openshift.io/v1
3+
kind: SecurityContextConstraints
4+
metadata:
5+
name: cloudwatch-agent-scc
6+
allowHostDirVolumePlugin: true
7+
allowHostIPC: false
8+
allowHostNetwork: true
9+
allowHostPID: false
10+
allowHostPorts: true
11+
allowPrivilegeEscalation: true
12+
allowPrivilegedContainer: true
13+
allowedCapabilities: null
14+
readOnlyRootFilesystem: false
15+
runAsUser:
16+
type: RunAsAny
17+
seLinuxContext:
18+
type: RunAsAny
19+
supplementalGroups:
20+
type: RunAsAny
21+
defaultAddCapabilities:
22+
- SYS_ADMIN
23+
fsGroup:
24+
type: RunAsAny
25+
groups: []
26+
requiredDropCapabilities:
27+
- ALL
28+
volumes:
29+
- configMap
30+
- secret
31+
- emptyDir
32+
- hostPath
33+
- projected
34+
users:
35+
- system:serviceaccount:{{ .Release.Namespace }}:{{ template "cloudwatch-agent.serviceAccountName" . }}
36+
37+
38+
{{ end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{ if and .Values.agent.enabled (eq .Values.k8sMode "ROSA") }}
2+
kind: ClusterRoleBinding
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: {{ template "cloudwatch-agent.name" . }}-scc-role-binding
6+
roleRef:
7+
kind: ClusterRole
8+
name: system:openshift:scc:cloudwatch-agent-scc
9+
apiGroup: rbac.authorization.k8s.io
10+
subjects:
11+
- kind: ServiceAccount
12+
name: {{ template "cloudwatch-agent.serviceAccountName" . }}
13+
namespace: {{ .Release.Namespace }}
14+
{{- end }}

charts/amazon-cloudwatch-observability/values.yaml

+9-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ nameOverride: ""
1010
clusterName:
1111
## Provide the Region (this is a required parameter)
1212
region:
13+
k8sMode: EKS # can be EKS | ROSA | K8S
1314
nodeLabelKey: node.kubernetes.io/instance-type
1415
fargateLabelKey: eks.amazonaws.com/compute-type
1516
## NVIDIA GPU instance types
@@ -1170,7 +1171,7 @@ manager:
11701171
name:
11711172
image:
11721173
repository: cloudwatch-agent-operator
1173-
tag: 2.0.1
1174+
tag: 2.1.0
11741175
repositoryDomainMap:
11751176
public: public.ecr.aws/cloudwatch-agent
11761177
cn-north-1: 934860584483.dkr.ecr.cn-north-1.amazonaws.com.cn
@@ -1181,19 +1182,19 @@ manager:
11811182
java:
11821183
repositoryDomain: public.ecr.aws/aws-observability
11831184
repository: adot-autoinstrumentation-java
1184-
tag: v1.32.6
1185+
tag: v1.33.0
11851186
python:
11861187
repositoryDomain: public.ecr.aws/aws-observability
11871188
repository: adot-autoinstrumentation-python
1188-
tag: v0.7.0
1189+
tag: v0.8.0
11891190
dotnet:
11901191
repositoryDomain: public.ecr.aws/aws-observability
11911192
repository: adot-autoinstrumentation-dotnet
1192-
tag: v1.4.0
1193+
tag: v1.6.0
11931194
nodejs:
11941195
repositoryDomain: public.ecr.aws/aws-observability
11951196
repository: adot-autoinstrumentation-node
1196-
tag: v0.3.0
1197+
tag: v0.5.0
11971198
autoInstrumentationConfiguration:
11981199
java:
11991200
runtime_metrics:
@@ -1324,7 +1325,7 @@ agent:
13241325
replicas: 1 # The total number non-terminated pods targeted by this AmazonCloudWatchAgent's deployment or statefulSet.
13251326
image:
13261327
repository: cloudwatch-agent
1327-
tag: 1.300051.0b992
1328+
tag: 1.300052.0b1024
13281329
repositoryDomainMap:
13291330
public: public.ecr.aws/cloudwatch-agent
13301331
cn-north-1: 934860584483.dkr.ecr.cn-north-1.amazonaws.com.cn
@@ -1426,13 +1427,13 @@ neuronMonitor:
14261427
name:
14271428
image:
14281429
repository: neuron-monitor
1429-
tag: 1.2.1
1430+
tag: 1.3.0
14301431
repositoryDomainMap:
14311432
public: public.ecr.aws/neuron
14321433
resources:
14331434
limits:
14341435
cpu: 500m
1435-
memory: 256Mi
1436+
memory: 500Mi
14361437
requests:
14371438
cpu: 256m
14381439
memory: 128Mi

0 commit comments

Comments
 (0)