Skip to content

Commit 06f15b3

Browse files
authored
Fixed 2 bugs where kafka intents & kafka server metadata were not reported properly to Otterize cloud
1 parent b9acbb2 commit 06f15b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/mapper/pkg/intentsstore/holder.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,14 @@ func (i *IntentsHolder) addIntentToStore(store IntentsStore, newTimestamp time.T
162162
existingIntent.Intent.Client.Labels = intent.Client.Labels
163163
existingIntent.Intent.Server.Labels = intent.Server.Labels
164164

165-
if existingIntent.Intent.Server.ResolutionData.TCPDestResolveFixData == nil || intent.Server.ResolutionData.TCPDestResolveFixData == nil {
165+
if (existingIntent.Intent.Server.ResolutionData != nil && existingIntent.Intent.Server.ResolutionData.TCPDestResolveFixData == nil) ||
166+
(intent.Server.ResolutionData != nil && intent.Server.ResolutionData.TCPDestResolveFixData == nil) {
166167
// One of the intents was not discovered using the bugfix, so we want to keep it that way.
167168
// This is important because we might drop some of the discovered intents using the bugfix in Otterize-cloud, based on
168169
// the fact they were discovered using the bugfix.
169-
existingIntent.Intent.Server.ResolutionData.TCPDestResolveFixData = nil
170+
if existingIntent.Intent.Server.ResolutionData != nil {
171+
existingIntent.Intent.Server.ResolutionData.TCPDestResolveFixData = nil
172+
}
170173
}
171174

172175
store[key] = existingIntent

src/mapper/pkg/metadatareporter/metadata_reporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (r *MetadataReporter) fetchServiceIPs(ctx context.Context, serviceIdentity
185185
}
186186

187187
for _, ip := range service.Spec.ClusterIPs {
188-
if ip != "" {
188+
if ip != "" && ip != "None" {
189189
serviceIps.Add(ip)
190190
}
191191
}

0 commit comments

Comments
 (0)