Skip to content

Commit 1b7ff39

Browse files
committed
feat(ingress): add required annotation
1 parent 9ed727d commit 1b7ff39

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pkg/annotations/constants.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const (
6565
IngressSuffixFrontendNlbSubnets = "frontend-nlb-subnets"
6666
IngressSuffixFrontendNlbSecurityGroups = "frontend-nlb-security-groups"
6767
IngressSuffixFrontendNlbListenerPortMapping = "frontend-nlb-listener-port-mapping"
68-
IngressSuffixFrontendNlbEipAlloactions = "frontend-nlb-eip-allocations"
68+
IngressSuffixFrontendNlbEipAllocations = "frontend-nlb-eip-allocations"
6969
IngressSuffixFrontendNlbHealthCheckPort = "frontend-nlb-healthcheck-port"
7070
IngressSuffixFrontendNlbHealthCheckProtocol = "frontend-nlb-healthcheck-protocol"
7171
IngressSuffixFrontendNlbHealthCheckPath = "frontend-nlb-healthcheck-path"
@@ -74,6 +74,7 @@ const (
7474
IngressSuffixFrontendNlbHealthCheckHealthyThresholdCount = "frontend-nlb-healthcheck-healthy-threshold-count"
7575
IngressSuffixFrontendNlHealthCheckbUnhealthyThresholdCount = "frontend-nlb-healthcheck-unhealthy-threshold-count"
7676
IngressSuffixFrontendNlbHealthCheckSuccessCodes = "frontend-nlb-healthcheck-success-codes"
77+
IngressSuffixFrontendNlbAttributes = "frontend-nlb-attributes"
7778
IngressSuffixFrontendNlbTags = "frontend-nlb-tags"
7879
IngressSuffixUseRegexPathMatch = "use-regex-path-match"
7980

pkg/ingress/model_build_frontend_nlb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (t *defaultModelBuildTask) buildFrontendNlbSubnetMappings(ctx context.Conte
162162
explicitSubnetNameOrIDsList = append(explicitSubnetNameOrIDsList, rawSubnetNameOrIDs)
163163
}
164164
var rawEIP []string
165-
if exists := t.annotationParser.ParseStringSliceAnnotation(annotations.IngressSuffixFrontendNlbEipAlloactions, &rawEIP, member.Ing.Annotations); exists {
165+
if exists := t.annotationParser.ParseStringSliceAnnotation(annotations.IngressSuffixFrontendNlbEipAllocations, &rawEIP, member.Ing.Annotations); exists {
166166
eipAllocationsList = append(eipAllocationsList, rawEIP)
167167
}
168168
}
@@ -224,7 +224,7 @@ func (t *defaultModelBuildTask) getFrontendNlbAttributes() (map[string]string, e
224224
var chosenAttributes map[string]string
225225
for _, member := range t.ingGroup.Members {
226226
var attributes map[string]string
227-
if _, err := t.annotationParser.ParseStringMapAnnotation(annotations.SvcLBSuffixLoadBalancerAttributes, &attributes, member.Ing.Annotations); err != nil {
227+
if _, err := t.annotationParser.ParseStringMapAnnotation(annotations.IngressSuffixFrontendNlbAttributes, &attributes, member.Ing.Annotations); err != nil {
228228
return nil, err
229229
}
230230
if chosenAttributes == nil {

pkg/shared_utils/nlb_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package shared_utils
22

33
import (
4-
"sort"
54
elbv2model "sigs.k8s.io/aws-load-balancer-controller/pkg/model/elbv2"
5+
"sort"
66
)
77

88
func MakeAttributesSliceFromMap(loadBalancerAttributesMap map[string]string) []elbv2model.LoadBalancerAttribute {

0 commit comments

Comments
 (0)