-
Notifications
You must be signed in to change notification settings - Fork 398
build_docker_config added, enables augmentation of the build pod's docker config #1255
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -297,7 +297,7 @@ def _valid_badge_base_url(self, proposal): | |
) | ||
|
||
push_secret = Unicode( | ||
'binder-push-secret', | ||
'binder-build-docker-config', | ||
allow_none=True, | ||
help=""" | ||
A kubernetes secret object that provides credentials for pushing built images. | ||
|
@@ -375,6 +375,22 @@ def docker_build_host_validate(self, proposal): | |
raise TraitError("Only unix domain sockets on same node are supported for build_docker_host") | ||
return proposal.value | ||
|
||
build_docker_config = Dict( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello from the distant future! I'm reviewing the BinderHub config properties as part of #1521 and as far as I can tell this property isn't used. It's passed to Can you remember what's happening here? |
||
None, | ||
allow_none=True, | ||
help=""" | ||
A dict which will be merged into the .docker/config.json of the build container (repo2docker) | ||
Here, you could for example pass proxy settings as described here: | ||
https://docs.docker.com/network/proxy/#configure-the-docker-client | ||
|
||
Note: if you provide your own push_secret, this values wont | ||
have an effect, as the push_secrets will overwrite | ||
.docker/config.json | ||
In this case, make sure that you include your config in your push_secret | ||
""", | ||
config=True | ||
) | ||
|
||
hub_api_token = Unicode( | ||
help="""API token for talking to the JupyterHub API""", | ||
config=True, | ||
|
@@ -693,6 +709,7 @@ def initialize(self, *args, **kwargs): | |
"build_memory_limit": self.build_memory_limit, | ||
"build_memory_request": self.build_memory_request, | ||
"build_docker_host": self.build_docker_host, | ||
"build_docker_config": self.build_docker_config, | ||
"base_url": self.base_url, | ||
"badge_base_url": self.badge_base_url, | ||
"static_path": os.path.join(HERE, "static"), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change of default a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed it in the PR summary i updated above. Yes it can in theory cause a new build pod get stuck pending if started in a timeframe of a second for 1 replica binder deployments or a 10 second window for 2 replica deployments. I consider this acceptable.
If chart is upgraded, the old secret us gone, and an old binderhub replica awaiting termination until another binder pod starts up during a rolling upgrade, would starts a new build pod - then it would get stuck pending not being able to mount old k8s secret.