diff --git a/cluster/gce/windows/k8s-node-setup.psm1 b/cluster/gce/windows/k8s-node-setup.psm1 index 45ad6376d9a..3c352c5cf47 100644 --- a/cluster/gce/windows/k8s-node-setup.psm1 +++ b/cluster/gce/windows/k8s-node-setup.psm1 @@ -1528,13 +1528,12 @@ function Configure-LoggingAgent { if (-not (ShouldWrite-File $fluentd_config_file)) { Log-Output ("Skip: fluentd logging config $fluentd_config_file already " + "exists") - return + } else { + # Create a configuration file for kubernetes containers. + # The config.d directory should have already been created automatically, but + # try creating again just in case. + New-Item $fluentd_config_dir -ItemType 'directory' -Force | Out-Null } - - # Create a configuration file for kubernetes containers. - # The config.d directory should have already been created automatically, but - # try creating again just in case. - New-Item $fluentd_config_dir -ItemType 'directory' -Force | Out-Null $config = $FLUENTD_CONFIG.replace('NODE_NAME', (hostname)) $config | Out-File -FilePath $fluentd_config_file -Encoding ASCII Log-Output "Wrote fluentd logging config to $fluentd_config_file"