Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable file persistence by default #816

Merged
merged 2 commits into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deploy/helm/sumologic/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ A Collector with the name {{ .Values.sumologic.collectorName | default (include
Check the release status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "release={{ .Release.Name }}"

{{- if eq .Values.fluentd.persistence.enabled false }}
WARNING: File persistence for fluentd is disabled. This might lead to loss of data in case of memory buffer overflow. We recommend turning this property on for production environments.
{{- end }}
2 changes: 1 addition & 1 deletion deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ fluentd:
## Persist data to a persistent volume; When enabled, fluentd uses the file buffer instead of memory buffer.
persistence:
## After setting the value to true, run the helm upgrade command with the --force flag.
enabled: false
enabled: true

## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
Expand Down
75 changes: 61 additions & 14 deletions deploy/kubernetes/fluentd-sumologic.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ data:
@log_level error
@include logs.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/logs.containers
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -183,7 +184,8 @@ data:
sumo_client "k8s_1.1.0"
@include logs.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/logs.default
@include buffer.output.conf
</buffer>
</store>
Expand Down Expand Up @@ -215,7 +217,8 @@ data:
sumo_client "k8s_1.1.0"
@include logs.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/logs.kubelet
@include buffer.output.conf
</buffer>
</store>
Expand Down Expand Up @@ -252,7 +255,8 @@ data:
sumo_client "k8s_1.1.0"
@include logs.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/logs.systemd
@include buffer.output.conf
</buffer>
</store>
Expand Down Expand Up @@ -307,7 +311,8 @@ data:
verify_ssl "true"
proxy_uri ""
<buffer>
@type memory
@type file
path /fluentd/buffer/events
@include buffer.output.conf
</buffer>
</store>
Expand Down Expand Up @@ -425,7 +430,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_APISERVER_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.apiserver
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -440,7 +446,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_KUBELET_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.container
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -455,7 +462,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_CONTROL_PLANE_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.control_plane
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -470,7 +478,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_CONTROLLER_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.controller
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -485,7 +494,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_KUBELET_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.kubelet
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -500,7 +510,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_NODE_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.node
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -515,7 +526,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_SCHEDULER_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.scheduler
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -530,7 +542,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_STATE_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.state
@include buffer.output.conf
</buffer>
</store>
Expand All @@ -545,7 +558,8 @@ data:
endpoint "#{ENV['SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE']}"
@include metrics.output.conf
<buffer>
@type memory
@type file
path /fluentd/buffer/metrics.default
@include buffer.output.conf
</buffer>
</store>
Expand Down Expand Up @@ -805,6 +819,8 @@ spec:
mountPath: /fluentd/etc/
- name: pos-files
mountPath: /mnt/pos/
- name: buffer
mountPath: "/fluentd/buffer"
livenessProbe:
httpGet:
path: /fluentd.pod.healthcheck?json=%7B%22log%22%3A+%22health+check%22%7D
Expand All @@ -824,6 +840,15 @@ spec:
secretKeyRef:
name: sumologic
key: endpoint-events
volumeClaimTemplates:
- metadata:
name: buffer
spec:
accessModes: [ReadWriteOnce]
storageClassName:
resources:
requests:
storage: 10Gi
---
# Source: sumologic/templates/metrics-statefulset.yaml

Expand Down Expand Up @@ -909,6 +934,8 @@ spec:
mountPath: /fluentd/etc/
- name: pos-files
mountPath: /mnt/pos/
- name: buffer
mountPath: "/fluentd/buffer"
env:
- name: SUMO_ENDPOINT_APISERVER_METRICS_SOURCE
valueFrom:
Expand Down Expand Up @@ -952,6 +979,15 @@ spec:
key: endpoint-metrics-kube-state
- name: ADDITIONAL_PLUGINS
value: ""
volumeClaimTemplates:
- metadata:
name: buffer
spec:
accessModes: [ReadWriteOnce]
storageClassName:
resources:
requests:
storage: 10Gi

---
# Source: sumologic/templates/statefulset.yaml
Expand Down Expand Up @@ -1038,6 +1074,8 @@ spec:
mountPath: /fluentd/etc/
- name: pos-files
mountPath: /mnt/pos/
- name: buffer
mountPath: "/fluentd/buffer"
env:
- name: SUMO_ENDPOINT_DEFAULT_LOGS_SOURCE
valueFrom:
Expand All @@ -1046,6 +1084,15 @@ spec:
key: endpoint-logs
- name: ADDITIONAL_PLUGINS
value: ""
volumeClaimTemplates:
- metadata:
name: buffer
spec:
accessModes: [ReadWriteOnce]
storageClassName:
resources:
requests:
storage: 10Gi

---
# Source: sumologic/templates/hpa.yaml
Expand Down