Add nodeAffinity to all logging components, add resources to fluent-bit, tuning

This commit is contained in:
Stefan Reimer 2021-03-19 16:15:58 +01:00
parent ef5fa96ec8
commit 1018270620
6 changed files with 62 additions and 9 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-logging
description: KubeZero Umbrella Chart for complete EFK stack
type: application
version: 0.6.1
version: 0.6.2
appVersion: 1.4.1
home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png

View File

@ -18,7 +18,7 @@ spec:
{{- end }}
{{- if .zone }}
node.attr.zone: {{ .zone }}
cluster.routing.allocation.awareness.attributes: zone
cluster.routing.allocation.awareness.attributes: k8s_node_name,zone
{{- end }}
transport.compress: true
{{- if .processors }}
@ -66,8 +66,9 @@ spec:
matchLabels:
elasticsearch.k8s.elastic.co/cluster-name: {{ template "kubezero-lib.fullname" $ }}
topologyKey: kubernetes.io/hostname
{{- if .zone }}
{{- if or .zone .nodeAffinity }}
nodeAffinity:
{{- if .zone }}
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
@ -76,6 +77,17 @@ spec:
values:
- {{ .zone }}
{{- end }}
{{- if .nodeAffinity }}
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: {{ .nodeAffinity.key }}
operator: In
values:
- {{ .nodeAffinity.value }}
{{- end }}
{{- end }}
count: {{ .count }}
volumeClaimTemplates:
- metadata:

View File

@ -29,6 +29,19 @@ spec:
cpu: 200m
limits:
memory: 2Gi
{{- if .Values.kibana.nodeAffinity }}
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: {{ .Values.kibana.nodeAffinity.key }}
operator: In
values:
- {{ .Values.kibana.nodeAffinity.value }}
{{- end }}
http:
tls:
selfSignedCertificate:

View File

@ -18,8 +18,9 @@ es:
size: 512Gi
class: ebs-sc-gp2-xfs
zone: us-west-2a
jvm_heap: 4
cpu_limit: 2
nodeAffinity:
key: kubezero
value: logging
s3Snapshot:
enabled: true
iamrole: "dfsf" # INSERT_CLOUDFORMATION_OUTPUT_ElasticSearchSnapshots
@ -27,6 +28,9 @@ es:
prometheus: true
kibana:
nodeAffinity:
key: kubezero
value: logging
istio:
enabled: true
url: kibana.example.com

View File

@ -4,6 +4,17 @@ fluentd:
metrics:
enabled: true
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: kubezero
operator: In
values:
- logging
url: fluentd.example.com
istio:
enabled: true

View File

@ -22,6 +22,9 @@ es:
# size: 16Gi
# class: local-sc-xfs
# zone: us-west-2a
# nodeAffinity:
# key: node label name
# value: node label value
s3Snapshot:
enabled: false
iamrole: "" # INSERT_CLOUDFORMATION_OUTPUT_ElasticSearchSnapshots
@ -31,6 +34,9 @@ es:
kibana:
count: 1
#servicename: kibana.example.com
#nodeAffinity:
# key: node label name
# value: node label value
istio:
enabled: false
gateway: "istio-system/ingressgateway"
@ -86,10 +92,10 @@ fluentd:
resources:
requests:
cpu: 50m
cpu: 200m
memory: 256Mi
limits:
memory: 1024Mi
memory: 512Mi
output:
# Default should be "logging-kubezero-logging-es-http" if fullnameOverride is NOT used
@ -184,8 +190,8 @@ fluentd:
chunk_limit_size 8MB
total_limit_size 4GB
flush_mode interval
flush_thread_count 4
flush_interval 5s
flush_thread_count 2
flush_interval 10s
flush_at_shutdown true
retry_type exponential_backoff
retry_timeout 300m
@ -207,6 +213,13 @@ fluent-bit:
- key: node-role.kubernetes.io/master
effect: NoSchedule
resources:
requests:
cpu: 20m
memory: 16Mi
limits:
memory: 64Mi
config:
output:
host: logging-fluentd