Skip to content

Adding node js implementation #87

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

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2322e71
Pass GOMEMLIMIT as env variable (#56)
sam6134 Jul 1, 2024
e0e99c7
release 1.8.0 (#57)
movence Jul 2, 2024
48781f5
EKS Addon Fargate Bug Fix (#58)
Paramadon Jul 3, 2024
41c42db
feat(helm:daemonsets): parametrize resources configuration using valu…
m00lecule Jul 18, 2024
00bd626
fix indentation with resources block and bump up the default memory l…
movence Jul 19, 2024
070a81a
release 1.9.0 (#69)
movence Jul 23, 2024
823f2dc
Add .NET auto instrumentation (#64)
lisguo Jul 29, 2024
8f2628e
release 1.10.0 (#72)
movence Jul 29, 2024
aa6755e
Add application signals to windows config (#73)
lisguo Jul 29, 2024
25081d7
Fix syntax issue with .net auto-instrumentation image template (#76)
lisguo Aug 2, 2024
6f17156
Allow configurable resource requests and limits through command argum…
musa-asad Aug 9, 2024
5ef8045
Made helm format more intuitive for auto-instrumentation resources va…
musa-asad Aug 12, 2024
049f2f9
Updating Linux fluent-bit image to the latest (#74)
mitali-salvi Aug 12, 2024
e1cb2a6
Add container image scanning workflow (#81)
lisguo Aug 14, 2024
0595aa2
Add hostNetwork: true for cloudwatch agent pod on linux (#82)
lisguo Aug 14, 2024
c7a51ba
Release 2.0.0 (#85)
movence Aug 16, 2024
3e684e7
adding node js implementation
Paramadon Aug 23, 2024
a5cbf86
adding print node js statement
Paramadon Aug 23, 2024
7d3aac1
fixing indentation
Paramadon Aug 23, 2024
06aa25d
fixing indentation
Paramadon Aug 23, 2024
bdd5ec9
fixing parsing error
Paramadon Aug 23, 2024
70b1a75
Merge branch 'nodejs-instrumentation' into nodeJSIntegTest
Paramadon Aug 23, 2024
3f540bf
removing terraform
Paramadon Aug 27, 2024
0555640
adding adot image for nodejs
Paramadon Aug 30, 2024
cef0212
fixing order of nodejs image
Paramadon Aug 30, 2024
db9517f
fixing nodejs order
Paramadon Aug 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/amazon-cloudwatch-observability-image-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Run Image Scan for Amazon CloudWatch Observability Helm Chart

on:
schedule:
- cron: 0 13 * * MON # Every Monday at 1PM UTC (9AM EST)
workflow_dispatch:

permissions:
id-token: write
contents: read

env:
TERRAFORM_AWS_ASSUME_ROLE: ${{ secrets.TERRAFORM_AWS_ASSUME_ROLE }}
AWS_DEFAULT_REGION: us-west-2

jobs:
ContainerImageScan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container_images:
- registry: ".manager.image.repositoryDomainMap.public"
repository: ".manager.image.repository"
tag: ".manager.image.tag"

- registry: ".manager.autoInstrumentationImage.java.repositoryDomain"
repository: ".manager.autoInstrumentationImage.java.repository"
tag: ".manager.autoInstrumentationImage.java.tag"

- registry: ".manager.autoInstrumentationImage.python.repositoryDomain"
repository: ".manager.autoInstrumentationImage.python.repository"
tag: ".manager.autoInstrumentationImage.python.tag"

- registry: ".manager.autoInstrumentationImage.dotnet.repositoryDomain"
repository: ".manager.autoInstrumentationImage.dotnet.repository"
tag: ".manager.autoInstrumentationImage.dotnet.tag"

- registry: ".agent.image.repositoryDomainMap.public"
repository: ".agent.image.repository"
tag: ".agent.image.tag"

- registry: ".dcgmExporter.image.repositoryDomainMap.public"
repository: ".dcgmExporter.image.repository"
tag: ".dcgmExporter.image.tag"

- registry: ".neuronMonitor.image.repositoryDomainMap.public"
repository: ".neuronMonitor.image.repository"
tag: ".neuronMonitor.image.tag"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- name: "Get image registry"
id: registry
uses: mikefarah/yq@master
with:
cmd: yq '${{ matrix.container_images.registry }}' charts/amazon-cloudwatch-observability/values.yaml

- name: "Get image repository"
id: repository
uses: mikefarah/yq@master
with:
cmd: yq '${{ matrix.container_images.repository }}' charts/amazon-cloudwatch-observability/values.yaml

- name: "Get image tag"
id: tag
uses: mikefarah/yq@master
with:
cmd: yq '${{ matrix.container_images.tag }}' charts/amazon-cloudwatch-observability/values.yaml

- name: "Scan for vulnerabilities"
uses: crazy-max/ghaction-container-scan@v3
with:
image: ${{ steps.registry.outputs.result }}/${{ steps.repository.outputs.result }}:${{ steps.tag.outputs.result }}
severity_threshold: HIGH
47 changes: 47 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
=======================================================================
amazon-cloudwatch-observability v2.0.0 (2024-08-15)
========================================================================
Breaking Changes:
* Enforce default requests and limits for auto instrumentation init containers

Enhancements:
* Allow configurable requests and limits for auto instrumentation init containers (#65)
* Restructure resources configurations for AppSignals (#80)
* Upgrade CWAgent to v1.300044.0
* Upgrade CWAgent Operator to v1.6.0
* Upgrade .Net SDK to v1.2.0
* Upgrade FluentBit for Linux to 2.32.2.20240627

=======================================================================
amazon-cloudwatch-observability v1.10.0 (2024-07-30)
========================================================================
New Features:
* Adding support for .Net auto instrumentation for Application Signals (#64)

Enhancements:
* Upgrade CWAgent Operator to v1.5.0

=======================================================================
amazon-cloudwatch-observability v1.9.0 (2024-07-22)
========================================================================
Bug Fixes:
* Add nodeAffinity rule to not spin up resources on Fargate instances (#58)
* Increase the default memory limit of DCGM Exporter to 500Mi to fix OOM crashing issue (#67)

Enhancements:
* Support parameterized resources configuration (#63)
* Upgrade Java SDK to v1.32.3
* Upgrade Python SDK to v0.3.0
* Upgrade CWAgent to v1.300042.1

=======================================================================
amazon-cloudwatch-observability v1.8.0 (2024-07-02)
========================================================================
Bug Fixes:
* Add GOMEMLIMIT environment variable for Neuron Monitor to fix OOM crash issue (#56)

Enhancements:
* Update Windows Fluent-Bit configuration to export Kubelet and kube-proxy service logs to host log group (#45)
* Upgrade CWAgent Operator to v1.4.1
* Upgrade CWAgent to v1.300041.0

=======================================================================
amazon-cloudwatch-observability v1.7.0 (2024-05-23)
========================================================================
Expand Down
2 changes: 1 addition & 1 deletion charts/amazon-cloudwatch-observability/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: amazon-cloudwatch-observability
version: 1.7.0
version: 2.0.0
appVersion: 1.0.0
description: A Helm chart for Amazon CloudWatch Observability
type: application
Expand Down
10 changes: 9 additions & 1 deletion charts/amazon-cloudwatch-observability/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ Get the current recommended auto instrumentation nodejs image
{{- printf "%s/%s:%s" .Values.manager.autoInstrumentationImage.nodejs.repositoryDomain .Values.manager.autoInstrumentationImage.nodejs.repository .Values.manager.autoInstrumentationImage.nodejs.tag -}}
{{- end -}}

{{/*
Get the current recommended auto instrumentation dotnet image
*/}}
{{- define "auto-instrumentation-dotnet.image" -}}
{{- printf "%s/%s:%s" .Values.manager.autoInstrumentationImage.dotnet.repositoryDomain .Values.manager.autoInstrumentationImage.dotnet.repository .Values.manager.autoInstrumentationImage.dotnet.tag -}}
{{- end -}}


{{/*
Common labels
*/}}
Expand Down Expand Up @@ -240,4 +248,4 @@ Define the default service name
*/}}
{{- define "amazon-cloudwatch-observability.webhookServiceName" -}}
{{- default (printf "%s-webhook-service" (include "amazon-cloudwatch-observability.name" .)) .Values.manager.service.name }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,24 @@ spec:
nodeSelector:
kubernetes.io/os: linux
serviceAccount: {{ template "cloudwatch-agent.serviceAccountName" . }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.fargateLabelKey }}
operator: NotIn
values:
- fargate
hostNetwork: true
{{- if .Values.agent.config }}
config: {{ include "cloudwatch-agent.modify-config" (merge (dict "Config" .Values.agent.config) . ) }}
{{- else }}
config: {{ include "cloudwatch-agent.modify-config" (merge (dict "Config" .Values.agent.defaultConfig) . ) }}
{{- end }}
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
{{- with .Values.agent.resources }}
resources: {{- toYaml . | nindent 4}}
{{- end }}
volumeMounts:
- mountPath: /rootfs
name: rootfs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ spec:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.nodeLabelKey }}
operator: In
values: {{ .Values.gpuInstances | toYaml | nindent 16 }}
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 500m
memory: 250Mi
- matchExpressions:
- key: {{ .Values.nodeLabelKey }}
operator: In
values: {{ .Values.gpuInstances | toYaml | nindent 16 }}
- key: {{ .Values.fargateLabelKey }}
operator: NotIn
values:
- fargate
{{- with .Values.dcgmExporter.resources }}
resources: {{- toYaml . | nindent 4}}
{{- end }}
env:
- name: "DCGM_EXPORTER_KUBERNETES"
value: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ spec:
fieldPath: metadata.name
- name: CI_VERSION
value: "k8s/1.3.17"
resources:
limits:
cpu: 500m
memory: 250Mi
requests:
cpu: 50m
memory: 25Mi
{{- with .Values.containerLogs.fluentBit.resources }}
resources: {{- toYaml . | nindent 10}}
{{- end }}
volumeMounts:
# Please don't change below read-only permissions
- name: fluentbitstate
Expand Down Expand Up @@ -95,6 +91,15 @@ spec:
hostPath:
path: /var/log/dmesg
serviceAccountName: {{ template "cloudwatch-agent.serviceAccountName" . }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.fargateLabelKey }}
operator: NotIn
values:
- fargate
nodeSelector:
kubernetes.io/os: linux
{{- with .Values.tolerations }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,34 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux
- key: {{ .Values.nodeLabelKey }}
operator: In
values: {{ .Values.neuronInstances | toYaml | nindent 20 }}
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 256m
memory: 128Mi
- key: kubernetes.io/os
operator: In
values:
- linux
- key: {{ .Values.nodeLabelKey }}
operator: In
values: {{ .Values.neuronInstances | toYaml | nindent 20 }}
- key: {{ .Values.fargateLabelKey }}
operator: NotIn
values:
- fargate
{{- with .Values.neuronMonitor.resources }}
resources: {{- toYaml . | nindent 4}}
{{- end }}
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: PATH
value: /usr/local/bin:/usr/bin:/bin:/opt/aws/neuron/bin
- name: GOMEMLIMIT
value: 160MiB
ports:
- name: "metrics"
port: {{ .Values.neuronMonitor.service.port }}
command:
- "/opt/bin/entrypoint.sh"
- "/opt/bin/entrypoint.sh"
args:
port: "{{ .Values.neuronMonitor.service.port }}"
cert-file: "/etc/amazon-cloudwatch-observability-neuron-cert/server.crt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ spec:
containers:
- image: {{ template "cloudwatch-agent-operator.image" . }}
args:
- {{ printf "--auto-instrumentation-config=%s" (dict "java" (.Values.manager.autoInstrumentationResources.java) "python" (.Values.manager.autoInstrumentationResources.python) "dotnet" (.Values.manager.autoInstrumentationResources.dotnet) "nodejs" (.Values.manager.autoInstrumentationResources.nodejs) | toJson) | quote }}
- {{ printf "--auto-annotation-config=%s" (.Values.manager.autoAnnotateAutoInstrumentation | toJson) | quote }}
- "--auto-instrumentation-java-image={{ template "auto-instrumentation-java.image" . }}"
- "--auto-instrumentation-python-image={{ template "auto-instrumentation-python.image" . }}"
- "--auto-instrumentation-nodejs-image={{ template "auto-instrumentation-nodejs.image" . }}"
- "--auto-instrumentation-dotnet-image={{ template "auto-instrumentation-dotnet.image" . }}"
- "--feature-gates=operator.autoinstrumentation.multi-instrumentation,operator.autoinstrumentation.multi-instrumentation.skip-container-validation"
command:
- /manager
Expand All @@ -38,7 +40,7 @@ spec:
- containerPort: {{ .Values.manager.ports.containerPort }}
name: webhook-server
protocol: TCP
resources: {{ toYaml .Values.manager.resources | nindent 12 }}
resources: {{ toYaml .Values.manager.resources | nindent 10 }}
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ spec:
nodeSelector:
kubernetes.io/os: windows
config: {{ .Values.agent.windowsDefaultConfig | toJson | quote }}
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
{{- with .Values.agent.resources }}
resources: {{- toYaml . | nindent 4}}
{{- end }}
env:
- name: K8S_NODE_NAME
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@ spec:
fieldPath: metadata.name
- name: CI_VERSION
value: "k8s/1.3.17"
resources:
limits:
cpu: 500m
memory: 600Mi
requests:
cpu: 300m
memory: 300Mi
{{- with .Values.containerLogs.fluentBit.resources }}
resources: {{- toYaml . | nindent 10}}
{{- end }}
volumeMounts:
- name: fluent-bit-config
mountPath: fluent-bit\configuration\
Expand Down
Loading
Loading