Skip to content

Commit

Permalink
[aws-cloudwatch-metrics] Allow metrics_collection_interval configurat…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
NadavOps committed Nov 28, 2023
1 parent 9fc79ca commit 9cd8ad6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/aws-cloudwatch-metrics/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: aws-cloudwatch-metrics
description: A Helm chart to deploy aws-cloudwatch-metrics project
version: 0.0.9
version: 0.0.10
appVersion: "1.247350"
home: https://github.com/aws/eks-charts
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
Expand Down
1 change: 1 addition & 0 deletions stable/aws-cloudwatch-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ helm upgrade --install aws-cloudwatch-metrics \
| `image.tag` | Image tag to deploy | `1.247345.36b249270`
| `image.pullPolicy` | Pull policy for the image | `IfNotPresent` | ✔
| `clusterName` | Name of your cluster | `cluster_name` | ✔
| `metricsCollectionInterval` | agent collection interval | `60`
| `serviceAccount.create` | Whether a new service account should be created | `true` |
| `serviceAccount.name` | Service account to be used | |
| `hostNetwork` | Allow to use the network namespace and network resources of the node | `false` |
Expand Down
6 changes: 5 additions & 1 deletion stable/aws-cloudwatch-metrics/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ metadata:
{{- include "aws-cloudwatch-metrics.labels" . | nindent 4 }}
data:
cwagentconfig.json: |
{{- $metricsCollectionInterval := .Values.metricsCollectionInterval | default 60 | int }}
{{- if lt $metricsCollectionInterval 15 }}
{{- fail "metricsCollectionInterval allows you to specify how often the agent collects metrics. The default is 60 seconds. The default cadvisor collection interval in kubelet is 15 seconds, so don't set this value to less than 15 seconds." }}
{{- end }}
{
"logs": {
"metrics_collected": {
"kubernetes": {
"cluster_name": "{{ .Values.clusterName }}",
"metrics_collection_interval": 60
"metrics_collection_interval": {{ $metricsCollectionInterval }}
}
},
"force_flush_interval": 5
Expand Down
1 change: 1 addition & 0 deletions stable/aws-cloudwatch-metrics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ image:
pullPolicy: IfNotPresent

clusterName: cluster_name
metricsCollectionInterval: 60

resources:
limits:
Expand Down

0 comments on commit 9cd8ad6

Please sign in to comment.