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 patch for 1.14 release #82

Merged
merged 1 commit into from
Apr 29, 2024
Merged
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
73 changes: 34 additions & 39 deletions openshift/patches/002-add-maistra-annotation.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
diff --git a/pkg/reconciler/ingress/ingress_test.go b/pkg/reconciler/ingress/ingress_test.go
index 3a2cb732..acd84867 100644
--- a/pkg/reconciler/ingress/ingress_test.go
+++ b/pkg/reconciler/ingress/ingress_test.go
@@ -1525,8 +1525,9 @@ type GatewayOpt func(*v1beta1.Gateway)
func gateway(name, namespace string, servers []*istiov1beta1.Server, opts ...GatewayOpt) *v1beta1.Gateway {
gw := &v1beta1.Gateway{
ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: namespace,
+ Name: name,
+ Namespace: namespace,
+ Annotations: map[string]string{resources.MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Servers: servers,
diff --git a/pkg/reconciler/ingress/resources/gateway.go b/pkg/reconciler/ingress/resources/gateway.go
--- a/pkg/reconciler/ingress/resources/gateway.go (revision 2971960b1cf6f44bbf9146e22d0e31eb253d812f)
+++ b/pkg/reconciler/ingress/resources/gateway.go (date 1707288992469)
@@ -41,12 +41,13 @@
index cd7b320f..06310edf 100644
--- a/pkg/reconciler/ingress/resources/gateway.go
+++ b/pkg/reconciler/ingress/resources/gateway.go
@@ -42,12 +42,13 @@ import (
)

const (
Expand All @@ -21,7 +38,7 @@ diff --git a/pkg/reconciler/ingress/resources/gateway.go b/pkg/reconciler/ingres
)

var httpServerPortName = "http-server"
@@ -202,6 +203,9 @@
@@ -204,6 +205,9 @@ func makeWildcardTLSGateways(originWildcardSecrets map[string]*corev1.Secret,
Name: WildcardGatewayName(secret.Name, gatewayService.Namespace, gatewayService.Name),
Namespace: secret.Namespace,
OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(secret, gvk)},
Expand All @@ -31,7 +48,7 @@ diff --git a/pkg/reconciler/ingress/resources/gateway.go b/pkg/reconciler/ingres
},
Spec: istiov1beta1.Gateway{
Selector: gatewayService.Spec.Selector,
@@ -257,6 +261,9 @@
@@ -259,6 +263,9 @@ func makeIngressGateway(ing *v1alpha1.Ingress, visibility v1alpha1.IngressVisibi
// We need this label to find out all Gateways of a given Ingress.
networking.IngressLabelKey: ing.GetName(),
},
Expand All @@ -41,85 +58,63 @@ diff --git a/pkg/reconciler/ingress/resources/gateway.go b/pkg/reconciler/ingres
},
Spec: istiov1beta1.Gateway{
Selector: selector,
diff --git a/pkg/reconciler/ingress/ingress_test.go b/pkg/reconciler/ingress/ingress_test.go
--- a/pkg/reconciler/ingress/ingress_test.go (revision 2971960b1cf6f44bbf9146e22d0e31eb253d812f)
+++ b/pkg/reconciler/ingress/ingress_test.go (date 1707289100741)
@@ -1525,8 +1525,9 @@
func gateway(name, namespace string, servers []*istiov1beta1.Server, opts ...GatewayOpt) *v1beta1.Gateway {
gw := &v1beta1.Gateway{
ObjectMeta: metav1.ObjectMeta{
- Name: name,
- Namespace: namespace,
+ Name: name,
+ Namespace: namespace,
+ Annotations: map[string]string{resources.MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Servers: servers,
diff --git a/pkg/reconciler/ingress/resources/gateway_test.go b/pkg/reconciler/ingress/resources/gateway_test.go
--- a/pkg/reconciler/ingress/resources/gateway_test.go (revision 2971960b1cf6f44bbf9146e22d0e31eb253d812f)
+++ b/pkg/reconciler/ingress/resources/gateway_test.go (date 1707289076385)
@@ -594,6 +594,7 @@
index b3b63a51..e166e006 100644
--- a/pkg/reconciler/ingress/resources/gateway_test.go
+++ b/pkg/reconciler/ingress/resources/gateway_test.go
@@ -618,6 +618,7 @@ func TestMakeWildcardGateways(t *testing.T) {
Name: WildcardGatewayName(wildcardSecret.Name, "istio-system", "istio-ingressgateway"),
Namespace: system.Namespace(),
OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(wildcardSecret, secretGVK)},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -631,6 +632,7 @@
@@ -655,6 +656,7 @@ func TestMakeWildcardGateways(t *testing.T) {
Name: WildcardGatewayName(wildcardSecret.Name, system.Namespace(), "istio-ingressgateway"),
Namespace: system.Namespace(),
OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(wildcardSecret, secretGVK)},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -744,6 +746,7 @@
Labels: map[string]string{
networking.IngressLabelKey: "ingress",
},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -762,6 +765,7 @@
@@ -759,6 +761,7 @@ func TestMakeExternalIngressGateways(t *testing.T) {
Labels: map[string]string{
networking.IngressLabelKey: "ingress",
},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -827,6 +831,7 @@
Selector: sel,
@@ -912,6 +915,7 @@ func TestMakeIngressTLSGateways(t *testing.T) {
Labels: map[string]string{
networking.IngressLabelKey: "ingress",
},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -870,6 +875,7 @@
@@ -955,6 +959,7 @@ func TestMakeIngressTLSGateways(t *testing.T) {
Labels: map[string]string{
networking.IngressLabelKey: "ingress",
},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -916,6 +922,7 @@
@@ -1001,6 +1006,7 @@ func TestMakeIngressTLSGateways(t *testing.T) {
Labels: map[string]string{
networking.IngressLabelKey: "ingress",
},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
@@ -959,6 +966,7 @@
@@ -1044,6 +1050,7 @@ func TestMakeIngressTLSGateways(t *testing.T) {
Labels: map[string]string{
networking.IngressLabelKey: "ingress.com",
},
+ Annotations: map[string]string{MaistraManageRouteAnnotationKey: "false"},
},
Spec: istiov1beta1.Gateway{
Selector: selector,
Selector: selector,
Loading