Skip to content

Commit

Permalink
Copy desired Service ports when reconciling
Browse files Browse the repository at this point in the history
  • Loading branch information
thib92 committed May 27, 2021
1 parent 2ba1557 commit c369568
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/collector/reconcile/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv
for k, v := range desired.ObjectMeta.Labels {
updated.ObjectMeta.Labels[k] = v
}
updated.Spec.Ports = desired.Spec.Ports

patch := client.MergeFrom(existing)

Expand Down
4 changes: 1 addition & 3 deletions pkg/collector/reconcile/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ func TestExpectedServices(t *testing.T) {
assert.NoError(t, err)
assert.True(t, exists)
assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID)
// issue# https://github.com/open-telemetry/opentelemetry-operator/issues/256
// Would uncomment once above issue is resolved
//assert.Contains(t, actual.Spec.Ports, extraPorts)
assert.Contains(t, actual.Spec.Ports, extraPorts)

})
}
Expand Down

0 comments on commit c369568

Please sign in to comment.