Skip to content

Commit

Permalink
Fix knative-extensions#626 Do no affect Redis Config nor TLS Config i…
Browse files Browse the repository at this point in the history
…f they are nil
  • Loading branch information
tdeverdiere committed Oct 21, 2024
1 parent 4fd4e47 commit 8f2077b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions pkg/sink/reconciler/streamsink/streamsink.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ func (r *Reconciler) updateTLSSecret(ctx context.Context, secret *corev1.Secret)
tlsSecret, err := GetTLSSecret(secret.Data)
if err != nil {
logging.FromContext(ctx).Errorw("Error reading TLS configuration", zap.Error(err))
} else {
// For now just override the previous config.
r.tlsCert = tlsSecret.TLSCertificate
}
// For now just override the previous config.
r.tlsCert = tlsSecret.TLSCertificate
}
12 changes: 7 additions & 5 deletions pkg/source/reconciler/streamsource/streamsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,18 @@ func (r *Reconciler) updateRedisConfig(ctx context.Context, configMap *corev1.Co
redisConfig, err := GetRedisConfig(configMap.Data)
if err != nil {
logging.FromContext(ctx).Errorw("Error reading Redis configuration", zap.Error(err))
}
// For now just override the previous config.
r.numConsumers = redisConfig.NumConsumers
} else {
// For now just override the previous config.
r.numConsumers = redisConfig.NumConsumers
}
}

func (r *Reconciler) updateTLSSecret(ctx context.Context, secret *corev1.Secret) {
tlsSecret, err := GetTLSSecret(secret.Data)
if err != nil {
logging.FromContext(ctx).Errorw("Error reading TLS configuration", zap.Error(err))
} else {
// For now just override the previous config.
r.tlsCert = tlsSecret.TLSCertificate
}
// For now just override the previous config.
r.tlsCert = tlsSecret.TLSCertificate
}

0 comments on commit 8f2077b

Please sign in to comment.