KubeZero/charts/kubezero-logging/fluentd.patch

126 lines
4.3 KiB
Diff
Raw Normal View History

diff -tubrN charts/fluentd/templates/files.conf/systemd.yaml charts/fluentd.zdt/templates/files.conf/systemd.yaml
--- charts/fluentd/templates/files.conf/systemd.yaml 2021-02-12 18:13:04.000000000 +0100
+++ charts/fluentd.zdt/templates/files.conf/systemd.yaml 1970-01-01 01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
- labels:
- {{- include "fluentd.labels" . | nindent 4 }}
- name: fluentd-systemd-conf
-data:
- systemd.conf: |-
- <source>
- @type systemd
- @id in_systemd_internal_kubernetes
- @label @KUBERNETES_SYSTEM
- matches [{"_SYSTEMD_UNIT":"kubelet.service"},{"_SYSTEMD_UNIT":"kube-apiserver.service"},{"_SYSTEMD_UNIT":"kube-controller-manager.service"},{"_SYSTEMD_UNIT":"kube-proxy.service"},{"_SYSTEMD_UNIT":"kube-scheduler.service"}]
- read_from_head true
- tag "internal-kubernetes.systemd"
- <storage>
- @type "local"
- persistent true
- path "/var/log/fluentd-journald-internal_kubernetes-cursor.json"
- </storage>
- <entry>
- fields_strip_underscores true
- field_map {"MESSAGE": "message", "_TRANSPORT": "stream", "_SYSTEMD_UNIT": "systemd_unit", "_HOSTNAME": "hostname"}
- field_map_strict true
- </entry>
- </source>
-
- <source>
- @type systemd
- @id in_systemd_etcd
- @label @KUBERNETES_SYSTEM
- matches [{"_SYSTEMD_UNIT":"etcd.service"}]
- read_from_head true
- tag "etcd.systemd"
- <storage>
- @type "local"
- persistent true
- path "/var/log/fluentd-journald-internal_etcd-cursor.json"
- </storage>
- <entry>
- fields_strip_underscores true
- field_map {"MESSAGE": "message", "_TRANSPORT": "stream", "_SYSTEMD_UNIT": "systemd_unit", "_HOSTNAME": "hostname"}
- field_map_strict true
- </entry>
- </source>
-
- <label @KUBERNETES_SYSTEM>
- <filter internal-kubernetes.systemd>
- @type parser
- key_name message
- <parse>
- @type regexp
- expression /^(?<level>[a-zA-Z])[0-9]* ([\d:.]+)\s+\d+ (?<file>[a-zA-Z-_.]+):(?<line>[\d]+)\]\s+(?<log>.*)$/
- </parse>
- reserve_data true
- reserve_time true
- </filter>
-
- <filter etcd.systemd>
- @type parser
- key_name message
- <parse>
- @type regexp
- expression /^([^ ]+\s[^ ]+) (?<level>[A-Z]) \| (?<component>[a-zA-Z-_.]+): (?<log>.*)$/
- </parse>
- reserve_data true
- reserve_time true
- </filter>
-
- <filter **>
- @type record_transformer
- enable_ruby
- <record>
- raw ${record["message"]}
- </record>
- remove_keys message
- </filter>
-
- <match **>
- @type relabel
- @label @DISPATCH
- </match>
- </label>
diff -tubrN charts/fluentd/templates/fluentd-configurations-cm.yaml charts/fluentd.zdt/templates/fluentd-configurations-cm.yaml
--- charts/fluentd/templates/fluentd-configurations-cm.yaml 2021-02-12 18:13:04.000000000 +0100
2021-03-10 09:34:17 +00:00
+++ charts/fluentd.zdt/templates/fluentd-configurations-cm.yaml 2021-03-09 17:54:34.904992401 +0100
@@ -7,7 +7,7 @@
data:
{{- range $key, $value := .Values.fileConfigs }}
{{$key }}: |-
- {{- $value | nindent 4 }}
+ {{- (tpl $value $) | nindent 4 }}
{{- end }}
---
diff -tubrN charts/fluentd/templates/tests/test-connection.yaml charts/fluentd.zdt/templates/tests/test-connection.yaml
--- charts/fluentd/templates/tests/test-connection.yaml 2021-02-12 18:13:04.000000000 +0100
2021-03-10 09:34:17 +00:00
+++ charts/fluentd.zdt/templates/tests/test-connection.yaml 2021-03-09 17:54:34.904992401 +0100
@@ -1,3 +1,4 @@
+{{- if .Values.testFramework.enabled }}
apiVersion: v1
kind: Pod
metadata:
@@ -13,3 +14,4 @@
command: ['wget']
args: ['{{ include "fluentd.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
+{{- end }}
diff -tubrN charts/fluentd/values.yaml charts/fluentd.zdt/values.yaml
--- charts/fluentd/values.yaml 2021-02-12 18:13:04.000000000 +0100
2021-03-10 09:34:17 +00:00
+++ charts/fluentd.zdt/values.yaml 2021-03-09 17:54:34.908325735 +0100
@@ -12,6 +12,9 @@
pullPolicy: "IfNotPresent"
tag: ""
+testFramework:
+ enabled: false
+
## Optional array of imagePullSecrets containing private registry credentials
## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: []