summaryrefslogtreecommitdiffstats
path: root/deployments/helm/v2/emco/fluentd
diff options
context:
space:
mode:
Diffstat (limited to 'deployments/helm/v2/emco/fluentd')
-rw-r--r--deployments/helm/v2/emco/fluentd/.helmignore21
-rw-r--r--deployments/helm/v2/emco/fluentd/Chart.yaml19
-rw-r--r--deployments/helm/v2/emco/fluentd/README.md294
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/NOTES.txt30
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/_helpers.tpl188
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/aggregator-configmap.yaml65
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml135
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/aggregator-svc.yaml32
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/clusterrole.yaml17
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/clusterrolebinding.yaml15
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/forwarder-configmap.yaml108
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/forwarder-daemonset.yaml125
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/forwarder-svc.yaml32
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/metrics-svc.yaml18
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/serviceaccount.yaml7
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml28
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/svc-headless.yaml18
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/tls-certs.yaml11
-rw-r--r--deployments/helm/v2/emco/fluentd/values-production.yaml454
-rw-r--r--deployments/helm/v2/emco/fluentd/values.yaml454
20 files changed, 2071 insertions, 0 deletions
diff --git a/deployments/helm/v2/emco/fluentd/.helmignore b/deployments/helm/v2/emco/fluentd/.helmignore
new file mode 100644
index 00000000..f0c13194
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/.helmignore
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/deployments/helm/v2/emco/fluentd/Chart.yaml b/deployments/helm/v2/emco/fluentd/Chart.yaml
new file mode 100644
index 00000000..9885c28c
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/Chart.yaml
@@ -0,0 +1,19 @@
+apiVersion: v1
+appVersion: 1.10.2
+description: Fluentd is an open source data collector for unified logging layer
+engine: gotpl
+home: https://www.fluentd.org/
+icon: https://bitnami.com/assets/stacks/fluentd/img/fluentd-stack-110x117.png
+keywords:
+- fluentd
+- logging
+- logs
+- data
+- collector
+maintainers:
+- email: containers@bitnami.com
+ name: Bitnami
+name: fluentd
+sources:
+- https://github.com/bitnami/bitnami-docker-fluentd
+version: 1.0.3
diff --git a/deployments/helm/v2/emco/fluentd/README.md b/deployments/helm/v2/emco/fluentd/README.md
new file mode 100644
index 00000000..ac07a7f2
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/README.md
@@ -0,0 +1,294 @@
+# Fluentd
+
+[Fluentd](https://www.fluentd.org/) is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data.
+
+## TL;DR;
+
+```console
+$ helm repo add bitnami https://charts.bitnami.com/bitnami
+$ helm install my-release bitnami/fluentd
+```
+
+## Introduction
+
+This chart bootstraps a [Fluentd](https://github.com/bitnami/bitnami-docker-fluentd) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+
+Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
+
+## Prerequisites
+
+- Kubernetes 1.12+
+- Helm 2.11+ or Helm 3.0-beta3+
+- PV provisioner support in the underlying infrastructure
+
+> Note: Please, note that the forwarder runs the container as root by default setting the `forwarder.securityContext.runAsUser` to `0` (_root_ user)
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm repo add bitnami https://charts.bitnami.com/bitnami
+$ helm install my-release bitnami/fluentd
+```
+
+These commands deploy Fluentd on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
+
+> **Tip**: List all releases using `helm list`
+
+## Uninstalling the Chart
+
+To uninstall/delete the `my-release` resources:
+
+```console
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option `--purge` to delete all history too.
+
+## Parameters
+
+The following tables lists the configurable parameters of the kibana chart and their default values.
+
+| Parameter | Description | Default |
+|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
+| `global.imageRegistry` | Global Docker image registry | `nil` |
+| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
+| `image.registry` | Fluentd image registry | `docker.io` |
+| `image.repository` | Fluentd image name | `bitnami/fluentd` |
+| `image.tag` | Fluentd image tag | `{TAG_NAME}` |
+| `image.pullPolicy` | Fluentd image pull policy | `IfNotPresent` |
+| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
+| `nameOverride` | String to partially override fluentd.fullname template with a string (will prepend the release name) | `nil` |
+| `fullnameOverride` | String to fully override fluentd.fullname template with a string | `nil` |
+| `clusterDomain` | Kubernetes DNS domain name to use | `cluster.local` |
+| `forwarder.enabled` | Enable Fluentd forwarder | `true` |
+| `forwarder.daemonUser` | Fluentd forwarder daemon system user | `root` |
+| `forwarder.daemonGroup` | Fluentd forwarder daemon system group | `root` |
+| `forwarder.securityContext.enabled` | Enable security context for forwarder pods | `true` |
+| `forwarder.securityContext.fsGroup` | Group ID for forwarder's containers filesystem | `0` |
+| `forwarder.securityContext.runAsUser` | User ID for forwarder's containers | `0` |
+| `forwarder.configFile` | Name of the config file that will be used by Fluentd at launch under the `/opt/bitnami/fluentd/conf` directory | `fluentd.conf` |
+| `forwarder.configMap` | Name of the config map that contains the Fluentd configuration files | `nil` |
+| `forwarder.extraArgs` | Extra arguments for the Fluentd command line | `nil` |
+| `forwarder.extraEnv` | Extra environment variables to pass to the container | `[]` |
+| `forwarder.containerPorts` | Ports the forwarder containers will listen on | `Check values.yaml` |
+| `forwarder.service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) for the forwarders | `ClusterIP` |
+| `forwarder.service.ports` | Array containing the forwarder service ports | `Check values.yaml file` |
+| `forwarder.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
+| `forwarder.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
+| `forwarder.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
+| `forwarder.service.annotations` | Annotations for the forwarder service | `{}` |
+| `forwarder.livenessProbe.enabled` | Enable liveness probes for the forwarder | `true` |
+| `forwarder.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `60` |
+| `forwarder.livenessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `forwarder.livenessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `forwarder.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `forwarder.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `forwarder.readinessProbe.enabled` | Enable readiness probes for the forwarder | `true` |
+| `forwarder.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` |
+| `forwarder.readinessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `forwarder.readinessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `forwarder.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `forwarder.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `forwarder.updateStrategy` | Update strategy for the forwarder DaemonSet | `RollingUpdate` |
+| `forwarder.resources` | Configure resource requests and limits | `nil` |
+| `forwarder.nodeSelector` | Node labels for pod assignment | `{}` |
+| `forwarder.tolerations` | Tolerations for pod assignment | `[]` |
+| `forwarder.affinity` | Affinity for pod assignment | `{}` |
+| `forwarder.podAnnotations` | Pod annotations | `{}` |
+| `aggregator.enabled` | Enable Fluentd aggregator | `true` |
+| `aggregator.replicaCount` | Number of aggregator pods to deploy in the Stateful Set | `2` |
+| `aggregator.securityContext.enabled` | Enable security context for aggregator pods | `true` |
+| `aggregator.securityContext.fsGroup` | Group ID for aggregator's containers filesystem | `1001` |
+| `aggregator.securityContext.runAsUser` | User ID for aggregator's containers | `1001` |
+| `aggregator.configFile` | Name of the config file that will be used by Fluentd at launch under the `/opt/bitnami/fluentd/conf` directory | `fluentd.conf` |
+| `aggregator.configMap` | Name of the config map that contains the Fluentd configuration files | `nil` |
+| `aggregator.port` | Kubernetes Service port - Fluentd transport port for the aggregators | `24224` |
+| `aggregator.extraArgs` | Extra arguments for the Fluentd command line | `nil` |
+| `aggregator.extraEnv` | Extra environment variables to pass to the container | `[]` |
+| `aggregator.containerPorts` | Ports the aggregator containers will listen on | `Check values.yaml` |
+| `aggregator.service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) for the aggregators | `ClusterIP` |
+| `aggregator.service.ports` | Array containing the aggregator service ports | `Check values.yaml file` |
+| `aggregator.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
+| `aggregator.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
+| `aggregator.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
+| `aggregator.service.annotations` | Annotations for the aggregator service | `{}` |
+| `aggregator.persistence.enabled` | Enable persistence volume for the aggregator | `false` |
+| `aggregator.persistence.storageClass` | Persistent Volume storage class | `nil` |
+| `aggregator.persistence.accessMode` | Persistent Volume access mode | `ReadWriteOnce` |
+| `aggregator.persistence.size` | Persistent Volume size | `10Gi` |
+| `aggregator.livenessProbe.enabled` | Enable liveness probes for the aggregator | `true` |
+| `aggregator.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `60` |
+| `aggregator.livenessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `aggregator.livenessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `aggregator.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `aggregator.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `aggregator.readinessProbe.enabled` | Enable readiness probes for the aggregator | `true` |
+| `aggregator.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` |
+| `aggregator.readinessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `aggregator.readinessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `aggregator.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `aggregator.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `aggregator.updateStrategy` | Update strategy for the aggregator DaemonSet | `RollingUpdate` |
+| `aggregator.resources` | Configure resource requests and limits | `nil` |
+| `aggregator.nodeSelector` | Node labels for pod assignment | `{}` |
+| `aggregator.tolerations` | Tolerations for pod assignment | `[]` |
+| `aggregator.affinity` | Affinity for pod assignment | `{}` |
+| `aggregator.podAnnotations` | Pod annotations | `{}` |
+| `serviceAccount.create` | Specify whether a ServiceAccount should be created | `true` |
+| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the `fluentd.fullname` template |
+| `rbac.create` | Specify whether RBAC resources should be created and used | `true` |
+| `metrics.enabled` | Enable the export of Prometheus metrics | `nil` |
+| `metrics.service.type` | Prometheus metrics service type | `ClusterIP` |
+| `metrics.service.loadBalancerIP` | Load Balancer IP if the Prometheus metrics server type is `LoadBalancer` | `nil` |
+| `metrics.service.port` | Prometheus metrics service port | `24231` |
+| `metrics.service.annotations` | Annotations for Prometheus metrics service | `{ prometheus.io/scrape: "true", prometheus.io/port: "80", prometheus.io/path: "_prometheus/metrics" }` |
+| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
+| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `nil` |
+| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
+| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
+| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `nil` |
+| `tls.enabled` | Enable the addition of TLS certificates | `false` |
+| `tls.caCertificate` | Ca certificate | Certificate Authority (CA) bundle content |
+| `tls.serverCertificate` | Server certificate | Server certificate content |
+| `tls.serverKey` | Server Key | Server private key content |
+| `tls.existingSecret` | Existing secret with certificate content | `nil` |
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+```console
+$ helm install my-release \
+ --set aggregator.port=24444 bitnami/fluentd
+```
+
+The above command sets the aggregators to listen on port 24444.
+
+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
+
+```console
+$ helm install my-release -f values.yaml bitnami/fluentd
+```
+
+> **Tip**: You can use the default [values.yaml](values.yaml)
+
+## Configuration and installation details
+
+### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
+
+It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
+
+Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
+
+### Production configuration and horizontal scaling
+
+This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one.
+
+- Number of aggregator nodes:
+```diff
+- aggregator.replicaCount: 1
++ aggregator.replicaCount: 2
+```
+
+- Enable prometheus to access fluentd metrics endpoint:
+```diff
+- metrics.enabled: false
++ metrics.enabled: true
+```
+
+To horizontally scale this chart once it has been deployed, you can upgrade the deployment using a new value for the `aggregator.replicaCount` parameter.
+
+### Forwarding the logs to another service
+
+By default, the aggregators in this chart will send the processed logs to the standard output. However, a common practice is to send them to another service, like Elasticsearch, instead. This can be achieved with this Helm Chart by mounting your own configuration files. For example:
+
+**configmap.yaml**
+
+```yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: elasticsearch-output
+data:
+ fluentd.conf: |
+ # Prometheus Exporter Plugin
+ # input plugin that exports metrics
+ <source>
+ @type prometheus
+ port {{ .Values.metrics.service.port }}
+ </source>
+
+ # input plugin that collects metrics from MonitorAgent
+ <source>
+ @type prometheus_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+
+ # input plugin that collects metrics for output plugin
+ <source>
+ @type prometheus_output_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+ {{- end }}
+
+ # Ignore fluentd own events
+ <match fluent.**>
+ @type null
+ </match>
+
+ # TCP input to receive logs from the forwarders
+ <source>
+ @type forward
+ bind 0.0.0.0
+ port {{ .Values.aggregator.port }}
+ </source>
+
+ # HTTP input for the liveness and readiness probes
+ <source>
+ @type http
+ bind 0.0.0.0
+ port 9880
+ </source>
+
+ # Throw the healthcheck to the standard output instead of forwarding it
+ <match fluentd.healthcheck>
+ @type stdout
+ </match>
+
+ # Send the logs to the standard output
+ <match **>
+ @type elasticsearch
+ include_tag_key true
+ host "#{ENV['ELASTICSEARCH_HOST']}"
+ port "#{ENV['ELASTICSEARCH_PORT']}"
+ logstash_format true
+
+ <buffer>
+ @type file
+ path /opt/bitnami/fluentd/logs/buffers/logs.buffer
+ flush_thread_count 2
+ flush_interval 5s
+ </buffer>
+ </match>
+```
+
+As an example, using the above configmap, you should specify the required parameters when upgrading or installing the chart:
+
+```console
+aggregator.configMap=elasticsearch-output
+aggregator.extraEnv[0].name=ELASTICSEARCH_HOST
+aggregator.extraEnv[0].value=your-ip-here
+aggregator.extraEnv[1].name=ELASTICSEARCH_PORT
+aggregator.extraEnv[1].value=your-port-here
+```
+
+### Notable changes
+
+## 1.0.0
+
+In this version of the chart the Fluentd forwarder daemon system user will be root by default. This is done to ensure that mounted host paths are readable by the forwarder. For more context, check this [support case](https://github.com/bitnami/charts/issues/1905).
+
+No issues are expected in the upgrade process. However, please ensure that you add extra security measures in your cluster as you will be running root containers. If you want the daemon to be run as a user different from root, you can change the `forwarder.daemonUser` and `forwarder.daemonGroup` values. In this case make sure that the user you choose has sufficient permissions to read log files under `/var/lib/docker/containers` directory.
diff --git a/deployments/helm/v2/emco/fluentd/templates/NOTES.txt b/deployments/helm/v2/emco/fluentd/templates/NOTES.txt
new file mode 100644
index 00000000..eea7a2aa
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/NOTES.txt
@@ -0,0 +1,30 @@
+** Please be patient while the chart is being deployed **
+
+ To verify that Fluentd has started, run:
+
+ kubectl get all -l "app.kubernetes.io/name={{ include "fluentd.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
+{{ if and .Values.aggregator.enabled .Values.forwarder.enabled (not .Values.aggregator.configMap) }}
+ Logs are captured on each node by the forwarder pods and then sent to the aggregator pods. By default, the aggregator pods send the logs to the standard output.
+ You can see all the logs by running this command:
+
+ kubectl logs -l "app.kubernetes.io/component=aggregator"
+
+ You can mount your own configuration files to the aggregators and the forwarders. For example, this is useful if you want to forward the aggregated logs to Elasticsearch or another service.
+{{- else if and .Values.aggregator.enabled (not .Values.forwarder.enabled) }}
+ You have deployed Fluentd in aggregator-only mode. Logs received by the aggregator will be thrown to the standard output by default.
+ You can see all the logs by running this command:
+
+ kubectl logs -l "app.kubernetes.io/component=aggregator"
+
+ You can mount your own configuration files to the aggregators. For example, this is useful if you want to forward the logs to Elasticsearch or another service.
+{{- else if and (not .Values.aggregator.enabled) (not .Values.forwarder.configMap) }}
+ Logs are captured on each node by the forwarder pods and sent to the standard output by default.
+ You can see all the logs by running this command:
+
+ kubectl logs -l "app.kubernetes.io/component=forwarder"
+
+ You can mount your own configuration files to the forwarders. For example, this is useful if you want to forward the logs to Elasticsearch or another service.
+{{- end }}
+
+{{- include "fluentd.validateValues" . }}
+{{- include "fluentd.checkRollingTags" . -}}
diff --git a/deployments/helm/v2/emco/fluentd/templates/_helpers.tpl b/deployments/helm/v2/emco/fluentd/templates/_helpers.tpl
new file mode 100644
index 00000000..f72f6e33
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/_helpers.tpl
@@ -0,0 +1,188 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "fluentd.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "fluentd.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "fluentd.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "fluentd.labels" -}}
+app.kubernetes.io/name: {{ include "fluentd.name" . }}
+helm.sh/chart: {{ include "fluentd.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Labels to use on daemonset.spec.selector.matchLabels, statefulset.spec.selector.matchLabels and svc.spec.selector
+*/}}
+{{- define "fluentd.matchLabels" -}}
+app.kubernetes.io/name: {{ include "fluentd.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Return the proper Fluentd image name
+*/}}
+{{- define "fluentd.image" -}}
+{{- $registryName := .Values.image.registry -}}
+{{- $repositoryName := .Values.image.repository -}}
+{{- $tag := .Values.image.tag | toString -}}
+{{/*
+Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
+but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
+Also, we can't use a single if because lazy evaluation is not an option
+*/}}
+{{- if .Values.global.imageRegistry }}
+ {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
+{{- else -}}
+ {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names
+*/}}
+{{- define "fluentd.imagePullSecrets" -}}
+{{/*
+Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
+but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
+Also, we can not use a single if because lazy evaluation is not an option
+*/}}
+{{- if .Values.global.imagePullSecrets }}
+imagePullSecrets:
+{{- range .Values.global.imagePullSecrets }}
+ - name: {{ . }}
+{{- end }}
+{{- else if .Values.image.pullSecrets }}
+imagePullSecrets:
+{{- range .Values.image.pullSecrets }}
+ - name: {{ . }}
+{{- end }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "fluentd.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "fluentd.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/* Check if there are rolling tags in the images */}}
+{{- define "fluentd.checkRollingTags" -}}
+{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
+WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
+{{- end }}
+{{- end -}}
+
+{{/*
+Validate data
+*/}}
+{{- define "fluentd.validateValues" -}}
+{{- $messages := list -}}
+{{- $messages := append $messages (include "fluentd.validateValues.deployment" .) -}}
+{{- $messages := append $messages (include "fluentd.validateValues.rbac" .) -}}
+{{- $messages := without $messages "" -}}
+{{- $message := join "\n" $messages -}}
+ {{- if $message -}}
+{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
+{{- end -}}
+{{- end -}}
+
+{{/* Validate values of Fluentd - forwarders and aggregators can't be disabled at the same time */}}
+{{- define "fluentd.validateValues.deployment" -}}
+{{- if and (not .Values.forwarder.enabled) (not .Values.aggregator.enabled) -}}
+fluentd:
+ You have disabled both the forwarders and the aggregators.
+ Please enable at least one of them (--set forwarder.enabled=true) (--set aggregator.enabled=true)
+{{- end -}}
+{{- end -}}
+
+{{/* Validate values of Fluentd - must create serviceAccount to create enable RBAC */}}
+{{- define "fluentd.validateValues.rbac" -}}
+{{- if and .Values.rbac.create (not .Values.serviceAccount.create) -}}
+fluentd: rbac.create
+ A ServiceAccount is required ("rbac.create=true" is set)
+ Please create a ServiceAccount (--set serviceAccount.create=true)
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the forwarder configmap name.
+*/}}
+{{- define "fluentd.forwarder.configMap" -}}
+{{- if .Values.forwarder.configMap -}}
+ {{- printf "%s" (tpl .Values.forwarder.configMap $) -}}
+{{- else -}}
+ {{- printf "%s-forwarder-cm" (include "fluentd.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the aggregator configmap name.
+*/}}
+{{- define "fluentd.aggregator.configMap" -}}
+{{- if .Values.aggregator.configMap -}}
+ {{- printf "%s" (tpl .Values.aggregator.configMap $) -}}
+{{- else -}}
+ {{- printf "%s-aggregator-cm" (include "fluentd.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the certificates secret name.
+*/}}
+{{- define "fluentd.tls.secretName" -}}
+{{- if .Values.tls.existingSecret -}}
+ {{- printf "%s" (tpl .Values.tls.existingSecret $) -}}
+{{- else -}}
+ {{- printf "%s-tls" (include "fluentd.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Renders a value that contains template.
+Usage:
+{{ include "fluentd.tplValue" (dict "value" .Values.path.to.the.Value "context" $) }}
+*/}}
+{{- define "fluentd.tplValue" -}}
+ {{- if typeIs "string" .value }}
+ {{- tpl .value .context }}
+ {{- else }}
+ {{- tpl (.value | toYaml) .context }}
+ {{- end }}
+{{- end -}}
diff --git a/deployments/helm/v2/emco/fluentd/templates/aggregator-configmap.yaml b/deployments/helm/v2/emco/fluentd/templates/aggregator-configmap.yaml
new file mode 100644
index 00000000..885e3b99
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/aggregator-configmap.yaml
@@ -0,0 +1,65 @@
+{{- if and .Values.aggregator.enabled (not .Values.aggregator.configMap) -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "fluentd.fullname" . }}-aggregator-cm
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+data:
+ fluentd.conf: |
+ {{- if .Values.metrics.enabled -}}
+ # Prometheus Exporter Plugin
+ # input plugin that exports metrics
+ <source>
+ @type prometheus
+ port {{ .Values.metrics.service.port }}
+ </source>
+
+ # input plugin that collects metrics from MonitorAgent
+ <source>
+ @type prometheus_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+
+ # input plugin that collects metrics for output plugin
+ <source>
+ @type prometheus_output_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+ {{- end }}
+
+ # Ignore fluentd own events
+ <match fluent.**>
+ @type null
+ </match>
+
+ # TCP input to receive logs from
+ {{- if and .Values.aggregator.port }}
+ <source>
+ @type forward
+ bind 0.0.0.0
+ port {{ .Values.aggregator.port }}
+ </source>
+ {{- end }}
+
+ # HTTP input for the liveness and readiness probes
+ <source>
+ @type http
+ bind 0.0.0.0
+ port 9880
+ </source>
+
+ # Throw the healthcheck to the standard output instead of forwarding it
+ <match fluentd.healthcheck>
+ @type stdout
+ </match>
+
+ # Send the logs to the standard output
+ <match **>
+ @type stdout
+ </match>
+{{- end -}}
diff --git a/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml b/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml
new file mode 100644
index 00000000..40957cf2
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml
@@ -0,0 +1,135 @@
+{{- if .Values.aggregator.enabled -}}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ app.kubernetes.io/component: aggregator
+ serviceName: {{ include "fluentd.fullname" . }}-headless
+ replicas: {{ .Values.aggregator.replicaCount }}
+ updateStrategy: {{- toYaml .Values.aggregator.updateStrategy | nindent 4 }}
+ template:
+ metadata:
+ labels: {{- include "fluentd.labels" . | nindent 8 }}
+ app.kubernetes.io/component: aggregator
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/aggregator-configmap.yaml") . | sha256sum }}
+ {{- if .Values.aggregator.podAnnotations }}
+ {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- include "fluentd.imagePullSecrets" . | nindent 6 }}
+ {{- if .Values.aggregator.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.aggregator.securityContext.runAsUser }}
+ fsGroup: {{ .Values.aggregator.securityContext.fsGroup }}
+ {{- end }}
+ {{- if .Values.aggregator.affinity }}
+ affinity: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.affinity "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.aggregator.nodeSelector }}
+ nodeSelector: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.aggregator.tolerations }}
+ tolerations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: fluentd
+ image: {{ include "fluentd.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ env:
+ - name: FLUENTD_CONF
+ value: {{ .Values.aggregator.configFile }}
+ - name: FLUENTD_OPT
+ value: {{ .Values.aggregator.extraArgs | quote }}
+ {{- if .Values.aggregator.extraEnv }}
+ {{- toYaml .Values.aggregator.extraEnv | nindent 12 }}
+ {{- end }}
+ ports:
+ {{- if .Values.aggregator.port }}
+ - name: tcp
+ containerPort: {{ .Values.aggregator.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.aggregator.containerPorts }}
+ {{- toYaml .Values.aggregator.containerPorts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ containerPort: {{ .Values.metrics.service.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.aggregator.livenessProbe.enabled }}
+ livenessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.aggregator.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.aggregator.livenessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.aggregator.livenessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.aggregator.livenessProbe.successThreshold }}
+ failureThreshold: {{ .Values.aggregator.livenessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.aggregator.readinessProbe.enabled }}
+ readinessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.aggregator.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.aggregator.readinessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.aggregator.readinessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.aggregator.readinessProbe.successThreshold }}
+ failureThreshold: {{ .Values.aggregator.readinessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.aggregator.resources }}
+ resources: {{- toYaml .Values.aggregator.resources | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: fluentd-config
+ mountPath: /opt/bitnami/fluentd/conf
+ {{- if .Values.aggregator.persistence.enabled }}
+ - name: {{ include "fluentd.fullname" . }}-buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- else }}
+ - name: buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ mountPath: /opt/bitnami/fluentd/certs
+ {{- end }}
+ volumes:
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ secret:
+ secretName: {{ template "fluentd.tls.secretName" . }}
+ items:
+ - key: tls.crt
+ path: tls.crt
+ - key: tls.key
+ path: tls.key
+ {{- end }}
+ - name: fluentd-config
+ configMap:
+ name: {{ template "fluentd.aggregator.configMap" . }}
+ {{- if not .Values.aggregator.persistence.enabled }}
+ - name: buffer
+ emptyDir: {}
+ {{- end }}
+
+ {{- if .Values.aggregator.persistence.enabled }}
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "fluentd.fullname" . }}-buffer
+ spec:
+ accessModes: [{{ .Values.aggregator.persistence.accessMode }}]
+ storageClassName: {{ .Values.aggregator.persistence.storageClass }}
+ resources:
+ requests:
+ storage: {{ .Values.aggregator.persistence.size }}
+ {{- end }}
+{{- end -}}
diff --git a/deployments/helm/v2/emco/fluentd/templates/aggregator-svc.yaml b/deployments/helm/v2/emco/fluentd/templates/aggregator-svc.yaml
new file mode 100644
index 00000000..4ae43793
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/aggregator-svc.yaml
@@ -0,0 +1,32 @@
+{{- if and .Values.aggregator.enabled .Values.aggregator.service.ports }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-aggregator
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+ {{- if .Values.aggregator.service.annotations }}
+ annotations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.service.annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.aggregator.service.type }}
+ {{- if and .Values.aggregator.service.loadBalancerIP (eq .Values.aggregator.service.type "LoadBalancer") }}
+ loadBalancerIP: {{ .Values.aggregator.service.loadBalancerIP }}
+ {{- end }}
+ {{- if and .Values.aggregator.service.loadBalancerSourceRanges (eq .Values.aggregator.service.type "LoadBalancer") }}
+ loadBalancerSourceRanges:
+ {{- with .Values.aggregator.service.loadBalancerSourceRanges }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ {{- if and (eq .Values.aggregator.service.type "ClusterIP") .Values.aggregator.service.clusterIP }}
+ clusterIP: {{ .Values.aggregator.service.clusterIP }}
+ {{- end }}
+ ports:
+ {{- range $key, $value := .Values.aggregator.service.ports }}
+ - name: {{ $key }}
+ {{ toYaml $value | nindent 6 }}
+ {{- end }}
+ selector: {{ include "fluentd.matchLabels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+{{- end }} \ No newline at end of file
diff --git a/deployments/helm/v2/emco/fluentd/templates/clusterrole.yaml b/deployments/helm/v2/emco/fluentd/templates/clusterrole.yaml
new file mode 100644
index 00000000..e4c9f50e
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/clusterrole.yaml
@@ -0,0 +1,17 @@
+{{- if and .Values.serviceAccount.create .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - "namespaces"
+ - "pods"
+ verbs:
+ - "get"
+ - "watch"
+ - "list"
+{{- end }}
diff --git a/deployments/helm/v2/emco/fluentd/templates/clusterrolebinding.yaml b/deployments/helm/v2/emco/fluentd/templates/clusterrolebinding.yaml
new file mode 100644
index 00000000..79c36e4e
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/clusterrolebinding.yaml
@@ -0,0 +1,15 @@
+{{- if and .Values.serviceAccount.create .Values.rbac.create }}
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+roleRef:
+ kind: ClusterRole
+ apiGroup: rbac.authorization.k8s.io
+ name: {{ template "fluentd.fullname" . }}
+subjects:
+ - kind: ServiceAccount
+ name: {{ template "fluentd.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace }}
+{{- end }}
diff --git a/deployments/helm/v2/emco/fluentd/templates/forwarder-configmap.yaml b/deployments/helm/v2/emco/fluentd/templates/forwarder-configmap.yaml
new file mode 100644
index 00000000..4fe7a762
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/forwarder-configmap.yaml
@@ -0,0 +1,108 @@
+{{- if and .Values.forwarder.enabled (not .Values.forwarder.configMap) -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "fluentd.fullname" . }}-forwarder-cm
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+data:
+ fluentd.conf: |
+ {{- if .Values.metrics.enabled -}}
+ # Prometheus Exporter Plugin
+ # input plugin that exports metrics
+ <source>
+ @type prometheus
+ port {{ .Values.metrics.service.port }}
+ </source>
+
+ # input plugin that collects metrics from MonitorAgent
+ <source>
+ @type prometheus_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+
+ # input plugin that collects metrics for output plugin
+ <source>
+ @type prometheus_output_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+
+ # input plugin that collects metrics for in_tail plugin
+ <source>
+ @type prometheus_tail_monitor
+ <labels>
+ host ${hostname}
+ </labels>
+ </source>
+ {{- end }}
+
+ # Ignore fluentd own events
+ <match fluent.**>
+ @type null
+ </match>
+
+ # HTTP input for the liveness and readiness probes
+ <source>
+ @type http
+ port 9880
+ </source>
+
+ # Throw the healthcheck to the standard output instead of forwarding it
+ <match fluentd.healthcheck>
+ @type stdout
+ </match>
+
+ # Get the logs from the containers running in the node
+ <source>
+ @type tail
+ path /var/log/containers/*mco*.log
+ # exclude Fluentd logs
+ exclude_path /var/log/containers/*fluentd*.log
+ pos_file /opt/bitnami/fluentd/logs/buffers/fluentd-docker.pos
+ tag kubernetes.*
+ read_from_head true
+ <parse>
+ @type json
+ </parse>
+ </source>
+
+ # enrich with kubernetes metadata
+ <filter kubernetes.**>
+ @type kubernetes_metadata
+ </filter>
+ {{ if .Values.aggregator.enabled }}
+ # Forward all logs to the aggregators
+ <match **>
+ @type forward
+ {{- $fullName := (include "fluentd.fullname" .) }}
+ {{- $global := . }}
+ {{- $domain := default "cluster.local" .Values.clusterDomain }}
+ {{- $port := .Values.aggregator.port | int }}
+ {{- range $i, $e := until (.Values.aggregator.replicaCount | int) }}
+ <server>
+ {{ printf "host %s-%d.%s-headless.%s.svc.%s" $fullName $i $fullName $global.Release.Namespace $domain }}
+ {{ printf "port %d" $port }}
+ {{- if ne $i 0 }}
+ standby
+ {{- end }}
+ </server>
+ {{- end}}
+
+ <buffer>
+ @type file
+ path /opt/bitnami/fluentd/logs/buffers/logs.buffer
+ flush_thread_count 2
+ flush_interval 5s
+ </buffer>
+ </match>
+ {{- else }}
+ # Send the logs to the standard output
+ <match **>
+ @type stdout
+ </match>
+ {{- end -}}
+{{- end -}}
diff --git a/deployments/helm/v2/emco/fluentd/templates/forwarder-daemonset.yaml b/deployments/helm/v2/emco/fluentd/templates/forwarder-daemonset.yaml
new file mode 100644
index 00000000..7c6e44df
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/forwarder-daemonset.yaml
@@ -0,0 +1,125 @@
+{{- if .Values.forwarder.enabled }}
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ app.kubernetes.io/component: forwarder
+ updateStrategy: {{- toYaml .Values.forwarder.updateStrategy | nindent 4 }}
+ template:
+ metadata:
+ labels: {{- include "fluentd.labels" . | nindent 8 }}
+ app.kubernetes.io/component: forwarder
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/forwarder-configmap.yaml") . | sha256sum }}
+ {{- if .Values.forwarder.podAnnotations }}
+ {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+{{- include "fluentd.imagePullSecrets" . | nindent 6 }}
+ serviceAccountName: {{ template "fluentd.serviceAccountName" . }}
+ {{- if .Values.forwarder.affinity }}
+ affinity: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.affinity "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.forwarder.nodeSelector }}
+ nodeSelector: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.forwarder.tolerations }}
+ tolerations: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.forwarder.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.forwarder.securityContext.runAsUser }}
+ fsGroup: {{ .Values.forwarder.securityContext.fsGroup }}
+ {{- end }}
+ containers:
+ - name: fluentd
+ image: {{ include "fluentd.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ env:
+ - name: FLUENTD_CONF
+ value: {{ .Values.forwarder.configFile }}
+ - name: FLUENTD_OPT
+ value: {{ .Values.forwarder.extraArgs | quote }}
+ - name: FLUENTD_DAEMON_USER
+ value: {{ .Values.forwarder.daemonUser | quote }}
+ - name: FLUEND_DAEMON_GROUP
+ value: {{ .Values.forwarder.daemonGroup | quote }}
+ {{- if .Values.forwarder.extraEnv }}
+ {{- toYaml .Values.forwarder.extraEnv | nindent 12 }}
+ {{- end }}
+ ports:
+ {{- if .Values.forwarder.containerPorts }}
+ {{- toYaml .Values.forwarder.containerPorts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ containerPort: {{ .Values.metrics.service.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.forwarder.livenessProbe.enabled }}
+ livenessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.forwarder.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.forwarder.livenessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.forwarder.livenessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.forwarder.livenessProbe.successThreshold }}
+ failureThreshold: {{ .Values.forwarder.livenessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.forwarder.readinessProbe.enabled }}
+ readinessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.forwarder.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.forwarder.readinessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.forwarder.readinessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.forwarder.readinessProbe.successThreshold }}
+ failureThreshold: {{ .Values.forwarder.readinessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.forwarder.resources }}
+ resources: {{- toYaml .Values.forwarder.resources | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: fluentd-config
+ mountPath: /opt/bitnami/fluentd/conf
+ - name: buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ mountPath: /opt/bitnami/fluentd/certs
+ {{- end }}
+ - name: varlog
+ mountPath: /var/log
+ - name: varlibdockercontainers
+ mountPath: /var/lib/docker/containers
+ readOnly: true
+ volumes:
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ secret:
+ secretName: {{ template "fluentd.tls.secretName" . }}
+ items:
+ - key: tls.crt
+ path: tls.crt
+ - key: tls.key
+ path: tls.key
+ {{- end }}
+ - name: fluentd-config
+ configMap:
+ name: {{ template "fluentd.forwarder.configMap" . }}
+ - name: buffer
+ emptyDir: {}
+ - name: varlog
+ hostPath:
+ path: /var/log
+ - name: varlibdockercontainers
+ hostPath:
+ path: /var/lib/docker/containers
+{{- end }}
diff --git a/deployments/helm/v2/emco/fluentd/templates/forwarder-svc.yaml b/deployments/helm/v2/emco/fluentd/templates/forwarder-svc.yaml
new file mode 100644
index 00000000..a47d37b8
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/forwarder-svc.yaml
@@ -0,0 +1,32 @@
+{{- if and .Values.forwarder.enabled .Values.forwarder.service.ports }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-forwarder
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+ {{- if .Values.forwarder.service.annotations }}
+ annotations: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.service.annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.forwarder.service.type }}
+ {{- if and .Values.forwarder.service.loadBalancerIP (eq .Values.forwarder.service.type "LoadBalancer") }}
+ loadBalancerIP: {{ .Values.forwarder.service.loadBalancerIP }}
+ {{- end }}
+ {{- if and .Values.forwarder.service.loadBalancerSourceRanges (eq .Values.forwarder.service.type "LoadBalancer") }}
+ loadBalancerSourceRanges:
+ {{- with .Values.forwarder.service.loadBalancerSourceRanges }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ {{- if and (eq .Values.forwarder.service.type "ClusterIP") .Values.forwarder.service.clusterIP }}
+ clusterIP: {{ .Values.forwarder.service.clusterIP }}
+ {{- end }}
+ ports:
+ {{- range $key, $value := .Values.forwarder.service.ports }}
+ - name: {{ $key }}
+ {{ toYaml $value | nindent 6 }}
+ {{- end }}
+ selector: {{ include "fluentd.matchLabels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+{{- end }} \ No newline at end of file
diff --git a/deployments/helm/v2/emco/fluentd/templates/metrics-svc.yaml b/deployments/helm/v2/emco/fluentd/templates/metrics-svc.yaml
new file mode 100644
index 00000000..2b0c92f1
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/metrics-svc.yaml
@@ -0,0 +1,18 @@
+{{- if .Values.metrics.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-metrics
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ annotations: {{- include "fluentd.tplValue" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
+spec:
+ type: {{ .Values.metrics.service.type }}
+ {{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerIP }}
+ loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }}
+ {{- end }}
+ ports:
+ - name: metrics
+ port: {{ .Values.metrics.service.port }}
+ targetPort: metrics
+ selector: {{- include "fluentd.matchLabels" . | nindent 4 }}
+{{- end }}
diff --git a/deployments/helm/v2/emco/fluentd/templates/serviceaccount.yaml b/deployments/helm/v2/emco/fluentd/templates/serviceaccount.yaml
new file mode 100644
index 00000000..1e584759
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/serviceaccount.yaml
@@ -0,0 +1,7 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "fluentd.serviceAccountName" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+{{- end -}} \ No newline at end of file
diff --git a/deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml b/deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml
new file mode 100644
index 00000000..e884ac56
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/servicemonitor.yaml
@@ -0,0 +1,28 @@
+{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ {{- if .Values.metrics.serviceMonitor.namespace }}
+ namespace: {{ .Values.metrics.serviceMonitor.namespace }}
+ {{- end }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ {{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ endpoints:
+ - port: metrics
+ path: "/metrics"
+ {{- if .Values.metrics.serviceMonitor.interval }}
+ interval: {{ .Values.metrics.serviceMonitor.interval }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ .Release.Namespace }}
+{{- end }}
diff --git a/deployments/helm/v2/emco/fluentd/templates/svc-headless.yaml b/deployments/helm/v2/emco/fluentd/templates/svc-headless.yaml
new file mode 100644
index 00000000..a64899a4
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/svc-headless.yaml
@@ -0,0 +1,18 @@
+{{- if and .Values.aggregator.enabled .Values.aggregator.service.ports -}}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-headless
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+spec:
+ type: ClusterIP
+ clusterIP: None
+ ports:
+ {{- range $key, $value := .Values.aggregator.service.ports }}
+ - name: {{ $key }}
+ {{ toYaml $value | nindent 6 }}
+ {{- end }}
+ selector: {{- include "fluentd.matchLabels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+{{- end -}}
diff --git a/deployments/helm/v2/emco/fluentd/templates/tls-certs.yaml b/deployments/helm/v2/emco/fluentd/templates/tls-certs.yaml
new file mode 100644
index 00000000..c37eb849
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/tls-certs.yaml
@@ -0,0 +1,11 @@
+{{- if and (not .Values.tls.existingSecret) ( .Values.tls.enabled) }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "fluentd.fullname" . }}-tls
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+type: kubernetes.io/tls
+data:
+ tls.crt: {{ required "A valid .Values.tls.certificate entry required!" .Values.tls.certificate | b64enc }}
+ tls.key: {{ required "A valid .Values.tls.key entry required!" .Values.tls.key | b64enc }}
+{{- end }}
diff --git a/deployments/helm/v2/emco/fluentd/values-production.yaml b/deployments/helm/v2/emco/fluentd/values-production.yaml
new file mode 100644
index 00000000..d1bc5e26
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/values-production.yaml
@@ -0,0 +1,454 @@
+## Global Docker image parameters
+## Please, note that this will override the image parameters, including dependencies, configured to use the global value
+## Current available global Docker image parameters: imageRegistry and imagePullSecrets
+##
+global: {}
+# imageRegistry: myRegistryName
+# imagePullSecrets:
+# - myRegistryKeySecretName
+
+## Bitnami Fluentd image version
+## ref: https://hub.docker.com/r/bitnami/fluentd/tags/
+##
+image:
+ registry: docker.io
+ repository: bitnami/fluentd
+ tag: 1.10.2-debian-10-r11
+ ## Specify a imagePullPolicy
+ ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
+ ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+ ##
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets.
+ ## Secrets must be manually created in the namespace.
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ##
+ # pullSecrets:
+ # - myRegistryKeySecretName
+
+## String to partially override fluentd.fullname template (will maintain the release name)
+##
+# nameOverride:
+
+## String to fully override fluentd.fullname template
+##
+# fullnameOverride:
+
+## Cluster Domain
+##
+clusterDomain: cluster.local
+
+## Forwarder parameters
+##
+forwarder:
+ ## Enable forwarder daemonset
+ ##
+ enabled: true
+
+ ## Forwarder daemon user and group (set to root by default because it reads from host paths)
+ ##
+ daemonUser: root
+ daemonGroup: root
+
+ ## K8s Security Context for forwarder pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 0
+ fsGroup: 0
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Forwarder containers' ports
+ ##
+ containerPorts:
+ # - name: syslog-tcp
+ # containerPort: 5140
+ # protocol: TCP
+ # - name: syslog-udp
+ # containerPort: 5140
+ # protocol: UDP
+ # - name: tcp
+ # containerPort: 24224
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # syslog-udp:
+ # port: 5140
+ # targetPort: syslog-udp
+ # protocol: UDP
+ # nodePort: 31514
+ # syslog-tcp:
+ # port: 5140
+ # targetPort: syslog-tcp
+ # protocol: TCP
+ # nodePort: 31514
+ # tcp:
+ # port: 24224
+ # targetPort: tcp
+ # protocol: TCP
+ http:
+ port: 9880
+ targetPort: http
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Forwarder containers' liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Forwarder containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ resources:
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ limits: {}
+ # cpu: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## Node labels for pod assignment
+ ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+ ##
+ nodeSelector: {}
+
+ ## Tolerations for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+
+ ## Affinity for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ##
+ affinity: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+## Agregator parameters
+##
+aggregator:
+ ## Enable Aggregator daemonset
+ ##
+ enabled: true
+ ## Number of Aggregator replicas
+ ##
+ replicaCount: 2
+
+ ## K8s Security Context for Aggregator pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 1001
+ fsGroup: 1001
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## Port the Aggregator container will listen for logs. Leave it blank to ignore.
+ ## You can specify other ports in the aggregator.containerPorts parameter
+ ##
+ port: 24224
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Aggregator containers' ports
+ ##
+ containerPorts:
+ # - name: my-port
+ # containerPort: 24222
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # http:
+ # port: 9880
+ # targetPort: http
+ # protocol: TCP
+ tcp:
+ port: 24224
+ targetPort: tcp
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Configure extra options for liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Aggregator containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ resources:
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ limits: {}
+ # cpu: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## Node labels for pod assignment
+ ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+ ##
+ nodeSelector: {}
+
+ ## Tolerations for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+
+ ## Affinity for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ##
+ affinity: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+ ## Persist data to a persistent volume
+ persistence:
+ enabled: false
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ # storageClass: "-"
+ accessMode: ReadWriteOnce
+ size: 10Gi
+
+## Pods Service Account
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+##
+serviceAccount:
+ ## Specifies whether a ServiceAccount should be created
+ ##
+ create: true
+ ## The name of the ServiceAccount to use.
+ ## If not set and create is true, a name is generated using the fluentd.fullname template
+ # name:
+
+## Role Based Access
+## ref: https://kubernetes.io/docs/admin/authorization/rbac/
+##
+rbac:
+ create: true
+
+## Prometheus Exporter / Metrics
+##
+metrics:
+ enabled: true
+ ## Prometheus Exporter service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+ ## Service port
+ ##
+ port: 24231
+ ## loadBalancerIP for the Prometheus Exporter service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+ ## Annotations for the Prometheus Exporter service service
+ ##
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/port: "24231"
+ prometheus.io/path: "/metrics"
+
+ ## Prometheus Operator ServiceMonitor configuration
+ ##
+ serviceMonitor:
+ enabled: false
+ ## Namespace in which Prometheus is running
+ ##
+ # namespace: monitoring
+
+ ## Interval at which metrics should be scraped.
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # interval: 10s
+
+ ## Timeout after which the scrape is ended
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # scrapeTimeout: 10s
+
+ ## ServiceMonitor selector labels
+ ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
+ ##
+ # selector:
+ # prometheus: my-prometheus
+
+## Mount TLS certificates
+##
+tls:
+ enabled: false
+ certificate: |-
+ key: |-
+ # existingSecret: name-of-existing-secret-to-certificates
diff --git a/deployments/helm/v2/emco/fluentd/values.yaml b/deployments/helm/v2/emco/fluentd/values.yaml
new file mode 100644
index 00000000..1feb2a19
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/values.yaml
@@ -0,0 +1,454 @@
+## Global Docker image parameters
+## Please, note that this will override the image parameters, including dependencies, configured to use the global value
+## Current available global Docker image parameters: imageRegistry and imagePullSecrets
+##
+global: {}
+# imageRegistry: myRegistryName
+# imagePullSecrets:
+# - myRegistryKeySecretName
+
+## Bitnami Fluentd image version
+## ref: https://hub.docker.com/r/bitnami/fluentd/tags/
+##
+image:
+ registry: docker.io
+ repository: bitnami/fluentd
+ tag: 1.10.2-debian-10-r11
+ ## Specify a imagePullPolicy
+ ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
+ ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+ ##
+ pullPolicy: IfNotPresent
+ ## Optionally specify an array of imagePullSecrets.
+ ## Secrets must be manually created in the namespace.
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+ ##
+ # pullSecrets:
+ # - myRegistryKeySecretName
+
+## String to partially override fluentd.fullname template (will maintain the release name)
+##
+# nameOverride:
+
+## String to fully override fluentd.fullname template
+##
+# fullnameOverride:
+
+## Cluster Domain
+##
+clusterDomain: cluster.local
+
+## Forwarder parameters
+##
+forwarder:
+ ## Enable forwarder daemonset
+ ##
+ enabled: true
+
+ ## Forwarder daemon user and group (set to root by default because it reads from host paths)
+ ##
+ daemonUser: root
+ daemonGroup: root
+
+ ## K8s Security Context for forwarder pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 0
+ fsGroup: 0
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Forwarder containers' ports
+ ##
+ containerPorts:
+ # - name: syslog-tcp
+ # containerPort: 5140
+ # protocol: TCP
+ # - name: syslog-udp
+ # containerPort: 5140
+ # protocol: UDP
+ # - name: tcp
+ # containerPort: 24224
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # syslog-udp:
+ # port: 5140
+ # targetPort: syslog-udp
+ # protocol: UDP
+ # nodePort: 31514
+ # syslog-tcp:
+ # port: 5140
+ # targetPort: syslog-tcp
+ # protocol: TCP
+ # nodePort: 31514
+ # tcp:
+ # port: 24224
+ # targetPort: tcp
+ # protocol: TCP
+ http:
+ port: 9880
+ targetPort: http
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Forwarder containers' liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Forwarder containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ resources:
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ limits: {}
+ # cpu: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## Node labels for pod assignment
+ ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+ ##
+ nodeSelector: {}
+
+ ## Tolerations for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+
+ ## Affinity for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ##
+ affinity: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+## Agregator parameters
+##
+aggregator:
+ ## Enable Aggregator daemonset
+ ##
+ enabled: true
+ ## Number of Aggregator replicas
+ ##
+ replicaCount: 1
+
+ ## K8s Security Context for Aggregator pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 1001
+ fsGroup: 1001
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## Port the Aggregator container will listen for logs. Leave it blank to ignore.
+ ## You can specify other ports in the aggregator.containerPorts parameter
+ ##
+ port: 24224
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Aggregator containers' ports
+ ##
+ containerPorts:
+ # - name: my-port
+ # containerPort: 24222
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # http:
+ # port: 9880
+ # targetPort: http
+ # protocol: TCP
+ tcp:
+ port: 24224
+ targetPort: tcp
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Configure extra options for liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Aggregator containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ resources:
+ # We usually recommend not to specify default resources and to leave this as a conscious
+ # choice for the user. This also increases chances charts run on environments with little
+ # resources, such as Minikube. If you do want to specify resources, uncomment the following
+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+ limits: {}
+ # cpu: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## Node labels for pod assignment
+ ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+ ##
+ nodeSelector: {}
+
+ ## Tolerations for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+ ##
+ tolerations: []
+
+ ## Affinity for pod assignment
+ ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+ ##
+ affinity: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+ ## Persist data to a persistent volume
+ persistence:
+ enabled: false
+ ## If defined, storageClassName: <storageClass>
+ ## If set to "-", storageClassName: "", which disables dynamic provisioning
+ ## If undefined (the default) or set to null, no storageClassName spec is
+ ## set, choosing the default provisioner. (gp2 on AWS, standard on
+ ## GKE, AWS & OpenStack)
+ ##
+ # storageClass: "-"
+ accessMode: ReadWriteOnce
+ size: 10Gi
+
+## Pods Service Account
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+##
+serviceAccount:
+ ## Specifies whether a ServiceAccount should be created
+ ##
+ create: true
+ ## The name of the ServiceAccount to use.
+ ## If not set and create is true, a name is generated using the fluentd.fullname template
+ # name:
+
+## Role Based Access
+## ref: https://kubernetes.io/docs/admin/authorization/rbac/
+##
+rbac:
+ create: true
+
+## Prometheus Exporter / Metrics
+##
+metrics:
+ enabled: false
+ ## Prometheus Exporter service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+ ## Service port
+ ##
+ port: 24231
+ ## loadBalancerIP for the Prometheus Exporter service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+ ## Annotations for the Prometheus Exporter service service
+ ##
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/port: "24231"
+ prometheus.io/path: "/metrics"
+
+ ## Prometheus Operator ServiceMonitor configuration
+ ##
+ serviceMonitor:
+ enabled: false
+ ## Namespace in which Prometheus is running
+ ##
+ # namespace: monitoring
+
+ ## Interval at which metrics should be scraped.
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # interval: 10s
+
+ ## Timeout after which the scrape is ended
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # scrapeTimeout: 10s
+
+ ## ServiceMonitor selector labels
+ ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
+ ##
+ # selector:
+ # prometheus: my-prometheus
+
+## Mount TLS certificates
+##
+tls:
+ enabled: false
+ certificate: |-
+ key: |-
+ # existingSecret: name-of-existing-secret-to-certificates