File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ type FrontendEnvironmentSpec struct {
61
61
62
62
// Ingress class
63
63
IngressClass string `json:"ingressClass,omitempty"`
64
+ // Ingress annotations
65
+ // These annotations will be applied to the ingress objects created by the frontend
66
+ IngressAnnotations map [string ]string `json:"ingressAnnotations,omitempty"`
64
67
65
68
// Hostname
66
69
Hostname string `json:"hostname,omitempty"`
Original file line number Diff line number Diff line change @@ -658,6 +658,17 @@ func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.Namespace
658
658
ingressClass = "nginx"
659
659
}
660
660
661
+ if r .FrontendEnvironment .Spec .IngressAnnotations != nil {
662
+ annotations := netobj .GetAnnotations ()
663
+ if annotations == nil {
664
+ annotations = map [string ]string {}
665
+ }
666
+ for k , v := range r .FrontendEnvironment .Spec .IngressAnnotations {
667
+ annotations [k ] = v
668
+ }
669
+ netobj .SetAnnotations (annotations )
670
+ }
671
+
661
672
if len (r .FrontendEnvironment .Spec .Whitelist ) != 0 {
662
673
annotations := netobj .GetAnnotations ()
663
674
if annotations == nil {
You can’t perform that action at this time.
0 commit comments