diff --git a/pkg/controller/direct/maputils.go b/pkg/controller/direct/maputils.go index 34ba5a03f5..841529bbc1 100644 --- a/pkg/controller/direct/maputils.go +++ b/pkg/controller/direct/maputils.go @@ -167,11 +167,17 @@ func EnumSlice_FromProto[U ProtoEnum](mapCtx *MapContext, in []U) []string { func LazyPtr[V comparable](v V) *V { var defaultV V if v == defaultV { + // Special handling for booleans + if b, ok := any(v).(bool); ok && !b { + // Return a pointer to a false boolean instead of nil + //val := false + return &v + } + // For all other zero-value types, return nil return nil } return &v } - func StringTimestamp_FromProto(mapCtx *MapContext, ts *timestamppb.Timestamp) *string { if ts == nil { return nil