Search code examples
amazon-web-serviceskubernetesprometheusmetricsfluentd

How can I set the prometheus.enabled flag to true in VMWare's Kubernetes FluentD Operator using the helm chart?


I currently have a Kubernetes FluentD operator[1] running in my environment. It deploys fine using the helm chart but I need to somehow set the prometheus-enabled flag when deploying the helm chart.

The documentation states the following :

usage: config-reloader [<flags>]

Regenerates Fluentd configs based Kubernetes namespace annotations against templates, reloading
Fluentd if necessary

Flags:
  ...
  --prometheus-enabled          Prometheus metrics enabled (default: false)

My question is, can I set this flag when I run the helm chart? ie.

helm upgrade --install kfo <prometheus-enabled=true> \$CHART_URL --namespace \$INSTALL_NAMESPACE -f kfo/config.yaml

where config.yaml consists of :

---
meta:
  key: metadata
  values:
    region: ${AWS_REGION}
    env: ${ENV}
    cluster: ${KUBERNETES_CLUSTER_TYPE}
rbac:
  create: true
image:
  repository: vmware/kube-fluentd-operator
  tag: v1.12.0
fluentd:
  extraVolumeMounts:
    - name: fluentd-template-mapping
      mountPath: /templates
extraVolumes:
  - name: fluentd-template-mapping
    configMap:
      defaultMode: 420
      name: fluentd-template-mapping

If not, what can I do to set it?

Thanks


Links

  1. VMWare's fluentd operator - https://github.com/vmware/kube-fluentd-operator

Solution

  • I checked the chart and it appears you just need to add prometheusEnabled: true to your config.yaml:

    ---
    meta:
      key: metadata
      values:
        region: ${AWS_REGION}
        env: ${ENV}
        cluster: ${KUBERNETES_CLUSTER_TYPE}
    rbac:
      create: true
    image:
      repository: vmware/kube-fluentd-operator
      tag: v1.12.0
    fluentd:
      extraVolumeMounts:
        - name: fluentd-template-mapping
          mountPath: /templates
    extraVolumes:
      - name: fluentd-template-mapping
        configMap:
          defaultMode: 420
          name: fluentd-template-mapping
    prometheusEnabled: true