spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

No clear way on how to register app from private repository ( K8s )

Open gry77 opened this issue 6 years ago • 1 comments

I have deployed SCDF 2.6.1 to OpenShift 3.1 successfully. However when I tried to register task to the SCDF, it keeps trying to get from the default registry, instead of private registry

2020-09-03 04:55:24.111 INFO 1 --- [ main] urationMetadataResolverAutoConfiguration : Final Registry Configurations: {registry-1.docker.io=RegistryConfiguration{registryHost='registry-1.docker.io', user='null', secret='****'', authorizationType=dockeroauth2, manifestMediaType='application/vnd.docker.distribution.manifest.v2+json', disableSslVerification='false', extra={registryAuthUri=https://auth.docker.io/token?service=registry.docker.io&scope=repository:{repository}:pull&offline_token=1&client_id=shell }}}

Then I also facing NPE in below log :

java.lang.NullPointerException: null at org.springframework.cloud.dataflow.configuration.metadata.container.DefaultContainerImageMetadataResolver.getRegistryRequest(DefaultContainerImageMetadataResolver.java:162) at org.springframework.cloud.dataflow.configuration.metadata.container.DefaultContainerImageMetadataResolver.getImageLabels(DefaultContainerImageMetadataResolver.java:110) at org.springframework.cloud.dataflow.configuration.metadata.BootApplicationConfigurationMetadataResolver.resolvePortNamesFromContainerImage(BootApplicationConfigurationMetadataResolver.java:215) at org.springframework.cloud.dataflow.configuration.metadata.BootApplicationConfigurationMetadataResolver.listPortNames(BootApplicationConfigurationMetadataResolver.java:163) at org.springframework.cloud.dataflow.server.controller.AppRegistryController.getInfo(AppRegistryController.java:193) at org.springframework.cloud.dataflow.server.controller.AppRegistryController.info(AppRegistryController.java:162) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Things that I have tried :

  1. Include imagePullSecret to the deployment config.

From the NPE the error is because registryConf is null as result from RegistryConfiguration registryConf = this.registryConfigurationMap.get(containerImage.getRegistryHost()); How to register my private repo URI so it can be recognized in registryConfigurationMap ?

I'm sorry if this is actually not to be posted here, I tried to raise this on stackoverflow as well : https://stackoverflow.com/questions/63702388/how-to-register-app-from-private-repo-in-spring-cloud-dataflow-2-6-1 But since no answer until now, I think i can get answer here in github..

Release versions: SCDF 2.6.1

gry77 avatar Sep 08 '20 03:09 gry77

Hi @gry77 ,

Stackoverflow is the place for asking this question. Most of the team was busy with SpringOne. I will try to answer your question there. Closing this. Thanks!

ilayaperumalg avatar Sep 08 '20 07:09 ilayaperumalg