Keith
Keith

Reputation: 178

Spring Cloud Data Flow with Docker images from private repo - imagePullSecrets not being used. Cant Pull image

So I am unable to Launch a custom task application stored in a private docker repo. All my docker images in Kubernetes come are pulled from this private repo. So the imagePullSecrets works fine but it seems it is not being used by Spring Cloud Dataflow when deploying the task to Kubernetes. If I inspect the pod there is no imagepullSecret set.

The error I get is:

xxxxx- no basic auth credentials enter image description here

The server has been deployed with the ENV variable which the guide states will fix this

    - name: SPRING_CLOUD_DEPLOYER_KUBERNETES_IMAGE_PULL_SECRET
      value: regcred

I have even tried to add custom properties on a per-application bases

I have read through the guide HERE

I am running the following versions:

Kubernetes 1.15 &

enter image description here

I have been stuck on this issue for weeks and simply can't find a solution. I'm hoping somebody has seen this issue and managed to solve it before?

Is there something else I'm missing?

Upvotes: 0

Views: 1150

Answers (2)

Manu
Manu

Reputation: 354

Using the environment variable SPRING_CLOUD_DEPLOYER_KUBERNETES_IMAGE_PULL_SECRET also didnt work for me.

An alternative that made it work in my case is adding the following to the application.yaml of the SCDF Server in Kubernetes:

application.yaml
spring:
  cloud:
    dataflow:
      task:
        platform:
          kubernetes:
            accounts:
              default:
                imagePullSecret: <your_secret>

or, when you are using a custom SCDF image like i do, you can of course specify it as argument:

deployment.yaml
[...]
command: ["java", "-jar", "spring-cloud-dataflow-server.jar"]
args:
  - --spring.cloud.dataflow.task.platform.kubernetes.accounts.default.imagePullSecret=<your_secret>
[...]

More details on https://docs.spring.io/spring-cloud-dataflow/docs/current/reference/htmlsingle/

Upvotes: 1

Keith
Keith

Reputation: 178

So I found if I do the following it pulls the image (it seems i put this in the wrong place as the documentation doesn't clearly specify where and how)

enter image description here

But using the global environment variable as stated above does not seem to work still

Upvotes: 1

Related Questions