forked from openshift-knative/net-istio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add maistra annotation to generated gateways to disable IOR
- Loading branch information
Showing
3 changed files
with
113 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
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 9914eca315000a757b0f48df69f59cdbb8f7ea23) | ||
+++ b/pkg/reconciler/ingress/resources/gateway_test.go (date 1689860320623) | ||
@@ -593,6 +593,7 @@ | ||
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, | ||
@@ -630,6 +631,7 @@ | ||
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, | ||
@@ -743,6 +745,7 @@ | ||
Labels: map[string]string{ | ||
networking.IngressLabelKey: "ingress", | ||
}, | ||
+ Annotations: map[string]string{maistraManageRouteAnnotationKey: "false"}, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: selector, | ||
@@ -761,6 +764,7 @@ | ||
Labels: map[string]string{ | ||
networking.IngressLabelKey: "ingress", | ||
}, | ||
+ Annotations: map[string]string{maistraManageRouteAnnotationKey: "false"}, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: selector, | ||
@@ -824,6 +828,7 @@ | ||
Labels: map[string]string{ | ||
networking.IngressLabelKey: "ingress", | ||
}, | ||
+ Annotations: map[string]string{maistraManageRouteAnnotationKey: "false"}, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: selector, | ||
@@ -866,6 +871,7 @@ | ||
Labels: map[string]string{ | ||
networking.IngressLabelKey: "ingress", | ||
}, | ||
+ Annotations: map[string]string{maistraManageRouteAnnotationKey: "false"}, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: selector, | ||
@@ -908,6 +914,7 @@ | ||
Labels: map[string]string{ | ||
networking.IngressLabelKey: "ingress.com", | ||
}, | ||
+ Annotations: map[string]string{maistraManageRouteAnnotationKey: "false"}, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: selector, | ||
diff --git a/pkg/reconciler/ingress/resources/gateway.go b/pkg/reconciler/ingress/resources/gateway.go | ||
--- a/pkg/reconciler/ingress/resources/gateway.go (revision 9914eca315000a757b0f48df69f59cdbb8f7ea23) | ||
+++ b/pkg/reconciler/ingress/resources/gateway.go (date 1689860314964) | ||
@@ -42,9 +42,10 @@ | ||
|
||
// GatewayHTTPPort is the HTTP port the gateways listen on. | ||
const ( | ||
- GatewayHTTPPort = 80 | ||
- dns1123LabelMaxLength = 63 // Public for testing only. | ||
- dns1123LabelFmt = "[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?" | ||
+ GatewayHTTPPort = 80 | ||
+ dns1123LabelMaxLength = 63 // Public for testing only. | ||
+ dns1123LabelFmt = "[a-zA-Z0-9](?:[-a-zA-Z0-9]*[a-zA-Z0-9])?" | ||
+ maistraManageRouteAnnotationKey = "maistra.io/manageRoute" | ||
) | ||
|
||
var httpServerPortName = "http-server" | ||
@@ -199,6 +200,9 @@ | ||
Name: WildcardGatewayName(secret.Name, gatewayService.Namespace, gatewayService.Name), | ||
Namespace: secret.Namespace, | ||
OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(secret, gvk)}, | ||
+ Annotations: map[string]string{ | ||
+ maistraManageRouteAnnotationKey: "false", | ||
+ }, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: gatewayService.Spec.Selector, | ||
@@ -254,6 +258,9 @@ | ||
// We need this label to find out all of Gateways of a given Ingress. | ||
networking.IngressLabelKey: ing.GetName(), | ||
}, | ||
+ Annotations: map[string]string{ | ||
+ maistraManageRouteAnnotationKey: "false", | ||
+ }, | ||
}, | ||
Spec: istiov1beta1.Gateway{ | ||
Selector: selector, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters