GoogleContainerTools/skaffold

Field to disallow remote clusters

Open

#5,470 opened on Mar 1, 2021

View on GitHub
 (7 comments) (1 reaction) (0 assignees)Go (1,416 forks)batch import
area/deployhelp wantedkind/feature-requestpriority/p3

Repository metrics

Stars
 (12,822 stars)
PR merge metrics
 (Avg merge 3d 6h) (16 merged PRs in 30d)

Description

Requesting this feature after asking about this in the skaffold slack.

I would like to have an option in the skaffold.yaml which disallows running against any remote clusters (recursively, including any "required" sub-skaffold configs), similar to the restrictions that Tilt puts in place by default. A field that ensures noone on the team can accidentally use skaffold on our remote clusters, since we have a different setup for deploying there, and we only use skaffold for local testing.

A few times, I've run skaffold run against our remote cluster when I meant to run against my local one. Even just being a dev remote cluster, it is still a bit of a hassle to undo once I've done that. If there were some top-level field to restrict skaffold to only run on local clusters, that would be very helpful in ensuring that noone on the team accidentally messes up our remote dev cluster with an accidental skaffold command.

Profiles are helpful, but there's no option for "all non-remote clusters". I had to do a workaround where I:

  • moved my skaffold.yaml to skaffold-core.yaml (this skaffold-core.yaml "requires" a few other skaffold configs).
  • Made my skaffold.yaml have multiple profiles for docker-desktop, minikube, etc.
  • In my skaffold.yaml, I "require" my skaffold-core.yaml and activate its "local" profile if docker-desktop, minikube, etc. are activated.

This would be okay, but #5459 is preventing this workaround from working for us.

Contributor guide