You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add nginx.org/ssl-redirect annotation support (#8656)
Add support for the new nginx.org/ssl-redirect annotation to deprecate existing ingress.kubernetes.io/ssl-redirect annotation. closes#5526
The new annotation provides the same SSL redirect functionality with precedence over the legacy annotation when both are present.
- Add nginx.org/ssl-redirect annotation constant and validation
- Implement precedence logic favouring new annotation
- Implement AddedOrUpdatedWithWarning event emission when the deprecated annotation is used
---------
Signed-off-by: Haywood Shannon <[email protected]>
Co-authored-by: Copilot <[email protected]>
allWarnings.AddWarningf(p.ingEx.Ingress, "The annotation 'ingress.kubernetes.io/ssl-redirect' is deprecated and will be removed. Please use 'nginx.org/ssl-redirect' instead.")
cafeIngressEx.Ingress: {"The annotation 'ingress.kubernetes.io/ssl-redirect' is deprecated and will be removed. Please use 'nginx.org/ssl-redirect' instead."},
2723
+
},
2724
+
msg: "deprecated annotation generates warning",
2725
+
},
2726
+
{
2727
+
annotations: map[string]string{
2728
+
"nginx.org/ssl-redirect": "true",
2729
+
},
2730
+
expectedWarnings: Warnings{},
2731
+
msg: "new annotation does not generate warning",
2732
+
},
2733
+
{
2734
+
annotations: map[string]string{
2735
+
"ingress.kubernetes.io/ssl-redirect": "true",
2736
+
"nginx.org/ssl-redirect": "false",
2737
+
},
2738
+
expectedWarnings: Warnings{
2739
+
cafeIngressEx.Ingress: {"The annotation 'ingress.kubernetes.io/ssl-redirect' is deprecated and will be removed. Please use 'nginx.org/ssl-redirect' instead."},
0 commit comments