fluentd

by serge.logvinov

Helm chartv1.5.0App 1.20.1Verified publisher

Deploy fluentd as log router

About this chart

fluentd

Deploy fluentd as log router

Homepage: https://github.com/sergelogvinov/helm-charts

Maintainers

NameEmailUrl
sergelogvinovhttps://github.com/sergelogvinov

Source Code

Launch fluentd as log router.

This chart uses with fluent-bit chart. Fluent-bit is gathering the logs, and sending to fluentd deploy (fluentd router). When fluentd routes the traffic to different destinations.

# helm values

annotations:
  fluentbit.io/exclude: "true"
  prometheus.io/scrape: "true"
  prometheus.io/port: "24231"

useDaemonSet: true

env:
  FLUENTD_CONF: /fluentd/etc/fluent.conf

configMaps:
  output.conf: |
    <match **>
      @type stdout
      <format>
        @type hash
      </format>
    </match>

metrics:
  enabled: true

nodeSelector:
  node-role.kubernetes.io/control-plane: ""
tolerations:
  - key: node-role.kubernetes.io/control-plane
    effect: NoSchedule

Values

KeyTypeDefaultDescription
replicaCountint1
image.repositorystring"ghcr.io/sergelogvinov/fluentd"
image.pullPolicystring"IfNotPresent"
image.tagstring""
kubeVersionstring""
imagePullSecretslist[]
nameOverridestring""
fullnameOverridestring""
serviceAccountobject{"annotations":{},"create":true,"name":""}Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
podAnnotationsobject{}Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ example: fluentbit.io/exclude: 'true'
podSecurityContextobject{"fsGroup":101,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":101,"runAsNonRoot":true,"runAsUser":100}Pod Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}}Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
hostNetworkboolfalseUse host's network namespace. ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
serviceobject{"annotations":{},"ipFamilies":["IPv4"],"ports":[{"containerPort":24224,"name":"fluentd","protocol":"TCP"},{"containerPort":24224,"name":"heartbeat","protocol":"UDP"}],"trafficDistribution":"","type":"ClusterIP"}Service parameters ref: https://kubernetes.io/docs/user-guide/services/
service.typestring"ClusterIP"Service type ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
service.annotationsobject{}Annotations for service
service.ipFamilieslist["IPv4"]IP families for service possible values: IPv4, IPv6 ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/
service.portslist[{"containerPort":24224,"name":"fluentd","protocol":"TCP"},{"containerPort":24224,"name":"heartbeat","protocol":"UDP"}]Service ports
service.trafficDistributionstring""The traffic distribution for the service. possible values: PreferClose ref: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution
envsobject{}Deployment environment variables example: FLUENTD_CONF: /fluentd/etc/fluent.conf
envlist[]Deployment environment variables example: - name: AWS_ACCESS_KEY_ID value: ABC
logLevelstring"warn"Fluentd system.logLevel
workersint1Fluentd system.workers
inputCertsobject{"clients":["fluent-bit"],"create":false}Use tls connection for input port ref: https://docs.fluentd.org/input/forward
configMapsobject{"output.conf":"<match **>\n @type stdout\n</match>\n"}Fluentd configuration ref: https://docs.fluentd.org/configuration
configMaps."output.conf"string"<match **>\n @type stdout\n</match>\n"Output rules
metricsobject{"enabled":false}Expose prometheus metrics
resourcesobject{"requests":{"cpu":"100m","memory":"128Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
useDaemonSetboolfalseUse a daemonset instead of a deployment
updateStrategyobject{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}Pod deployment update strategy type. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment
extraVolumeslist[]
extraVolumeMountslist[]
priorityClassNamestringnilPriority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
podAntiAffinityPresetstring"soft"Pod Anti Affinity soft/hard
affinityobject{}Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity

Deploy fluentd with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fluentd on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartfluentd is pinned at v1.5.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply