Skip to content

Commit

Permalink
Merge pull request kubernetes#95753 from kisieland/logrotate-fix
Browse files Browse the repository at this point in the history
Fix default values for logrotate in /var/log/
  • Loading branch information
k8s-ci-robot authored Oct 21, 2020
2 parents 5a4c9af + 6c8b1ab commit e39bdd4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cluster/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ METADATA_CLOBBERS_CONFIG="${METADATA_CLOBBERS_CONFIG:-false}"
ENABLE_BIG_CLUSTER_SUBNETS="${ENABLE_BIG_CLUSTER_SUBNETS:-false}"

# Optional: Enable log rotation for k8s services
ENABLE_LOGROTATE_FILES="${ENABLE_LOGROTATE_FILES:-false}"
ENABLE_LOGROTATE_FILES="${ENABLE_LOGROTATE_FILES:-true}"
PROVIDER_VARS="${PROVIDER_VARS:-} ENABLE_LOGROTATE_FILES"
if [[ -n "${LOGROTATE_FILES_MAX_COUNT:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} LOGROTATE_FILES_MAX_COUNT"
Expand Down Expand Up @@ -525,7 +525,7 @@ export KONNECTIVITY_SERVICE_PROXY_PROTOCOL_MODE="${KUBE_KONNECTIVITY_SERVICE_PRO
# Optional: Enable Windows CSI-Proxy
export ENABLE_CSI_PROXY="${ENABLE_CSI_PROXY:-true}"

# ETCD_LISTEN_ON_HOST_IP decides whether etcd servers should also listen on host IP,
# ETCD_LISTEN_ON_HOST_IP decides whether etcd servers should also listen on host IP,
# in addition to listening to 127.0.0.1, and whether kube-apiserver should connect to etcd servers
# through host IP.
export ETCD_LISTEN_ON_HOST_IP="${ETCD_LISTEN_ON_HOST_IP:-false}"
4 changes: 2 additions & 2 deletions cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ ADVANCED_AUDIT_LOG_MODE=${ADVANCED_AUDIT_LOG_MODE:-batch} # batch, blocking
ENABLE_BIG_CLUSTER_SUBNETS=${ENABLE_BIG_CLUSTER_SUBNETS:-false}

# Optional: Enable log rotation for k8s services
ENABLE_LOGROTATE_FILES="${ENABLE_LOGROTATE_FILES:-false}"
ENABLE_LOGROTATE_FILES="${ENABLE_LOGROTATE_FILES:-true}"
PROVIDER_VARS="${PROVIDER_VARS:-} ENABLE_LOGROTATE_FILES"
if [[ -n "${LOGROTATE_FILES_MAX_COUNT:-}" ]]; then
PROVIDER_VARS="${PROVIDER_VARS:-} LOGROTATE_FILES_MAX_COUNT"
Expand Down Expand Up @@ -572,7 +572,7 @@ export GCE_UPLOAD_KUBCONFIG_TO_MASTER_METADATA=true
# Optoinal: Enable Windows CSI-Proxy
export ENABLE_CSI_PROXY="${ENABLE_CSI_PROXY:-true}"

# ETCD_LISTEN_ON_HOST_IP decides whether etcd servers should also listen on host IP,
# ETCD_LISTEN_ON_HOST_IP decides whether etcd servers should also listen on host IP,
# in addition to listening to 127.0.0.1, and whether kube-apiserver should connect to etcd servers
# through host IP.
export ETCD_LISTEN_ON_HOST_IP="${ETCD_LISTEN_ON_HOST_IP:-false}"
2 changes: 1 addition & 1 deletion cluster/gce/gci/configure-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ function ensure-local-ssds-ephemeral-storage() {
function setup-logrotate() {
mkdir -p /etc/logrotate.d/

if [[ "${ENABLE_LOGROTATE_FILES:-false}" = "true" ]]; then
if [[ "${ENABLE_LOGROTATE_FILES:-true}" = "true" ]]; then
# Configure log rotation for all logs in /var/log, which is where k8s services
# are configured to write their log files. Whenever logrotate is ran, this
# config will:
Expand Down

0 comments on commit e39bdd4

Please sign in to comment.