Skip to content

Comments

charts/cannon: Bundle nginz and expose directly to load balancer#2421

Merged
jschaul merged 23 commits intodevelopfrom
akshaymankar/cannon-nginz
May 25, 2022
Merged

charts/cannon: Bundle nginz and expose directly to load balancer#2421
jschaul merged 23 commits intodevelopfrom
akshaymankar/cannon-nginz

Conversation

@akshaymankar
Copy link
Member

@akshaymankar akshaymankar commented May 23, 2022

By default, incoming network traffic for websockets comes through these network
hops:

Internet -> LoadBalancer -> kube-proxy -> nginx-ingress-controller -> nginz -> cannon

In order to have graceful draining of websockets when something gets restarted (as implemented in #2416 ), as it is not easily
possible to implement the graceful draining on nginx-ingress-controller or nginz by itself, with this PR there is now
a configuration option to get the following network hops:

Internet -> separate LoadBalancer for cannon only -> kube-proxy -> [nginz->cannon (2 containers in the same pod)]

https://wearezeta.atlassian.net/wiki/spaces/PS/pages/585564424/How+to+gracefully+drain+cannon+but+not+so+slowly

FUTUREWORK: this introduces some nginz config duplication; some way to refactor this (e.g. by moving charts/{cannon, nginz}/* to charts/wire-server/ in a backwards-compatible way) would allow to reduce this duplication.

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • changelog.d contains the following bits of information (details):
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.
    • If new config options introduced: added usage description under docs/reference/config-options.m?

This will ensure that nginx shutsdown gracefully when docker or kubernetes tries
to stop it.
@akshaymankar akshaymankar temporarily deployed to cachix May 23, 2022 12:38 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 23, 2022 14:55 Inactive
Pending:
- TLS
- Consolidate nginz configs in cannon and nginz chart or just write another
config for cannon's nginz
@akshaymankar akshaymankar force-pushed the akshaymankar/cannon-nginz branch from c98abff to 41c9c0f Compare May 23, 2022 14:56
@akshaymankar akshaymankar temporarily deployed to cachix May 23, 2022 14:56 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 10:09 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 13:29 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 14:04 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 14:12 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 14:33 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 14:42 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 24, 2022 14:59 Inactive
@jschaul jschaul temporarily deployed to cachix May 25, 2022 13:33 Inactive
@jschaul jschaul marked this pull request as ready for review May 25, 2022 13:37
@jschaul jschaul temporarily deployed to cachix May 25, 2022 13:42 Inactive
@jschaul jschaul temporarily deployed to cachix May 25, 2022 14:03 Inactive
@jschaul jschaul temporarily deployed to cachix May 25, 2022 14:31 Inactive
@jschaul jschaul temporarily deployed to cachix May 25, 2022 14:48 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 25, 2022 15:07 Inactive
@akshaymankar akshaymankar temporarily deployed to cachix May 25, 2022 16:20 Inactive
@jschaul jschaul merged commit 4a3b372 into develop May 25, 2022
@jschaul jschaul deleted the akshaymankar/cannon-nginz branch May 25, 2022 17:34
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