@@ -91,14 +91,16 @@ class BuildExecutor(LoggingConfigurable):
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 )
@@ -247,6 +249,22 @@ def _default_api(self):
247249 config = True ,
248250 )
249251
252+ registry_credentials = Unicode (
253+ "" ,
254+ help = (
255+ "Implementation dependent credentials for pushing image to a registry. "
256+ "For example, if push tokens are temporary this could be used to pass "
257+ "dynamically created credentials as an encoded JSON blob "
258+ '`{"registry": "docker.io", "username":"user", "password":"password"}` '
259+ "in the environment variable `CONTAINER_ENGINE_REGISTRY_CREDENTIALS` to "
260+ "repo2docker. "
261+ "If provided this will be used instead of push_secret. "
262+ "Currently this is passed to the build pod as a plan text environment "
263+ "variable, though future implementations may use a Kubernetes secret."
264+ ),
265+ config = True ,
266+ )
267+
250268 namespace = Unicode (
251269 help = "Kubernetes namespace to spawn build pods into" , config = True
252270 )
@@ -415,11 +433,11 @@ def submit(self):
415433 client .V1EnvVar (name = "GIT_CREDENTIAL_ENV" , value = self .git_credentials )
416434 )
417435
418- if self .push_secret_content :
436+ if self .registry_credentials :
419437 env .append (
420438 client .V1EnvVar (
421439 name = "CONTAINER_ENGINE_REGISTRY_CREDENTIALS" ,
422- value = self .push_secret_content ,
440+ value = self .registry_credentials ,
423441 )
424442 )
425443 elif self .push_secret :
0 commit comments