Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix midstream patches #1089

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions openshift/patches/004-grpc.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/test/e2e/grpc_test.go b/test/e2e/grpc_test.go
index cab0aa22d..ee64c3b29 100644
index 270fd32c8..f3974a03e 100644
--- a/test/e2e/grpc_test.go
+++ b/test/e2e/grpc_test.go
@@ -34,7 +34,6 @@ import (
Expand Down Expand Up @@ -31,9 +31,9 @@ index cab0aa22d..ee64c3b29 100644
- creds = credentials.NewTLS(tlsConfig)
- }

return grpc.Dial(
return grpc.NewClient(
host,
@@ -324,11 +314,6 @@ func streamTest(tc *TestContext, host, domain string) {
@@ -319,11 +309,6 @@ func streamTest(tc *TestContext, host, domain string) {

func testGRPC(t *testing.T, f grpcTest, fopts ...rtesting.ServiceOption) {
t.Helper()
Expand All @@ -45,7 +45,7 @@ index cab0aa22d..ee64c3b29 100644

// Setup
clients := Setup(t)
@@ -369,16 +354,13 @@ func testGRPC(t *testing.T, f grpcTest, fopts ...rtesting.ServiceOption) {
@@ -364,16 +349,12 @@ func testGRPC(t *testing.T, f grpcTest, fopts ...rtesting.ServiceOption) {
}

host := url.Host
Expand All @@ -60,7 +60,6 @@ index cab0aa22d..ee64c3b29 100644
- } else {
- host = net.JoinHostPort(addr, mapper("80"))
- }
+
+ host = net.JoinHostPort(addr, mapper("80"))
}

Expand Down
36 changes: 16 additions & 20 deletions openshift/patches/012-revert-app-protocol.patch
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ index 5967cf2cd..2a19da758 100644
}},
}
diff --git a/pkg/reconciler/route/resources/service_test.go b/pkg/reconciler/route/resources/service_test.go
index 36de58b19..1664fb466 100644
index 829dfe914..b6c4f6cb7 100644
--- a/pkg/reconciler/route/resources/service_test.go
+++ b/pkg/reconciler/route/resources/service_test.go
@@ -54,10 +54,9 @@ var (
}

expectedPorts = []corev1.ServicePort{{
- Name: netapi.ServicePortNameH2C,
- AppProtocol: &netapi.AppProtocolH2C,
Expand All @@ -59,7 +59,7 @@ index 36de58b19..1664fb466 100644
+ TargetPort: intstr.FromInt(80),
}}
)

@@ -124,9 +123,8 @@ func TestMakeK8SService(t *testing.T) {
IP: "some-ip",
}},
Expand Down Expand Up @@ -97,28 +97,24 @@ index 36de58b19..1664fb466 100644
+ TargetPort: intstr.FromInt(80),
}},
}

diff --git a/pkg/reconciler/serverlessservice/resources/services.go b/pkg/reconciler/serverlessservice/resources/services.go
index 5672fc12e..7ad61ad67 100644
index 3292a9b88..d65f3057b 100644
--- a/pkg/reconciler/serverlessservice/resources/services.go
+++ b/pkg/reconciler/serverlessservice/resources/services.go
@@ -60,11 +60,10 @@ func MakePublicService(sks *v1alpha1.ServerlessService) *corev1.Service {

@@ -60,9 +60,8 @@ func MakePublicService(sks *v1alpha1.ServerlessService) *corev1.Service {
func makePublicServicePorts(sks *v1alpha1.ServerlessService) []corev1.ServicePort {
ports := []corev1.ServicePort{{
- Name: pkgnet.ServicePortName(sks.Spec.ProtocolType),
- Protocol: corev1.ProtocolTCP,
- AppProtocol: pkgnet.AppProtocol(sks.Spec.ProtocolType),
- Port: int32(pkgnet.ServicePort(sks.Spec.ProtocolType)),
- TargetPort: targetPort(sks),
+ Name: pkgnet.ServicePortName(sks.Spec.ProtocolType),
+ Protocol: corev1.ProtocolTCP,
+ Port: int32(pkgnet.ServicePort(sks.Spec.ProtocolType)),
+ TargetPort: targetPort(sks),
}, {
// The HTTPS port is used when activator-ca is enabled.
// Although it is not used by default, we put it here as it should be harmless
@@ -145,10 +144,9 @@ func MakePrivateService(sks *v1alpha1.ServerlessService, selector map[string]str
+ Name: pkgnet.ServicePortName(sks.Spec.ProtocolType),
+ Protocol: corev1.ProtocolTCP,
//nolint:gosec //ignore integer overflow since pkgnet is bounded
Port: int32(pkgnet.ServicePort(sks.Spec.ProtocolType)),
TargetPort: targetPort(sks),
@@ -146,10 +145,9 @@ func MakePrivateService(sks *v1alpha1.ServerlessService, selector map[string]str
},
Spec: corev1.ServiceSpec{
Ports: []corev1.ServicePort{{
Expand Down Expand Up @@ -201,15 +197,15 @@ index 0690f52d3..61f7bad02 100644
s.Spec.Ports[5] = corev1.ServicePort{
Name: pkgnet.ServicePortNameH2C + "-istio",
diff --git a/pkg/reconciler/serverlessservice/serverlessservice_test.go b/pkg/reconciler/serverlessservice/serverlessservice_test.go
index 3a743236f..2682f6806 100644
index 69ae964d5..4f3c9a702 100644
--- a/pkg/reconciler/serverlessservice/serverlessservice_test.go
+++ b/pkg/reconciler/serverlessservice/serverlessservice_test.go
@@ -803,7 +803,6 @@ func deploy(namespace, name string, opts ...deploymentOption) *appsv1.Deployment
func withHTTP2Priv(svc *corev1.Service) {
svc.Spec.Ports[0].Name = "http2"
svc.Spec.Ports[0].TargetPort = intstr.FromInt(networking.BackendHTTP2Port)
- svc.Spec.Ports[0].AppProtocol = &pkgnet.AppProtocolH2C

svc.Spec.Ports[5].Name = "http2-istio"
svc.Spec.Ports[5].Port = networking.BackendHTTP2Port
@@ -813,7 +812,6 @@ func withHTTP2Priv(svc *corev1.Service) {
Expand All @@ -219,7 +215,7 @@ index 3a743236f..2682f6806 100644
- svc.Spec.Ports[0].AppProtocol = &pkgnet.AppProtocolH2C
svc.Spec.Ports[0].TargetPort = intstr.FromInt(networking.BackendHTTP2Port)
}

diff --git a/pkg/testing/functional.go b/pkg/testing/functional.go
index f0ee41eb7..c04d5c9e3 100644
--- a/pkg/testing/functional.go
Expand Down
Loading