Skip to content

Commit 67124b8

Browse files
authored
Add logging to record CNI_COMMAND value (#676)
* Add logging to record CNI_COMMAND value * Addressed commands
1 parent 251e820 commit 67124b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cni/network/plugin/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ func main() {
225225
panic("network plugin start fatal error")
226226
}
227227

228+
// Check CNI_COMMAND value for logging purposes.
229+
cniCmd := os.Getenv(cni.Cmd)
230+
log.Printf("CNI_COMMAND environment variable set to %s", cniCmd)
231+
228232
handled, err := handleIfCniUpdate(netPlugin.Update)
229233
if handled == true {
230234
log.Printf("CNI UPDATE finished.")

0 commit comments

Comments
 (0)