concourse / concourse-chart

Helm chart to install Concourse
Apache License 2.0
143 stars 176 forks source link

Add earlier paths option for web-ingress #219

Closed ari-becker closed 3 years ago

ari-becker commented 3 years ago

Why do we need this PR?

Allows for adding additional, earlier paths to web-ingress. The impetus for this change is to allow for setting up an HTTP -> HTTPS redirect with AWS ALBs. For example:

metadata:
  annotations:
    alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type":"redirect","RedirectConfig":{"Protocol":"HTTPS","Port":"443","StatusCode":"HTTP_301"}}'
spec:
  rules:
  - host: "concourse.example.com"
    paths:
    - path: '/*'
      backend:
        serviceName: 'ssl-redirect'
        servicePort: 'use-annotation'
    - path: '/*'
      backend:
        serviceName: {{ template "web.fullname" . }}
        servicePort: "atc"

Reference: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.1/guide/tasks/ssl_redirect/

Contributor Checklist

Reviewer Checklist

This section is intended for the core maintainers only, to track review progress. Please do not fill out this section.

  • [ ] Code reviewed
  • [ ] Topgun tests run
  • [ ] Back-port if needed
  • [ ] Is the correct branch targeted? (master or dev)
ari-becker commented 3 years ago

Hi @taylorsilva , sorry for the delay, I was on vacation for a bit.

I switched gears here slightly and proposed a web.ingress.rulesOverride option instead, which allows the user to have more control. It's cleaner (in terms of the chart) and probably more flexible too.

What do you think?

(side note: I see the CI build failure, but when I clicked the link, it's stuck on loading..., so I'm not sure what to do here).