Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
skonto committed Jan 16, 2025
1 parent af531fc commit fc36b42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/activator/certificate/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (cr *CertCache) updateCertificate(secret *corev1.Secret) {
defer cr.certificatesMux.Unlock()

cert, err := tls.X509KeyPair(secret.Data[certificates.CertName], secret.Data[certificates.PrivateKeyName])
cr.logger.Infof("cert is: %v\n", secret.Data[certificates.CertName])
if err != nil {
cr.logger.Warnf("failed to parse certificate in secret %s/%s: %v", secret.Namespace, secret.Name, zap.Error(err))
return
Expand All @@ -123,6 +124,7 @@ func (cr *CertCache) updateCertificate(secret *corev1.Secret) {
func (cr *CertCache) updateTrustPool() {
pool := x509.NewCertPool()

cr.logger.Infof("Updating the pool")
cr.addSecretCAIfPresent(pool)
cr.addTrustBundles(pool)

Expand All @@ -137,6 +139,7 @@ func (cr *CertCache) updateTrustPool() {

func (cr *CertCache) addSecretCAIfPresent(pool *x509.CertPool) {
secret, err := cr.secretInformer.Lister().Secrets(system.Namespace()).Get(netcfg.ServingRoutingCertName)
cr.logger.Infof("Getting the secret")
if err != nil {
cr.logger.Warnf("Failed to get secret %s/%s: %v", system.Namespace(), netcfg.ServingRoutingCertName, zap.Error(err))
return
Expand Down

0 comments on commit fc36b42

Please sign in to comment.