Skip to content

Conversation

@mterhar
Copy link
Contributor

@mterhar mterhar commented Aug 24, 2021

I'm using the following command to ensure the right objects are being created:

helm template coder . -f examples/ingress/ingress.values.yaml --set postgres.default.enable=false

The goal of this is to:

  • Suggest values for when deploying into a cluster that can't make more LBs
  • Add a simple ingress object that will exist when ingress.enable=true
  • Support TLS-at-the-ingress with annotations and such

@mterhar mterhar requested a review from coadler August 24, 2021 18:18
@mterhar
Copy link
Contributor Author

mterhar commented Aug 24, 2021

@sreya I have to add a bunch of this stuff to platform one's big bang deployment since it only has 1 LB which is shared by all of their services. The ingress stuff is required for them even with serviceNext.

Copy link

@jawnsy jawnsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll be more careful to check the preview this time before merging 😅

{{- end }}
spec:
{{- include "coder.ingress.tls" . }}
rules:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default backend is supposed to be on the controller rather than the ingress resources (by convention)... this choice was deliberate.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mterhar TIL! Do you have a link to learn about this convention?

name: coderd-ingress
namespace: {{ .Release.Namespace | quote }}
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be put in the default values file, then we can make all of the annotations configurable, similar to how we do it with securityContext: https://github.com/cdr/enterprise-helm/blob/e158a751b9a1c3198adff2c08b4a5f50c1e33fdf/templates/coderd.yaml#L36-L42

right now there's no way to clear the nginx.ingress.kubernetes.io/proxy-body-size annotation here

FWIW, I think this resolves: https://app.clubhouse.io/coder/story/14644/route-traffic-to-coderd-using-ingress -- thank you!

# useDefault set to false disables creation of the ingress controller
useDefault: false
# add annotations for TLS issuers and such
annotations: {} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not mandatory but would be nice to modify the OpenShift one to add an example that creates an OpenShift Route (it needs some different annotations)

https://docs.okd.io/latest/networking/routes/route-configuration.html#nw-ingress-creating-a-route-via-an-ingress_route-configuration

@mterhar mterhar merged commit 91b43e7 into main Aug 25, 2021
@mterhar mterhar deleted the add-example-ingress branch August 25, 2021 14:35
@jawnsy
Copy link

jawnsy commented Aug 25, 2021

[ch14644]

@shortcut-integration
Copy link

This pull request has been linked to Clubhouse Story #14644: Route traffic to coderd using Ingress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants