Skip to content

Commit 4ae1b14

Browse files
committed
review: address review comments (to be squashed before merging)
1 parent 15eee24 commit 4ae1b14

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/resourcebuilder/core.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,18 @@ func (b *builder) modifyConfigMap(ctx context.Context, cm *corev1.ConfigMap) err
5353
// Parse YAML into RNode to preserve formatting and field order
5454
rnode, err := yaml.Parse(value)
5555
if err != nil {
56+
klog.V(4).Infof("ConfigMap's %q entry parsing failed: %v", key, err)
5657
// Not valid YAML, skip this entry
5758
continue
5859
}
5960

6061
// Check if this is a GenericOperatorConfig by checking the kind field
6162
kind, err := rnode.GetString("kind")
62-
if err != nil || kind != "GenericOperatorConfig" {
63+
if err != nil {
64+
klog.V(4).Infof("ConfigMap's %q kind accessing failed: %v", key, err)
65+
continue
66+
}
67+
if kind != "GenericOperatorConfig" {
6368
// Not a GenericOperatorConfig, skip this entry
6469
continue
6570
}
@@ -111,7 +116,7 @@ func (b *builder) observeTLSConfiguration(ctx context.Context, cm *corev1.Config
111116
recorder := events.NewInMemoryRecorder("configmap-tls-injection", clock.RealClock{})
112117

113118
// Call ObserveTLSSecurityProfile to get TLS configuration
114-
observedConfig, errs := apiserver.ObserveTLSSecurityProfile(listers, recorder, map[string]interface{}{})
119+
observedConfig, errs := apiserver.ObserveTLSSecurityProfile(listers, recorder, map[string]any{})
115120
if len(errs) > 0 {
116121
// Log errors but continue - ObserveTLSSecurityProfile is tolerant of missing config
117122
for _, err := range errs {

0 commit comments

Comments
 (0)