Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Cloud Run deployment target #3217

Closed
hden opened this issue Nov 11, 2019 · 13 comments
Closed

[Feature Request] Cloud Run deployment target #3217

hden opened this issue Nov 11, 2019 · 13 comments
Labels
area/deploy deploy/cloud-run kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@hden
Copy link

hden commented Nov 11, 2019

It may not be a good fit for skaffold, but it would be very interesting if we can deploy to Cloud Run (managed) with a simple config file e.g.

apiVersion: skaffold/v1
kind: Config
build:
  # only build and deploy "world-service" on main profile
  artifacts:
  - image: gcr.io/k8s-skaffold/skaffold-world
    context: world-service
deploy:
  cloud_run:
    platform: managed
    region: asia-northeast1
    env:
        MYSQL_USER: foobar
        MYSQL_PASSWORD: berglas://my-bucket/mysql-password-dev
    cloudsql-instances:
        - foobar
@hden
Copy link
Author

hden commented Dec 12, 2019

The go client for Cloud Run can be found here:
https://github.com/googleapis/google-api-go-client/blob/master/run/v1/run-gen.go

@nkubala
Copy link
Contributor

nkubala commented Apr 24, 2020

hey @hden, just wanted to provide an update here. Skaffold largely powers the Cloud Code IDE extensions for VSCode and IntelliJ, which provide local development experiences for Kubernetes and GCP directly in the IDE. after months of design discussions we decided that Skaffold is not the right place to support Cloud Run, as want to stay focused on Kubernetes-native applications - however, the Cloud Code plugins have added their own support for iterative development against Cloud Run, and in fact this was just released in IntelliJ last week! VSCode will follow with their release very soon, so be sure and check those out if you're using an IDE :)

@nkubala nkubala closed this as completed Apr 24, 2020
@nkubala
Copy link
Contributor

nkubala commented Mar 17, 2021

going to reopen this as we've relaxed our principle on deployer extensibility, and will likely either accept a contribution for this or implement ourselves in the future.

@nkubala nkubala reopened this Mar 17, 2021
@nkubala nkubala added priority/p3 agreed that this would be good to have, but no one is available at the moment. and removed priority/p1 High impact feature/bug. labels Mar 17, 2021
@cgrotz
Copy link

cgrotz commented Sep 22, 2021

Hi, I would like to give this a try. Okay?

@briandealwis
Copy link
Member

@cgrotz this is actually a big piece of work, and there are a few different approaches being considered internally. So my advice is to hold off on this for now.

@krrrr38
Copy link

krrrr38 commented Dec 5, 2021

I hope this feature will be available on CloudDeploy.

@samos123
Copy link

Any updates on this @briandealwis ? I would love to be able to use Cloud Run / Knative with Skaffold.

@cgrotz
Copy link

cgrotz commented Dec 15, 2021

I started a simple implementation on my fork. It allows to deploy to cloud run.

But there are a few things that are a little alien, since skaffold is build more with k8s in mind.

https://github.com/cgrotz/skaffold/tree/main/pkg%2Fskaffold%2Fdeploy%2Fcloudrun

@gmeans
Copy link

gmeans commented Jan 13, 2022

I was just curious about this feature because using Cloud Code w/ the Cloud Run emulator, it appears behind the scenes skaffold is being used.

image

image

Is this just one of the approaches @briandealwis mentioned being considered? Or the path chosen?

Thanks!

@briandealwis
Copy link
Member

Cloud Run support has recently been added to Config Connector. Config Connector allows declarative configuration of GCP resources.

@gmeans the gcloud code dev creates and deploys a pod + service definition using Skaffold and Minikube.

@cgrotz that's nifty. It's unclear how to handle local development vs deploying the managed service. We could have skaffold dev or skaffold debug do local development, whereas you'd use skaffold deploy to upload the service to Cloud Run.

@cgrotz
Copy link

cgrotz commented Jan 14, 2022

Thanks for sharing the Config Connector link, I was waiting for this but wasn't aware that this was already in alpha. 😃

@briandealwis thanks, but I get why you recommended to hold off on it (I already had made that POC by then). For cloud run we wouldn't have a separate render phase.

I think your idea for skaffold dev and skaffold debug is great. I think going with gcloud code dev would probably be the idiomatic approach. Let me try it out.

What caused me some headache was also the question whether the config should support multiple Cloud Run services. @briandealwis and @gmeans what's your opinion on that?

@aaron-prindle
Copy link
Contributor

@bskaplan

@aaron-prindle
Copy link
Contributor

Cloud Run deployment support was added in Skaffold v2.0.0 🎊. Closing this issue (fixed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy deploy/cloud-run kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

No branches or pull requests

10 participants