Skip to content

Commit

Permalink
Set proxy.https.hosts by default too
Browse files Browse the repository at this point in the history
In some hubs, we currently just use a loadbalancer + autohttps
to get traffic into the cluster. This is simpler than getting
nginx-ingress + certmanager setup, although not entirely
sure if that's the right thing to do long term.

By putting the domains in proxy.https.hosts as well, we can
decide to use or not use autohttps on a per-hub basis, without
having to repeat the domains in multiple places. Staging and
prod hubs that have the exact same config but differ in
domains can be easily constructed thus.
  • Loading branch information
yuvipanda committed May 10, 2021
1 parent 79a94b2 commit 12e5e63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions config/hubs/farallon.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ hubs:
type: LoadBalancer
https:
enabled: true
hosts:
- staging.farallon.2i2c.cloud
chp:
nodeSelector: {}
tolerations:
Expand Down
7 changes: 6 additions & 1 deletion deployer/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def get_generated_config(self, auth_provider, secret_key):

generated_config = {
'jupyterhub': {
'proxy': { 'secretToken': proxy_secret },
'proxy': {
'secretToken': proxy_secret,
'https': {
'hosts': self.spec['domain'] if isinstance(self.spec['domain'], list) else [self.spec['domain']]
}
},
'ingress': {
'hosts': self.spec['domain'] if isinstance(self.spec['domain'], list) else [self.spec['domain']],
'tls': [
Expand Down
2 changes: 2 additions & 0 deletions hub-templates/basehub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ jupyterhub:
hook:
enabled: false
proxy:
https:
enabled: false
service:
type: ClusterIP
chp:
Expand Down

0 comments on commit 12e5e63

Please sign in to comment.