Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jupyter-api image and add Listen_address env variable #40

Merged
merged 4 commits into from
Sep 14, 2020

Conversation

wg102
Copy link
Contributor

@wg102 wg102 commented Sep 1, 2020

fixes #39

@brendangadd
Copy link

New environment variable LISTEN_ADDRESS required due to StatCan/jupyter-apis#15.

@justbert
Copy link

justbert commented Sep 3, 2020

LGTM!

justbert
justbert previously approved these changes Sep 3, 2020
@justbert
Copy link

justbert commented Sep 3, 2020

@brendangadd We usually only merge in after-hours to prevent downtime of the Kubeflow Control plane. That still okay?

brendangadd
brendangadd previously approved these changes Sep 3, 2020
@justbert
Copy link

justbert commented Sep 4, 2020

@sylus do we need to change anything else for this?

@sylus
Copy link
Member

sylus commented Sep 4, 2020

Thinking will merge over weekend as wont have time to debug any issues before then.

@justbert
Copy link

justbert commented Sep 4, 2020

@sylus was gonna do it last night, but @brendangadd pointed out there may be something missing:

The new environment variable is in params.env, but I'm wondering if it also needs to be referenced somewhere else, like here: https://github.com/StatCan/kubeflow-manifest/blob/master/kustomize/jupyter-web-app/base/kustomization.yaml#L27

@brendangadd
Copy link

Reason for environment variable

The jupyter-apis image has been modified so that the listen address is configurable. StatCan/jupyter-apis#15.

  • Old behaviour: listen on 0.0.0.0:5000
  • New behaviour: order of precedence of -listen-address CLI arg > LISTEN_ADDRESS env var > default of 127.0.0.1:5000

This PR needs to add the new LISTEN_ADDRESS env var, set to 0.0.0.0:5000, to maintain the original (desired) behaviour in prod.

/cc @justbert @sylus

@justbert
Copy link

justbert commented Sep 4, 2020

@sylus Can you take a look at this? I'm not familiar with the components of the DAaaS platform. My knowledge of kustomize is also lacking.

Should we load LISTEN_ADDRESS from the ConfigMap that is generated from params.env like ROK_SECRET_NAME is done or template them in like they are done for userid-header and userid-prefix?

@justbert justbert self-requested a review September 4, 2020 16:03
@justbert justbert changed the title Update jupyter-api image and add Listen_address env variable WIP: Update jupyter-api image and add Listen_address env variable Sep 4, 2020
@justbert justbert dismissed brendangadd’s stale review September 4, 2020 16:22

Other changes still need to be made.

@justbert
Copy link

justbert commented Sep 4, 2020

Brought up by @brendangadd:

kubectl kustomize and kustomize build do not behave the same! kubernetes-sigs/kustomize#2205 (edited)

@brendangadd
Copy link

I built with kustomize (kubectl kustomize throws) and the new environment variable in params.env is being added to the config map correctly. I just pushed a new commit to reference the new value in the deployment, as suggested by @justbert.

/cc @sylus @wg102

@brendangadd brendangadd changed the title WIP: Update jupyter-api image and add Listen_address env variable Update jupyter-api image and add Listen_address env variable Sep 6, 2020
@sylus
Copy link
Member

sylus commented Sep 7, 2020

So the P.R. looks fine and nothing looks wrong to me. As long as Zach has everything committed properly it should be fine.

This has been testing and confirmed to work?

@sylus
Copy link
Member

sylus commented Sep 7, 2020

So this change brings in the new jupyter-api of which the delta is quite large?

StatCan/jupyter-apis@3c844b4...692c8f4

I guess the mitigation is if things don't work we set back the image version?

@brendangadd
Copy link

@sylus

  • The manifest updates have not been tested. Not sure how to test that out properly with only the one cluster.
  • I verified that the new env var exists in the kustomize-generated config map as expected, so should have the same behaviour as the ROK_SECRET_NAME.
  • The fallback mechanism for setting the listen address in the Go app has been tested.
  • The other jupyter-apis changes have been tested.

@sylus sylus self-requested a review September 14, 2020 01:12
sylus
sylus previously approved these changes Sep 14, 2020
@sylus
Copy link
Member

sylus commented Sep 14, 2020

@zachomedia can i merge this? Should we update the SHA do the latest?

Copy link
Contributor

@zachomedia zachomedia left a comment

Choose a reason for hiding this comment

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

I feel like we should make this environment variable value the default in the Dockerfile rather than setting it on the cluster. It'll will be needed to run in Docker anyways to expose the app.

Adding a ENV LISTEN_ADDRESS 0.0.0.0:5000

Thoughts @sylus @justbert ?

@sylus
Copy link
Member

sylus commented Sep 14, 2020

@saffaalvi can u make this change? then can merge!

Copy link
Contributor

@zachomedia zachomedia left a comment

Choose a reason for hiding this comment

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

LGTM!

@sylus sylus merged commit 9cf4b5f into master Sep 14, 2020
@sylus sylus deleted the 39-update-jupyter-apis-image branch September 14, 2020 19:51
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.

Update jupyter-apis image (requires new env)
6 participants