mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 14:45:28 +00:00
Get rid of ServiceSpec.ProxyPort
As far as I know, nobody uses it. It was replaced by PublicIPs. If I were being very polite I would leave it in internal, but since I am 99.99% sure nobody uses it, I am cutting it. Let's argue about it.
This commit is contained in:
@@ -229,10 +229,7 @@ func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
|
||||
}
|
||||
|
||||
// Copy over non-user fields
|
||||
// TODO: this should be a Status field, since the end user does not set it.
|
||||
// TODO: make this a merge function
|
||||
service.Spec.ProxyPort = oldService.Spec.ProxyPort
|
||||
|
||||
if errs := validation.ValidateServiceUpdate(oldService, service); len(errs) > 0 {
|
||||
return nil, errors.NewInvalid("service", service.Name, errs)
|
||||
}
|
||||
|
@@ -69,9 +69,6 @@ func TestServiceRegistryCreate(t *testing.T) {
|
||||
if created_service.Spec.PortalIP != "1.2.3.1" {
|
||||
t.Errorf("Unexpected PortalIP: %s", created_service.Spec.PortalIP)
|
||||
}
|
||||
if created_service.Spec.ProxyPort != 0 {
|
||||
t.Errorf("Unexpected ProxyPort: %d", created_service.Spec.ProxyPort)
|
||||
}
|
||||
if len(fakeCloud.Calls) != 0 {
|
||||
t.Errorf("Unexpected call(s): %#v", fakeCloud.Calls)
|
||||
}
|
||||
@@ -509,14 +506,10 @@ func TestServiceRegistryIPUpdate(t *testing.T) {
|
||||
if created_service.Spec.PortalIP != "1.2.3.1" {
|
||||
t.Errorf("Unexpected PortalIP: %s", created_service.Spec.PortalIP)
|
||||
}
|
||||
if created_service.Spec.ProxyPort != 0 {
|
||||
t.Errorf("Unexpected ProxyPort: %d", created_service.Spec.ProxyPort)
|
||||
}
|
||||
|
||||
update := new(api.Service)
|
||||
*update = *created_service
|
||||
update.Spec.Port = 6503
|
||||
update.Spec.ProxyPort = 309 // should be ignored
|
||||
|
||||
c, _ = rest.Update(ctx, update)
|
||||
updated_svc := <-c
|
||||
@@ -524,9 +517,6 @@ func TestServiceRegistryIPUpdate(t *testing.T) {
|
||||
if updated_service.Spec.Port != 6503 {
|
||||
t.Errorf("Expected port 6503, but got %v", updated_service.Spec.Port)
|
||||
}
|
||||
if updated_service.Spec.ProxyPort != 0 { // unchanged, despite trying
|
||||
t.Errorf("Unexpected ProxyPort: %d", updated_service.Spec.ProxyPort)
|
||||
}
|
||||
|
||||
*update = *created_service
|
||||
update.Spec.Port = 6503
|
||||
@@ -563,9 +553,6 @@ func TestServiceRegistryIPExternalLoadBalancer(t *testing.T) {
|
||||
if created_service.Spec.PortalIP != "1.2.3.1" {
|
||||
t.Errorf("Unexpected PortalIP: %s", created_service.Spec.PortalIP)
|
||||
}
|
||||
if created_service.Spec.ProxyPort != 0 {
|
||||
t.Errorf("Unexpected ProxyPort: %d", created_service.Spec.ProxyPort)
|
||||
}
|
||||
|
||||
update := new(api.Service)
|
||||
*update = *created_service
|
||||
|
Reference in New Issue
Block a user