Skip to content

Rules are deleted by 1.1.6 when using redirect actions #1274

@billputer

Description

@billputer

I'm using a host-based redirect action as documented here. Specifically, I'm redirecting from one domain to another based on the host-header.

When I upgraded to 1.1.7, I found that all of the rules except for the redirect were deleted from my ALB. After some testing, I found that the rules are created correctly in 1.1.5 and previous versions, but not in 1.1.6+.

Here's the relevant excerpts from my config:

alb.ingress.kubernetes.io/actions.domain-redirect: '{"RedirectConfig":{"Host":"target-host.example.com","Port":"443","Protocol":"HTTPS","StatusCode":"HTTP_301"},"Type":"redirect"}'
alb.ingress.kubernetes.io/conditions.domain-redirect: '[{"Field":"host-header","HostHeaderConfig":{"Values":["test-redirect.example.com"]}}]'
spec:
  rules:
  - http:
      paths:
      - path: /*
        backend:
          serviceName: domain-redirect
          servicePort: use-annotation
      - path: /v1/*
        backend:
          serviceName: backend
          servicePort: 8080
      - path: /ws/*
        backend:
          serviceName: websocket
          servicePort: 8000
      - path: /*
        backend:
          serviceName: frontend
          servicePort: 80

Here's the resulting rules, before and after upgrading to 1.1.6.

Rules in 1.1.5:

rules-v1 1 5

Rules in 1.1.6

rules-v1 1 6

It's my belief that this is a bug introduced by #1162, which adds behavior to detect unconditional redirects and delete any rules after them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions