Files
adityapahuja 2a88302dab [incubator/fluentd-cloudwatch] Add configurable volumes and volumeMounts (#18670)
* Update daemonset.yaml file to have configurable volumes and volumeMounts. This allows us to add volumes and volumeMounts. For example, the kubelet writes to journald. We want to add a volume "/run/log/journal" and its volume mount so that fluentd-cloudwatch can send the kubelet log messages to CloudWatch.

Signed-off-by: Aditya Pahuja <aditya.pahuja@digital.cabinet-office.gov.uk>

* Bump fluentd-cloudwatch chart version

Signed-off-by: Aditya Pahuja <aditya.pahuja@digital.cabinet-office.gov.uk>
2019-12-31 22:47:39 -08:00

240 lines
6.0 KiB
YAML

image:
repository: fluent/fluentd-kubernetes-daemonset
tag: v1.7.3-debian-cloudwatch-1.0
## Specify an imagePullPolicy (Required)
## It's recommended to change this to 'Always' if the image tag is 'latest'
## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
pullPolicy: IfNotPresent
## Configure 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: 100m
# memory: 200Mi
# requests:
# cpu: 100m
# memory: 200Mi
# hostNetwork: false
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
# kubernetes.io/role: node
# Ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#affinity-v1-core
# Expects input structure as per specification for example:
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: foo.bar.com/role
# operator: In
# values:
# - master
affinity: {}
volumeMounts: []
# - name: runlogjournal
# mountPath: /run/log/journal
# readOnly: true
volumes: []
# - name: runlogjournal
# hostPath:
# path: /run/log/journal
## Add tolerations if specified
tolerations: []
# - key: node-role.kubernetes.io/master
# operator: Exists
# effect: NoSchedule
podSecurityContext: {}
podAnnotations: {}
# Pod priority
# Sets PriorityClassName if defined.
#
# priorityClassName: "my-priority-class"
awsRegion: us-east-1
awsRole:
awsAccessKeyId:
awsSecretAccessKey:
logGroupName: kubernetes
rbac:
## If true, create and use RBAC resources
create: false
pspEnabled: false
## Ignored if rbac.create is true
serviceAccountName: default
## Annotations for the Service Account
##
serviceAccountAnnotations: {}
# Add extra environment variables if specified (must be specified as a single line object and be quoted)
extraVars: []
# - "{ name: NODE_NAME, valueFrom: { fieldRef: { fieldPath: spec.nodeName } } }"
busybox:
repository: busybox
tag: 1.31.0
updateStrategy:
type: OnDelete
data:
fluent.conf: |
<match fluent.**>
@type null
</match>
<source>
@type tail
enable_stat_watcher false
path /var/log/containers/*.log
pos_file /var/log/fluentd-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag kubernetes.*
format json
read_from_head true
</source>
<source>
@type tail
enable_stat_watcher false
format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/
time_format %Y-%m-%d %H:%M:%S
path /var/log/salt/minion
pos_file /var/log/fluentd-salt.pos
tag salt
</source>
<source>
@type tail
enable_stat_watcher false
format syslog
path /var/log/startupscript.log
pos_file /var/log/fluentd-startupscript.log.pos
tag startupscript
</source>
<source>
@type tail
enable_stat_watcher false
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
path /var/log/docker.log
pos_file /var/log/fluentd-docker.log.pos
tag docker
</source>
<source>
@type tail
enable_stat_watcher false
format none
path /var/log/etcd.log
pos_file /var/log/fluentd-etcd.log.pos
tag etcd
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/kubelet.log
pos_file /var/log/fluentd-kubelet.log.pos
tag kubelet
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/kube-proxy.log
pos_file /var/log/fluentd-kube-proxy.log.pos
tag kube-proxy
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/kube-apiserver.log
pos_file /var/log/fluentd-kube-apiserver.log.pos
tag kube-apiserver
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/kube-controller-manager.log
pos_file /var/log/fluentd-kube-controller-manager.log.pos
tag kube-controller-manager
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/kube-scheduler.log
pos_file /var/log/fluentd-kube-scheduler.log.pos
tag kube-scheduler
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/rescheduler.log
pos_file /var/log/fluentd-rescheduler.log.pos
tag rescheduler
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/glbc.log
pos_file /var/log/fluentd-glbc.log.pos
tag glbc
</source>
<source>
@type tail
enable_stat_watcher false
format kubernetes
multiline_flush_interval 5s
path /var/log/cluster-autoscaler.log
pos_file /var/log/fluentd-cluster-autoscaler.log.pos
tag cluster-autoscaler
</source>
<filter kubernetes.**>
@type kubernetes_metadata
</filter>
<match **>
@type cloudwatch_logs
log_group_name "#{ENV['LOG_GROUP_NAME']}"
auto_create_stream true
use_tag_as_stream true
</match>