@@ -87,18 +87,20 @@ class BuildExecutor(LoggingConfigurable):
8787
8888 push_secret = Unicode (
8989 "" ,
90- help = "Implementation dependent secret for pushing image to a registry." ,
90+ help = "Implementation dependent static secret for pushing image to a registry." ,
9191 config = True ,
9292 )
9393
94- push_secret_content = Unicode (
94+ registry_credentials = Unicode (
9595 "" ,
9696 help = (
97- "Content of an implementation dependent secret for pushing image to a registry. "
98- "For example, if push tokens are temporary this can be used to pass the token "
99- "as an environment variable CONTAINER_ENGINE_REGISTRY_CREDENTIALS to "
100- "repo2docker."
101- "If provided this will be used instead of push_secret."
97+ "Implementation dependent credentials for pushing image to a registry. "
98+ "For example, if push tokens are temporary this could be used to pass "
99+ "dynamically created credentials as an encoded JSON blob "
100+ '`{"registry": "docker.io", "username":"user", "password":"password"}` '
101+ "in the environment variable `CONTAINER_ENGINE_REGISTRY_CREDENTIALS` to "
102+ "repo2docker. "
103+ "If provided this will be used instead of push_secret. "
102104 ),
103105 config = True ,
104106 )
@@ -243,7 +245,26 @@ def _default_api(self):
243245 # Overrides the default for BuildExecutor
244246 push_secret = Unicode (
245247 "binder-build-docker-config" ,
246- help = "Implementation dependent secret for pushing image to a registry." ,
248+ help = (
249+ "Name of a Kubernetes secret containing static credentials for pushing "
250+ "an image to a registry."
251+ ),
252+ config = True ,
253+ )
254+
255+ registry_credentials = Unicode (
256+ "" ,
257+ help = (
258+ "Implementation dependent credentials for pushing image to a registry. "
259+ "For example, if push tokens are temporary this could be used to pass "
260+ "dynamically created credentials as an encoded JSON blob "
261+ '`{"registry": "docker.io", "username":"user", "password":"password"}` '
262+ "in the environment variable `CONTAINER_ENGINE_REGISTRY_CREDENTIALS` to "
263+ "repo2docker. "
264+ "If provided this will be used instead of push_secret. "
265+ "Currently this is passed to the build pod as a plan text environment "
266+ "variable, though future implementations may use a Kubernetes secret."
267+ ),
247268 config = True ,
248269 )
249270
@@ -415,11 +436,11 @@ def submit(self):
415436 client .V1EnvVar (name = "GIT_CREDENTIAL_ENV" , value = self .git_credentials )
416437 )
417438
418- if self .push_secret_content :
439+ if self .registry_credentials :
419440 env .append (
420441 client .V1EnvVar (
421442 name = "CONTAINER_ENGINE_REGISTRY_CREDENTIALS" ,
422- value = self .push_secret_content ,
443+ value = self .registry_credentials ,
423444 )
424445 )
425446 elif self .push_secret :
0 commit comments