【问题标题】:How can I set the prometheus.enabled flag to true in VMWare's Kubernetes FluentD Operator using the helm chart?如何使用 helm chart 在 VMWare 的 Kubernetes FluentD Operator 中将 prometheus.enabled 标志设置为 true?
【发布时间】:2020-12-16 11:35:08
【问题描述】:

我目前有一个 Kubernetes FluentD operator[1] 在我的环境中运行。它使用 helm 图表部署良好,但我需要在部署 helm 图表时以某种方式设置 prometheus-enabled 标志。

文档说明如下:

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)

我的问题是,我可以在运行 helm chart 时设置这个标志吗?即。

helm upgrade --install kfo &lt;prometheus-enabled=true&gt; \$CHART_URL --namespace \$INSTALL_NAMESPACE -f kfo/config.yaml

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

如果没有,我该怎么设置它?

谢谢


链接

  1. VMWare 的流利操作符 - https://github.com/vmware/kube-fluentd-operator

【问题讨论】:

标签: amazon-web-services kubernetes prometheus metrics fluentd


【解决方案1】:

我检查了图表,看来您只需将prometheusEnabled: true 添加到您的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

【讨论】:

    猜你喜欢
    • 2019-10-31
    • 2019-06-19
    • 2020-04-01
    • 2020-01-26
    • 2018-04-15
    • 2020-03-18
    • 1970-01-01
    • 2019-04-04
    • 2020-10-08
    相关资源
    最近更新 更多