7
7
"fmt"
8
8
"io"
9
9
"io/ioutil"
10
- "log"
11
10
"net/http"
12
11
_ "net/http/pprof"
13
12
"net/url"
@@ -302,7 +301,7 @@ func getConfiguration() (Config, client.Client) {
302
301
if venConnMode && InstallNS == "" {
303
302
InstallNS , err = getInClusterNamespace ()
304
303
if err != nil {
305
- log .Fatalf ("could not guess which namespace the agent is running in: %s" , err )
304
+ logs . Log .Fatalf ("could not guess which namespace the agent is running in: %s" , err )
306
305
}
307
306
}
308
307
if venConnMode && VenConnNS == "" {
@@ -323,15 +322,15 @@ func getConfiguration() (Config, client.Client) {
323
322
// the --venafi-connection mode of authentication doesn't need any
324
323
// secrets (or any other information for that matter) to be loaded from
325
324
// disk (using --credentials-path). Everything is passed as flags.
326
- log .Println ("Venafi Connection mode was specified, using Venafi Connection authentication." )
325
+ logs . Log .Println ("Venafi Connection mode was specified, using Venafi Connection authentication." )
327
326
328
327
// The venafi-cloud.upload_path was initially meant to let users
329
328
// configure HTTP proxies, but it has never been used since HTTP proxies
330
329
// don't rewrite paths. Thus, we've disabled the ability to change this
331
330
// value with the new --venafi-connection flag, and this field is simply
332
331
// ignored.
333
332
if config .VenafiCloud != nil && config .VenafiCloud .UploadPath != "" {
334
- log .Printf (`ignoring venafi-cloud.upload_path. In Venafi Connection mode, this field is not needed.` )
333
+ logs . Log .Printf (`ignoring venafi-cloud.upload_path. In Venafi Connection mode, this field is not needed.` )
335
334
}
336
335
337
336
// Regarding venafi-cloud.uploader_id, we found that it doesn't do
@@ -340,12 +339,12 @@ func getConfiguration() (Config, client.Client) {
340
339
// set in the config file, and set it to an arbitrary value in the
341
340
// client since it doesn't matter.
342
341
if config .VenafiCloud .UploaderID != "" {
343
- log .Printf (`ignoring venafi-cloud.uploader_id. In Venafi Connection mode, this field is not needed.` )
342
+ logs . Log .Printf (`ignoring venafi-cloud.uploader_id. In Venafi Connection mode, this field is not needed.` )
344
343
}
345
344
346
345
cfg , err := loadRESTConfig ("" )
347
346
if err != nil {
348
- log .Fatalf ("failed to load kubeconfig: %v" , err )
347
+ logs . Log .Fatalf ("failed to load kubeconfig: %v" , err )
349
348
}
350
349
351
350
preflightClient , err = client .NewVenConnClient (cfg , agentMetadata , InstallNS , VenConnName , VenConnNS , nil )
0 commit comments