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

deployer: don't generate config in deployer anymore #2349

Merged

Conversation

GeorgianaElena
Copy link
Member

@GeorgianaElena GeorgianaElena commented Mar 14, 2023

Closes #1925

All hubs configs have been changed I've only added the config to the 2i2c-staging hub to get an early approval about the workflow, but it should be added eventually to all of the hubs. What do you think? (Checkout #1925 for more context)

already merged This is based off the work in #2277, so it should be merged after it.

Todo:

@github-actions

This comment was marked as resolved.

@damianavila damianavila requested a review from a team March 14, 2023 22:57
@damianavila
Copy link
Contributor

❗ The only relevant change here can be checked out at GeorgianaElena@80cca07.

I would probably suggest merging #2277 first and then rebasing this one on top of main.

I've only added the config to the 2i2c-staging hub to get an early approval about the workflow, but it should be added eventually to all of the hubs. What do you think?

I concur, although should not be added to the basehub config instead? Well, you may be thinking about that when you say "it should be added eventually to all of the hubs", I presume.

Copy link
Contributor

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

This work is now unblocked by #2277 being merged and I'm excited about this follow up work!!


The PRs current approach is to duplicate the declaration of jupyterhub.hub.initContainers into each separate hub, at least that has provided customized login page configuration, because there is a reference to a branch name that should be configured per hub.

I'd like to see that instead of doing this, we let the basehub chart define a ConfigMap template that renders values we wish to be different per hub's initContainer. Then, we let the hub's added initContainer instead reference an environment variable, which we have mounted from the basehub's rendered ConfigMap.

Looking at the initContainers and extraContainers, I see only a branch name of relevance that differs. So I figure the following:

  1. basehub adds a ConfigMap template that renders based on some variable we configure in values.yaml for basehub
  2. basehub defines hub.initContainers and hub.extraContainers, but also lets the extra container defined that references a hub specific variable do that via a ConfigMap mounted environment variable.

Considering the right to replicate, I also suggest that we allow the github repo we git clone to be a basehub values configuration that is rendered by the configmap template and read as an environment variable as well.

@GeorgianaElena
Copy link
Member Author

@consideRatio, thanks for the great suggestion of simplifying this and for the instructions! Take a look at the latest changes. I've left a comment with the tiny tradeoff that we will need to do (will also add a todo in the top comment to update the template repo docs) as part of this, but I'm super ok with it. LMK what you think.

@GeorgianaElena GeorgianaElena changed the title Don't generate config in deployer anymore deployer: don't generate config in deployer anymore Mar 23, 2023
@GeorgianaElena GeorgianaElena requested a review from a team March 23, 2023 14:15
Copy link
Contributor

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me!

@GeorgianaElena GeorgianaElena force-pushed the no-config-gen-in-deployer branch from ef3fdb7 to b76cfe1 Compare March 24, 2023 08:23
Copy link
Contributor

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Nice!

I think thanks to the schema of minValues we can be certain that you have updated all hubs to have jupyterhub.proxy.hosts and jupyterhub.ingress.tls configuration.

I nitpicked about systematic naming for env vars, but this LGTM!

helm-charts/basehub/templates/configmap-hub-templates.yaml Outdated Show resolved Hide resolved
helm-charts/basehub/values.schema.yaml Show resolved Hide resolved
helm-charts/basehub/values.schema.yaml Show resolved Hide resolved
Copy link
Contributor

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Wieeee no more chart config generation!!

If you have the energy, do a quick scan for documentation that may be outdated along with merging this - but otherwise 👍 for going for a merge!

@GeorgianaElena
Copy link
Member Author

If you have the energy, do a quick scan for documentation that may be outdated along with merging this - but otherwise 👍 for going for a merge!

@consideRatio, I will add it to the todo list of this PR. And then Monday I'll do a pass through all of the todos left of the last 3 big PRs that I. merged 😅 to tighten all the loose ends 🚀

Thank you very much for your amazing feedback ❤️ 🎉

@GeorgianaElena GeorgianaElena merged commit 1b282ad into 2i2c-org:master Mar 24, 2023
@GeorgianaElena GeorgianaElena deleted the no-config-gen-in-deployer branch March 24, 2023 12:57
@github-actions
Copy link

🎉🎉🎉🎉

Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/4511416486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Remove all config generation in the deployer
3 participants