mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Run fluentd on the master node by default.
This involves adding the logging-write scope to the master when running on GCE.
This commit is contained in:
parent
8855371763
commit
e5ea6ae854
@ -123,7 +123,7 @@ function create-master-instance {
|
|||||||
--image "${MASTER_IMAGE}" \
|
--image "${MASTER_IMAGE}" \
|
||||||
--tags "${MASTER_TAG}" \
|
--tags "${MASTER_TAG}" \
|
||||||
--network "${NETWORK}" \
|
--network "${NETWORK}" \
|
||||||
--scopes "storage-ro,compute-rw" \
|
--scopes "storage-ro,compute-rw,logging-write" \
|
||||||
--can-ip-forward \
|
--can-ip-forward \
|
||||||
--metadata-from-file \
|
--metadata-from-file \
|
||||||
"startup-script=${KUBE_ROOT}/cluster/gce/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml" \
|
"startup-script=${KUBE_ROOT}/cluster/gce/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml" \
|
||||||
|
@ -105,7 +105,7 @@ function create-master-instance {
|
|||||||
--image "${MASTER_IMAGE}" \
|
--image "${MASTER_IMAGE}" \
|
||||||
--tags "${MASTER_TAG}" \
|
--tags "${MASTER_TAG}" \
|
||||||
--network "${NETWORK}" \
|
--network "${NETWORK}" \
|
||||||
--scopes "storage-ro,compute-rw" \
|
--scopes "storage-ro,compute-rw,logging-write" \
|
||||||
--can-ip-forward \
|
--can-ip-forward \
|
||||||
--metadata-from-file \
|
--metadata-from-file \
|
||||||
"startup-script=${KUBE_ROOT}/cluster/gce/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml" \
|
"startup-script=${KUBE_ROOT}/cluster/gce/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml" \
|
||||||
|
@ -5,7 +5,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: fluentd-elasticsearch
|
- name: fluentd-elasticsearch
|
||||||
image: gcr.io/google_containers/fluentd-elasticsearch:1.5
|
image: gcr.io/google_containers/fluentd-elasticsearch:1.6
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
|
@ -5,7 +5,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: fluentd-cloud-logging
|
- name: fluentd-cloud-logging
|
||||||
image: gcr.io/google_containers/fluentd-gcp:1.7
|
image: gcr.io/google_containers/fluentd-gcp:1.8
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
|
@ -38,6 +38,13 @@ base:
|
|||||||
- kube-client-tools
|
- kube-client-tools
|
||||||
- kube-master-addons
|
- kube-master-addons
|
||||||
- kube-admission-controls
|
- 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' %}
|
||||||
|
- fluentd-gcp
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% if grains['cloud'] is defined and grains['cloud'] != 'vagrant' %}
|
{% if grains['cloud'] is defined and grains['cloud'] != 'vagrant' %}
|
||||||
- logrotate
|
- logrotate
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user