From d8da1baf484deb63f58b8b960b8777fd94e17011 Mon Sep 17 00:00:00 2001 From: Ling Huang Date: Thu, 20 Sep 2018 23:24:24 -0400 Subject: [PATCH] Enable insertId generation, update Stackdriver Logging Agent image to 0.5-1.5.36-1-k8s and add priorityClassName for Metadata Agent. --- cluster/addons/fluentd-gcp/fluentd-gcp-configmap.yaml | 6 ++++++ cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml | 7 ------- .../addons/metadata-agent/stackdriver/metadata-agent.yaml | 2 ++ cluster/gce/config-default.sh | 2 +- cluster/gce/config-test.sh | 2 +- cluster/gce/gci/configure-helper.sh | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-configmap.yaml b/cluster/addons/fluentd-gcp/fluentd-gcp-configmap.yaml index ab31e995ea..f35eab968c 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-configmap.yaml +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-configmap.yaml @@ -374,6 +374,12 @@ data: @type null + # Add a unique insertId to each log entry that doesn't already have it. + # This helps guarantee the order and prevent log duplication. + + @type add_insert_ids + + # This section is exclusive for k8s_container logs. These logs come with # 'stderr'/'stdout' tags. # We use a separate output stanza for 'k8s_node' logs with a smaller buffer diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml b/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml index b02bacae97..ff5fed2638 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml @@ -100,13 +100,6 @@ spec: # END_PROMETHEUS_TO_SD nodeSelector: beta.kubernetes.io/fluentd-ds-ready: "true" - tolerations: - - key: "node.alpha.kubernetes.io/ismaster" - effect: "NoSchedule" - - operator: "Exists" - effect: "NoExecute" - - operator: "Exists" - effect: "NoSchedule" terminationGracePeriodSeconds: 60 volumes: - name: varlog diff --git a/cluster/addons/metadata-agent/stackdriver/metadata-agent.yaml b/cluster/addons/metadata-agent/stackdriver/metadata-agent.yaml index d02362cb03..73a4fdbc4a 100644 --- a/cluster/addons/metadata-agent/stackdriver/metadata-agent.yaml +++ b/cluster/addons/metadata-agent/stackdriver/metadata-agent.yaml @@ -28,6 +28,7 @@ spec: seccomp.security.alpha.kubernetes.io/pod: 'docker/default' spec: serviceAccountName: metadata-agent + priorityClassName: system-node-critical containers: - image: gcr.io/stackdriver-agents/stackdriver-metadata-agent:0.2-0.0.21-1 imagePullPolicy: IfNotPresent @@ -84,6 +85,7 @@ spec: seccomp.security.alpha.kubernetes.io/pod: 'docker/default' spec: serviceAccountName: metadata-agent + priorityClassName: system-cluster-critical containers: - image: gcr.io/stackdriver-agents/stackdriver-metadata-agent:0.2-0.0.21-1 imagePullPolicy: IfNotPresent diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 867fc1c86e..a68c5dab5e 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -404,7 +404,7 @@ fi # Fluentd requirements # YAML exists to trigger a configuration refresh when changes are made. FLUENTD_GCP_YAML_VERSION="v3.1.0" -FLUENTD_GCP_VERSION="${FLUENTD_GCP_VERSION:-0.2-1.5.30-1-k8s}" +FLUENTD_GCP_VERSION="${FLUENTD_GCP_VERSION:-0.5-1.5.36-1-k8s}" FLUENTD_GCP_MEMORY_LIMIT="${FLUENTD_GCP_MEMORY_LIMIT:-}" FLUENTD_GCP_CPU_REQUEST="${FLUENTD_GCP_CPU_REQUEST:-}" FLUENTD_GCP_MEMORY_REQUEST="${FLUENTD_GCP_MEMORY_REQUEST:-}" diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 4766afa570..55cd198c7c 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -416,7 +416,7 @@ fi # Fluentd requirements # YAML exists to trigger a configuration refresh when changes are made. FLUENTD_GCP_YAML_VERSION="v3.1.0" -FLUENTD_GCP_VERSION="${FLUENTD_GCP_VERSION:-0.2-1.5.30-1-k8s}" +FLUENTD_GCP_VERSION="${FLUENTD_GCP_VERSION:-0.5-1.5.36-1-k8s}" FLUENTD_GCP_MEMORY_LIMIT="${FLUENTD_GCP_MEMORY_LIMIT:-}" FLUENTD_GCP_CPU_REQUEST="${FLUENTD_GCP_CPU_REQUEST:-}" FLUENTD_GCP_MEMORY_REQUEST="${FLUENTD_GCP_MEMORY_REQUEST:-}" diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 6d9eeba628..b9ea37c6d9 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -2286,7 +2286,7 @@ function setup-fluentd { fluentd_gcp_yaml_version="${FLUENTD_GCP_YAML_VERSION:-v3.1.0}" sed -i -e "s@{{ fluentd_gcp_yaml_version }}@${fluentd_gcp_yaml_version}@g" "${fluentd_gcp_yaml}" sed -i -e "s@{{ fluentd_gcp_yaml_version }}@${fluentd_gcp_yaml_version}@g" "${fluentd_gcp_scaler_yaml}" - fluentd_gcp_version="${FLUENTD_GCP_VERSION:-0.3-1.5.34-1-k8s-1}" + fluentd_gcp_version="${FLUENTD_GCP_VERSION:-0.5-1.5.36-1-k8s}" sed -i -e "s@{{ fluentd_gcp_version }}@${fluentd_gcp_version}@g" "${fluentd_gcp_yaml}" update-daemon-set-prometheus-to-sd-parameters ${fluentd_gcp_yaml} start-fluentd-resource-update ${fluentd_gcp_yaml}