File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -84,14 +84,19 @@ function FetchAndImport-ModuleFromMetadata {
84
84
Import-Module - Force C:\$Filename
85
85
}
86
86
87
- # Returns true if the ENABLE_NODE_LOGGING field in kube_env is true.
87
+ # Returns true if the ENABLE_STACKDRIVER_WINDOWS or ENABLE_NODE_LOGGING field in kube_env is true.
88
88
# $KubeEnv is a hash table containing the kube-env metadata keys+values.
89
+ # ENABLE_NODE_LOGGING is used for legacy Stackdriver Logging, and will be deprecated (always set to False)
90
+ # soon. ENABLE_STACKDRIVER_WINDOWS is added to indicate whether logging is enabled for windows nodes.
89
91
function IsLoggingEnabled {
90
92
param (
91
93
[parameter (Mandatory = $true )] [hashtable ]$KubeEnv
92
94
)
93
95
94
- if ($KubeEnv.Contains (' ENABLE_NODE_LOGGING' ) -and `
96
+ if ($KubeEnv.Contains (' ENABLE_STACKDRIVER_WINDOWS' ) -and `
97
+ ($KubeEnv [' ENABLE_STACKDRIVER_WINDOWS' ] -eq ' true' )) {
98
+ return $true
99
+ } elseif ($KubeEnv.Contains (' ENABLE_NODE_LOGGING' ) -and `
95
100
($KubeEnv [' ENABLE_NODE_LOGGING' ] -eq ' true' )) {
96
101
return $true
97
102
}
You can’t perform that action at this time.
0 commit comments