Skip to content

Commit a6f41a4

Browse files
authored
Merge pull request kubernetes#85827 from barney-s/fix-windows-fluentd-config-hostname
Replace the hostname in the fluentd config file even if the file exists
2 parents d47e136 + dd74301 commit a6f41a4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,16 +1604,12 @@ function Install-LoggingAgent {
16041604
function Configure-LoggingAgent {
16051605
$fluentd_config_dir = "$STACKDRIVER_ROOT\LoggingAgent\config.d"
16061606
$fluentd_config_file = "$fluentd_config_dir\k8s_containers.conf"
1607-
if (-not (ShouldWrite-File $fluentd_config_file)) {
1608-
Log-Output ("Skip: fluentd logging config $fluentd_config_file already " +
1609-
"exists")
1610-
return
1611-
}
1612-
1607+
16131608
# Create a configuration file for kubernetes containers.
16141609
# The config.d directory should have already been created automatically, but
16151610
# try creating again just in case.
16161611
New-Item $fluentd_config_dir -ItemType 'directory' -Force | Out-Null
1612+
16171613
$config = $FLUENTD_CONFIG.replace('NODE_NAME', (hostname))
16181614
$config | Out-File -FilePath $fluentd_config_file -Encoding ASCII
16191615
Log-Output "Wrote fluentd logging config to $fluentd_config_file"

0 commit comments

Comments
 (0)