fluentd-gcp.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # This config should be kept as similar as possible to the one at
  2. # cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml
  3. apiVersion: v1
  4. kind: Pod
  5. metadata:
  6. name: fluentd-cloud-logging
  7. namespace: kube-system
  8. labels:
  9. k8s-app: fluentd-logging
  10. spec:
  11. dnsPolicy: Default
  12. containers:
  13. - name: fluentd-cloud-logging
  14. image: gcr.io/google_containers/fluentd-gcp:1.21
  15. command:
  16. - '/bin/sh'
  17. - '-c'
  18. # This is pretty hacky, but ruby relies on libsystemd's native code, and
  19. # the ubuntu:16.04 libsystemd doesn't play nice with the journal on GCI
  20. # hosts. Work around the problem by copying in the host's libsystemd.
  21. - 'rm /lib/x86_64-linux-gnu/libsystemd* && cp /host/lib/libsystemd* /lib/x86_64-linux-gnu/ && /usr/sbin/google-fluentd -q -c /etc/google-fluentd/google-fluentd-journal.conf'
  22. resources:
  23. limits:
  24. memory: 200Mi
  25. requests:
  26. # Any change here should be accompanied by a proportional change in CPU
  27. # requests of other per-node add-ons (e.g. kube-proxy).
  28. cpu: 80m
  29. memory: 200Mi
  30. volumeMounts:
  31. - name: varlog
  32. mountPath: /var/log
  33. - name: varlibdockercontainers
  34. mountPath: /var/lib/docker/containers
  35. readOnly: true
  36. - name: journaldir
  37. mountPath: /var/log/journal
  38. - name: libsystemddir
  39. mountPath: /host/lib
  40. terminationGracePeriodSeconds: 30
  41. volumes:
  42. - name: varlog
  43. hostPath:
  44. path: /var/log
  45. - name: varlibdockercontainers
  46. hostPath:
  47. path: /var/lib/docker/containers
  48. - name: journaldir
  49. hostPath:
  50. path: /var/log/journal
  51. - name: libsystemddir
  52. hostPath:
  53. path: /usr/lib64