Migrated fluentd to daemon set
This commit is contained in:
@@ -13,8 +13,6 @@ Config | GCE | Vagrant | AWS | Az
|
||||
[debian-auto-upgrades](debian-auto-upgrades/) | M n | M n | M n | M n
|
||||
[docker](docker/) | M n | M n | M n | M n
|
||||
[etcd](etcd/) | M | M | M | M
|
||||
[fluentd-es](fluentd-es/) (pillar conditional) | M n | M n | M n | M n
|
||||
[fluentd-gcp](fluentd-gcp/) (pillar conditional) | M n | M n | M n | M n
|
||||
[generate-cert](generate-cert/) | M | M | M | M
|
||||
[kube-addons](kube-addons/) | M | M | M | M
|
||||
[kube-apiserver](kube-apiserver/) | M | M | M | M
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: fluentd-elasticsearch
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: fluentd-logging
|
||||
spec:
|
||||
containers:
|
||||
- name: fluentd-elasticsearch
|
||||
image: gcr.io/google_containers/fluentd-elasticsearch:1.20
|
||||
command:
|
||||
- '/bin/sh'
|
||||
- '-c'
|
||||
- '/usr/sbin/td-agent 2>&1 >>/var/log/fluentd.log'
|
||||
resources:
|
||||
limits:
|
||||
memory: 200Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 200Mi
|
||||
volumeMounts:
|
||||
- name: varlog
|
||||
mountPath: /var/log
|
||||
- name: varlibdockercontainers
|
||||
mountPath: /var/lib/docker/containers
|
||||
readOnly: true
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- name: varlog
|
||||
hostPath:
|
||||
path: /var/log
|
||||
- name: varlibdockercontainers
|
||||
hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{% if grains['roles'][0] != 'kubernetes-master' -%}
|
||||
/etc/kubernetes/manifests/fluentd-es.yaml:
|
||||
file.managed:
|
||||
- source: salt://fluentd-es/fluentd-es.yaml
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 644
|
||||
- makedirs: true
|
||||
- dir_mode: 755
|
||||
{% endif %}
|
||||
@@ -1,5 +1,4 @@
|
||||
# This config should be kept as similar as possible to the one at
|
||||
# cluster/saltbase/salt/fluentd-gcp-gci/fluentd-gcp-gci.yaml
|
||||
# please keep this file synchronized with cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% if grains.kubelet_api_servers is not defined -%}
|
||||
/etc/kubernetes/manifests/fluentd-gcp.yaml:
|
||||
file.managed:
|
||||
- source: salt://fluentd-gcp/fluentd-gcp.yaml
|
||||
@@ -6,3 +7,4 @@
|
||||
- mode: 644
|
||||
- makedirs: true
|
||||
- dir_mode: 755
|
||||
{% endif %}
|
||||
@@ -138,11 +138,11 @@ addon-dir-create:
|
||||
{% endif %}
|
||||
|
||||
{% if pillar.get('enable_node_logging', '').lower() == 'true'
|
||||
and pillar.get('logging_destination', '').lower() == 'elasticsearch'
|
||||
and 'logging_destination' in pillar
|
||||
and pillar.get('enable_cluster_logging', '').lower() == 'true' %}
|
||||
/etc/kubernetes/addons/fluentd-elasticsearch:
|
||||
/etc/kubernetes/addons/fluentd-{{ pillar.get('logging_destination') }}:
|
||||
file.recurse:
|
||||
- source: salt://kube-addons/fluentd-elasticsearch
|
||||
- source: salt://kube-addons/fluentd-{{ pillar.get('logging_destination') }}
|
||||
- include_pat: E@^.+\.yaml$
|
||||
- user: root
|
||||
- group: root
|
||||
|
||||
@@ -32,13 +32,6 @@ base:
|
||||
{% else %}
|
||||
- kube-proxy
|
||||
{% endif %}
|
||||
{% if pillar.get('enable_node_logging', '').lower() == 'true' and pillar['logging_destination'] is defined %}
|
||||
{% if pillar['logging_destination'] == 'elasticsearch' %}
|
||||
- fluentd-es
|
||||
{% elif pillar['logging_destination'] == 'gcp' %}
|
||||
- fluentd-gcp
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if pillar.get('enable_cluster_registry', '').lower() == 'true' %}
|
||||
- kube-registry-proxy
|
||||
{% endif %}
|
||||
@@ -70,12 +63,8 @@ base:
|
||||
- kube-client-tools
|
||||
- kube-master-addons
|
||||
- kube-admission-controls
|
||||
{% if pillar.get('enable_node_logging', '').lower() == 'true' and pillar['logging_destination'] is defined %}
|
||||
{% if pillar['logging_destination'] == 'elasticsearch' %}
|
||||
- fluentd-es
|
||||
{% elif pillar['logging_destination'] == 'gcp' %}
|
||||
{% if pillar.get('enable_node_logging', '').lower() == 'true' and pillar['logging_destination'] == 'gcp' %}
|
||||
- fluentd-gcp
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if grains['cloud'] is defined and grains['cloud'] != 'vagrant' %}
|
||||
- logrotate
|
||||
|
||||
Reference in New Issue
Block a user