Olivier
Olivier

Reputation: 2162

Change skaffold command for Cloud Code VSCode extension

I'm using the Cloud Code extension for VSCode and each time I'm deploying, the skaffold command executed is the following:

skaffold run --enable-rpc -v info --rpc-http-port 33291 --default-repo gcr.io/project-1`

while in my skaffold.yaml file I have the following configuration build.artifacts[].context.image: gcr.io/project-2/hello-world

Thus after the build step, the deployment continues with

The push refers to repository [gcr.io/project-1/gcr.io/project-2/hello-world]

Of course... this is not what I'm expecting.

Locally, my gcloud is using an account which has access to both project so that skaffold (docker) push works and my gcr.io/project-1 is populated accordingly.

But my Cloud Run service in project-2 is not granted rights to access gcr.io/project-1 and deployment (image pull) fails.

Please, do you know where to change that default skaffold command when running Cloud Deploy (and update the destination registry)?

Thanks

Upvotes: 0

Views: 853

Answers (1)

ahmet alp balkan
ahmet alp balkan

Reputation: 45214

You can change the registry Cloud Code vscode extension pushes to, go to settings:

and in the Extensions → Cloud Code section, change the image registry setting:

enter image description here

If you can't get it to work, try deleting your local .vscode directory and do a Cloud Code: Build again, that way it'll ask for your container registry URI again.

Upvotes: 3

Related Questions