Skip to content

Commit 22bdf3a

Browse files
Merge branch 'sanprabhu/cilium-node-subnet-intelligent-refresh' of github.com:Azure/azure-container-networking into sanprabhu/cilium-node-subnet-intelligent-refresh
2 parents 38c5047 + 2f323e6 commit 22bdf3a

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

cns/service.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/Azure/azure-container-networking/cns/logger"
1818
acn "github.com/Azure/azure-container-networking/common"
1919
"github.com/Azure/azure-container-networking/keyvault"
20-
"github.com/Azure/azure-container-networking/log"
2120
localtls "github.com/Azure/azure-container-networking/server/tls"
2221
"github.com/Azure/azure-container-networking/store"
2322
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
@@ -112,7 +111,7 @@ func (service *Service) AddListener(config *common.ServiceConfig) error {
112111
// Start the listener and HTTP and HTTPS server.
113112
tlsConfig, err := getTLSConfig(config.TLSSettings, config.ErrChan) //nolint
114113
if err != nil {
115-
log.Printf("Failed to compose Tls Configuration with error: %+v", err)
114+
logger.Printf("Failed to compose Tls Configuration with error: %+v", err)
116115
return errors.Wrap(err, "could not get tls config")
117116
}
118117

@@ -122,14 +121,14 @@ func (service *Service) AddListener(config *common.ServiceConfig) error {
122121
}
123122

124123
service.Listener = nodeListener
125-
log.Debugf("[Azure CNS] Successfully initialized a service with config: %+v", config)
124+
logger.Debugf("[Azure CNS] Successfully initialized a service with config: %+v", config)
126125

127126
return nil
128127
}
129128

130129
// Initialize initializes the service and starts the listener.
131130
func (service *Service) Initialize(config *common.ServiceConfig) error {
132-
log.Debugf("[Azure CNS] Going to initialize a service with config: %+v", config)
131+
logger.Debugf("[Azure CNS] Going to initialize a service with config: %+v", config)
133132

134133
// Initialize the base service.
135134
if err := service.Service.Initialize(config); err != nil {
@@ -281,11 +280,11 @@ func mtlsRootCAsFromCertificate(tlsCert *tls.Certificate) (*x509.CertPool, error
281280
}
282281

283282
func (service *Service) StartListener(config *common.ServiceConfig) error {
284-
log.Debugf("[Azure CNS] Going to start listener: %+v", config)
283+
logger.Debugf("[Azure CNS] Going to start listener: %+v", config)
285284

286285
// Initialize the listener.
287286
if service.Listener != nil {
288-
log.Debugf("[Azure CNS] Starting listener: %+v", config)
287+
logger.Debugf("[Azure CNS] Starting listener: %+v", config)
289288
// Start the listener.
290289
// continue to listen on the normal endpoint for http traffic, this will be supported
291290
// for sometime until partners migrate fully to https
@@ -315,5 +314,5 @@ func (service *Service) ParseOptions(options OptionMap) OptionMap {
315314
func (service *Service) SendErrorResponse(w http.ResponseWriter, errMsg error) {
316315
resp := errorResponse{errMsg.Error()}
317316
err := acn.Encode(w, &resp)
318-
log.Errorf("[%s] %+v %s.", service.Name, &resp, err.Error())
317+
logger.Errorf("[%s] %+v %s.", service.Name, &resp, err.Error())
319318
}

cns/service/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ func main() {
672672
}
673673

674674
if telemetryDaemonEnabled {
675-
log.Printf("CNI Telemtry is enabled")
675+
logger.Printf("CNI Telemtry is enabled")
676676
go startTelemetryService(rootCtx)
677677
}
678678

@@ -687,7 +687,7 @@ func main() {
687687

688688
lockclient, err := processlock.NewFileLock(platform.CNILockPath + name + store.LockExtension)
689689
if err != nil {
690-
log.Printf("Error initializing file lock:%v", err)
690+
logger.Printf("Error initializing file lock:%v", err)
691691
return
692692
}
693693

@@ -701,10 +701,10 @@ func main() {
701701

702702
// Initialize endpoint state store if cns is managing endpoint state.
703703
if cnsconfig.ManageEndpointState {
704-
log.Printf("[Azure CNS] Configured to manage endpoints state")
704+
logger.Printf("[Azure CNS] Configured to manage endpoints state")
705705
endpointStoreLock, err := processlock.NewFileLock(platform.CNILockPath + endpointStoreName + store.LockExtension) // nolint
706706
if err != nil {
707-
log.Printf("Error initializing endpoint state file lock:%v", err)
707+
logger.Printf("Error initializing endpoint state file lock:%v", err)
708708
return
709709
}
710710
defer endpointStoreLock.Unlock() // nolint
@@ -1039,7 +1039,7 @@ func main() {
10391039
}
10401040

10411041
if err = lockclient.Unlock(); err != nil {
1042-
log.Errorf("lockclient cns unlock error:%v", err)
1042+
logger.Errorf("lockclient cns unlock error:%v", err)
10431043
}
10441044

10451045
logger.Printf("CNS exited")

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ require (
9393
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
9494
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
9595
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
96-
github.com/prometheus/common v0.59.1
96+
github.com/prometheus/common v0.60.0
9797
github.com/prometheus/procfs v0.15.1 // indirect
9898
github.com/sirupsen/logrus v1.9.3
9999
github.com/spf13/afero v1.11.0 // indirect
@@ -107,7 +107,7 @@ require (
107107
go.uber.org/multierr v1.11.0 // indirect
108108
golang.org/x/crypto v0.27.0
109109
golang.org/x/net v0.29.0
110-
golang.org/x/oauth2 v0.22.0 // indirect
110+
golang.org/x/oauth2 v0.23.0 // indirect
111111
golang.org/x/term v0.24.0 // indirect
112112
golang.org/x/text v0.18.0 // indirect
113113
golang.org/x/time v0.6.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/j
231231
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
232232
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
233233
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
234-
github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0=
235-
github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0=
234+
github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA=
235+
github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
236236
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
237237
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
238238
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
@@ -318,8 +318,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
318318
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
319319
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
320320
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
321-
golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
322-
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
321+
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
322+
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
323323
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
324324
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
325325
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

0 commit comments

Comments
 (0)