Zvika Glick
Zvika Glick

Reputation: 11

Upload errors logs only to DataDog with helm chart

I'm using ingress-nginx helm chart. the chart produce lots of logs around 1M in 1 hour. In order to save costs, how can i limit the chart to upload only Error message.

I've set this in values.yml, however this not work and DataDog keep gets info logs.

controller:
  config:
    log-level: error

Upvotes: 1

Views: 39

Answers (1)

poisoned_monkey
poisoned_monkey

Reputation: 434

You can do this with ConfigMap:

kind: ConfigMap
apiVersion: v1
metadata:
  name: nginx-ingress-nginx-controller
  namespace: default
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/instance: nginx
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/version: 0.45.0
    helm.sh/chart: ingress-nginx-3.29.0
  annotations:
    meta.helm.sh/release-name: nginx
    meta.helm.sh/release-namespace: default
# ...

# Changed the empty data object below from
# data: {}

# To
data:
  error-log-level: error

Or, I am not sure, you can try this directly like this:

controller:
  config:
    error-log-level: error

Here you can read about it

Upvotes: 0

Related Questions