GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
14.94k stars 1.62k forks source link

Custom script as a deployer #2277

Open ojhughes opened 5 years ago

ojhughes commented 5 years ago

Expected behavior

Ability to provide a custom script as a deployer, using the same pattern that allows a custom build script to be used as a builder. This will enable other Kubernetes deployment tools to be leveraged within a Skaffold workflow, such as Kapp or Spinnaker pipeline triggers

Actual behavior

Currently, it is only possible to use kubectl, helm or kustomize as a deployer implementation

NAlexPear commented 5 years ago

This is important for us as well, since we're using sops for secret decryption across environments. So even though we're happy using kubectl to apply changes to our clusters, the inability to hook into that deploy pipeline means that we can't currently use skaffold

erandagan commented 5 years ago

More use cases:

tbarrella commented 4 years ago

It seems like this could also reduce the need for https://github.com/GoogleContainerTools/skaffold/issues/1441

ojhughes commented 4 years ago

This is my current workflow skaffold render | kapp deploy -a $(yq r skaffold.yaml metadata.name) -y -f -

In my case I also let kapp take care of deletion of the deployment so would also be nice to provide an override for skaffold delete

tstromberg commented 4 years ago

Adding discuss label to see if this is actually feasible or not, given Skaffolds current architecture.

balopat commented 4 years ago

Adding a deploy script seems like an easy enough thing to do at first, but there needs to be careful consideration put into the design. A solution should be able to tie nicely into logging, debugging, render, port forwarding. Extracting all this behavior into an interface is not a small feature. We recognize that there would be value here - and we would love to tackle this carefully but it is at the moment not the highest on our list of things to focus on.

horacimacias commented 4 years ago

for logging, wouldn't it be possible to also support logging via a custom script so at least people using custom deployers can use a custom logging script?

Similar thing for debugging.

I'm not saying it's a 5min job but at least we can allow people to craft their own scripts (which they probably already have anyway) and use the skaffold "loop".

nkubala commented 4 years ago

@horacimacias you're right that definitely would be possible, and in all likelihood the route we'd want to take when implementing this. as @balopat mentioned we'd need to extract all of this behavior into an interface that would be fulfilled by the custom scripts, and as he also mentioned this is definitely not a small undertaking.

we definitely hear the requests for this, and would love to see it implemented! at the moment our team's bandwidth is unfortunately already stretched pretty thin so I don't see us getting to this this quarter. designs and PRs are always welcome though 🙏

tejal29 commented 2 years ago

I want to re-echo @nkubala's sentiments. Would love to see some community contributions!

sid-hbm commented 2 years ago

What happened to this feature request? Was it implemented (if yes, is there any documentation about it). Thank you very much for willing to support this feature.

rvadim commented 2 years ago

bring your own tools - Skaffold has a pluggable architecture to integrate with any build or deploy tool

I spent a whole day realizing that I can't really use my deployment tools(

aaron-prindle commented 1 year ago

This has now been prioritized as part of our roadmap. We currently have no exact dates as of when to expect this but the team is now actively investigating/designing a solution here. I believe we will have a design to submit (will be submitted in OSS to our docs-v2/design-proposal area) in ~3-4 weeks. I will update the thread here w/ more information and updates

giepa commented 9 months ago

Has there been any progress on this?