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

aws-cloudwatch-metrics: Add support for AWS X-Ray #1128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions stable/aws-cloudwatch-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ helm upgrade --install aws-cloudwatch-metrics \
| `statsd.cloudwatch_namespace` | Optional custom Cloudwatch namespace for statsd metrics | |
| `statsd.metrics_aggregation_interval` | Optional cutom metrics aggregation interval for statsd metrics | |
| `statsd.metrics_collection_interval` | Optional custom metrics collection interval for statsd metrics | |
| `xray.enabled` | Whether the cloudwatch agent should listen for traces from the X-Ray SDK | `false` |
| `xray.port` | The port listening for X-Ray traces | `2000` |
12 changes: 0 additions & 12 deletions stable/aws-cloudwatch-metrics/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,3 @@ Create the name of the service account to use
{{- define "aws-cloudwatch-metrics.serviceAccountName" -}}
{{ default (include "aws-cloudwatch-metrics.fullname" .) .Values.serviceAccount.name }}
{{- end -}}

{{/*
Create a config section for StatsD ports.
*/}}
{{- define "aws-cloudwatch-metrics.statsdConfig" -}}
{{- if .Values.statsd.enabled -}}
ports:
- containerPort: {{ .Values.statsd.port }}
hostPort: {{ .Values.statsd.port }}
protocol: {{ .Values.statsd.protocol }}
{{ end -}}
{{- end -}}
9 changes: 9 additions & 0 deletions stable/aws-cloudwatch-metrics/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ data:
}
},
"force_flush_interval": 5
{{- if .Values.xray.enabled }}
},
"traces": {
"traces_collected": {
"xray": {
"bind_address": ":{{ .Values.xray.port -}}"
}
}
{{- end }}
{{- if .Values.statsd.enabled }}
},
"metrics": {
Expand Down
14 changes: 13 additions & 1 deletion stable/aws-cloudwatch-metrics/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- include "aws-cloudwatch-metrics.statsdConfig" . | nindent 8 -}}
{{- if or .Values.statsd.enabled .Values.xray.enabled }}
ports:
{{- if .Values.statsd.enabled }}
- containerPort: {{ .Values.statsd.port }}
hostPort: {{ .Values.statsd.port }}
protocol: {{ .Values.statsd.protocol }}
{{- end }}
{{- if .Values.xray.enabled }}
- containerPort: {{ .Values.xray.port }}
hostPort: {{ .Values.xray.port }}
protocol: UDP
{{- end }}
{{- end }}
# Please don't change below envs
env:
- name: HOST_IP
Expand Down
Empty file modified stable/aws-cloudwatch-metrics/templates/serviceaccount.yaml
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions stable/aws-cloudwatch-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ statsd:
# cloudwatch_namespace:
# metrics_aggregation_interval:
# metrics_collection_interval:

xray:
enabled: false
port: 2000