mirror of
https://gitlab.com/shouptech/flux.git
synced 2026-02-03 14:49:44 +00:00
118 lines
2.9 KiB
YAML
118 lines
2.9 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: fluentd
|
|
namespace: kube-system
|
|
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: fluentd
|
|
namespace: kube-system
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
- namespaces
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: fluentd
|
|
roleRef:
|
|
kind: ClusterRole
|
|
name: fluentd
|
|
apiGroup: rbac.authorization.k8s.io
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: fluentd
|
|
namespace: kube-system
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: fluentd
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: fluentd-logging
|
|
version: v1
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: fluentd-logging
|
|
version: v1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: fluentd-logging
|
|
version: v1
|
|
spec:
|
|
serviceAccount: fluentd
|
|
serviceAccountName: fluentd
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/master
|
|
effect: NoSchedule
|
|
containers:
|
|
- name: fluentd
|
|
image: fluent/fluentd-kubernetes-daemonset:v1-debian-elasticsearch
|
|
env:
|
|
- name: FLUENT_ELASTICSEARCH_HOST
|
|
value: "es01.home.shoup.io"
|
|
- name: FLUENT_ELASTICSEARCH_PORT
|
|
value: "9200"
|
|
- name: FLUENT_ELASTICSEARCH_SCHEME
|
|
value: "http"
|
|
# Option to configure elasticsearch plugin with self signed certs
|
|
# ================================================================
|
|
# - name: FLUENT_ELASTICSEARCH_SSL_VERIFY
|
|
# value: "true"
|
|
# Option to configure elasticsearch plugin with tls
|
|
# ================================================================
|
|
# - name: FLUENT_ELASTICSEARCH_SSL_VERSION
|
|
# value: "TLSv1_2"
|
|
# X-Pack Authentication
|
|
# =====================
|
|
# - name: FLUENT_ELASTICSEARCH_USER
|
|
# value: "elastic"
|
|
# - name: FLUENT_ELASTICSEARCH_PASSWORD
|
|
# value: "changeme"
|
|
|
|
# Disable SystemD input
|
|
- name: FLUENTD_SYSTEMD_CONF
|
|
value: "disable"
|
|
# Don't parse own logs
|
|
- name: FLUENT_CONTAINER_TAIL_EXCLUDE_PATH
|
|
value: '["/var/log/containers/fluentd*"]'
|
|
resources:
|
|
limits:
|
|
memory: 200Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 200Mi
|
|
volumeMounts:
|
|
- name: varlog
|
|
mountPath: /var/log
|
|
- name: varlogcontainers
|
|
mountPath: /var/log/containers
|
|
readOnly: true
|
|
- name: config-volume
|
|
mountPath: /fluentd/etc
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: varlog
|
|
hostPath:
|
|
path: /var/log
|
|
- name: varlogcontainers
|
|
hostPath:
|
|
path: /var/log/containers
|
|
- name: config-volume
|
|
configMap:
|
|
name: fluentd-logging
|