Skip to content

Commit d0f2a34

Browse files
authored
Merge pull request #768 from M00nF1sh/fix-action-crash
fix controller crash when action annotation didn't exists
2 parents ef5a0fa + 0ee318d commit d0f2a34

File tree

1 file changed

+5
-0
lines changed
  • internal/ingress/annotations/action

1 file changed

+5
-0
lines changed

internal/ingress/annotations/action/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import (
44
"encoding/json"
55
"fmt"
66

7+
"github.com/kubernetes-sigs/aws-alb-ingress-controller/internal/ingress/errors"
8+
79
extensions "k8s.io/api/extensions/v1beta1"
810

911
"github.com/aws/aws-sdk-go/aws"
@@ -34,6 +36,9 @@ func (a action) Parse(ing parser.AnnotationInterface) (interface{}, error) {
3436
actions := make(map[string]*elbv2.Action)
3537
annos, err := parser.GetStringAnnotations("actions", ing)
3638
if err != nil {
39+
if errors.IsMissingAnnotations(err) {
40+
return &Config{}, nil
41+
}
3742
return nil, err
3843
}
3944

0 commit comments

Comments
 (0)