skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Custom script as a deployer

Open ojhughes opened this issue 5 years ago • 13 comments

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

ojhughes avatar Jun 18 '19 09:06 ojhughes

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

NAlexPear avatar Aug 05 '19 20:08 NAlexPear

More use cases:

  • Using other configuration & templating solutions like kapitan or plain Jinja2.
  • Mixing helm and kustomize in all sorts of ways
  • As @NAlexPear mentioned, handling secrets using a variety of mechanisms. This is a real pain point that makes it difficult to integrate Skaffold into most of our projects even if we're already using one of the supported deployers. We're currently using the great sealed-secrets as a workaround, but would much rather use our standard KMS solution instead.
  • https://github.com/GoogleContainerTools/skaffold/issues/1514

erandagan avatar Aug 11 '19 07:08 erandagan

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

tbarrella avatar Dec 11 '19 03:12 tbarrella

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

ojhughes avatar Dec 11 '19 15:12 ojhughes

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

tstromberg avatar Apr 20 '20 16:04 tstromberg

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.

balopat avatar Apr 20 '20 20:04 balopat

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".

horacimacias avatar Apr 28 '20 11:04 horacimacias

@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 🙏

nkubala avatar Jul 13 '20 22:07 nkubala

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

tejal29 avatar Mar 28 '22 18:03 tejal29

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.

sid-hbm avatar Jul 04 '22 19:07 sid-hbm

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(

rvadim avatar Jul 14 '22 17:07 rvadim

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

aaron-prindle avatar Nov 21 '22 19:11 aaron-prindle

Has there been any progress on this?

giepa avatar Dec 07 '23 14:12 giepa