Skaffold: Custom script as a deployer

Created on 18 Jun 2019  路  8Comments  路  Source: GoogleContainerTools/skaffold

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

aredeploy kinfeature-request prioritp2

Most helpful comment

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

All 8 comments

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

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

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

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

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

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.

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 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 馃檹

Was this page helpful?
0 / 5 - 0 ratings