mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Removing conditional check
Addressing review comment. Removing conditional check for fluentd config file path.
This commit is contained in:
parent
a70a534736
commit
dd7430134a
@ -1525,15 +1525,12 @@ function Install-LoggingAgent {
|
|||||||
function Configure-LoggingAgent {
|
function Configure-LoggingAgent {
|
||||||
$fluentd_config_dir = "$STACKDRIVER_ROOT\LoggingAgent\config.d"
|
$fluentd_config_dir = "$STACKDRIVER_ROOT\LoggingAgent\config.d"
|
||||||
$fluentd_config_file = "$fluentd_config_dir\k8s_containers.conf"
|
$fluentd_config_file = "$fluentd_config_dir\k8s_containers.conf"
|
||||||
if (-not (ShouldWrite-File $fluentd_config_file)) {
|
|
||||||
Log-Output ("Skip: fluentd logging config $fluentd_config_file already " +
|
# Create a configuration file for kubernetes containers.
|
||||||
"exists")
|
# The config.d directory should have already been created automatically, but
|
||||||
} else {
|
# try creating again just in case.
|
||||||
# Create a configuration file for kubernetes containers.
|
New-Item $fluentd_config_dir -ItemType 'directory' -Force | Out-Null
|
||||||
# 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 = $FLUENTD_CONFIG.replace('NODE_NAME', (hostname))
|
||||||
$config | Out-File -FilePath $fluentd_config_file -Encoding ASCII
|
$config | Out-File -FilePath $fluentd_config_file -Encoding ASCII
|
||||||
Log-Output "Wrote fluentd logging config to $fluentd_config_file"
|
Log-Output "Wrote fluentd logging config to $fluentd_config_file"
|
||||||
|
Loading…
Reference in New Issue
Block a user