Updating EndpointSliceMirroring controller to listen for Service changes

This fixes a bug that could occur if a custom Endpoints resource was
created before a Service was created.
This commit is contained in:
Rob Scott
2020-08-21 16:31:57 -07:00
parent 1c548c328a
commit 3c804502d7
4 changed files with 169 additions and 100 deletions

View File

@@ -156,6 +156,14 @@ func TestEndpointSliceMirroring(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{
Name: "test-123",
},
Subsets: []corev1.EndpointSubset{{
Ports: []corev1.EndpointPort{{
Port: 80,
}},
Addresses: []corev1.EndpointAddress{{
IP: "10.0.0.1",
}},
}},
},
expectEndpointSlice: false,
}}