Description
When a skaffold config uses requires to import a dependency config that only provides a resourceSelector, skaffold apply rejects any deploy.kubectl.flags with:
creating runner: creating deployer: conflicting sets of kubectl deploy flags not supported in `skaffold apply` (flag: --server-side)
The dependency config has no deploy section — it only defines a resourceSelector. Skaffold creates an implicit (empty) deployer for it, and skaffold apply treats the parent's deploy flags and the dependency's implicit deployer as "conflicting sets."
skaffold dev and skaffold deploy work fine with the same configuration — only skaffold apply rejects it.
Reproduction
Dependency config (dependency.yaml):
apiVersion: skaffold/v4beta2
kind: Config
metadata:
name: "MyResourceSelector"
resourceSelector:
allow:
- groupKind: "MyResource.example.com"
image: [".*"]
Parent config (skaffold.yaml):
apiVersion: skaffold/v4beta12
kind: Config
requires:
- configs: ["MyResourceSelector"]
path: dependency.yaml
build:
artifacts:
- image: my-image
manifests:
kustomize:
paths:
- ./k8s/
deploy:
kubectl:
flags:
apply:
- --server-side
$ skaffold apply --status-check=false --interactive=false \
-f skaffold.yaml rendered-manifest.yaml
creating runner: creating deployer: conflicting sets of kubectl deploy flags \
not supported in `skaffold apply` (flag: --server-side)
Moving deploy.kubectl.flags into a profile instead of the top-level config does not help — skaffold apply still rejects it.
Workaround
Inline the resourceSelector directly into the parent config and remove the requires section.
Expected behavior
skaffold apply should not treat an implicit (empty) deployer from a dependency config as a conflicting set of deploy flags. Dependency configs that only provide non-deploy settings like resourceSelector should not interfere with the parent's deploy configuration.
Environment
- Skaffold version: v2.18.3, v2.19.0
- OS: Linux
- Kubernetes: v1.35.x
Description
When a skaffold config uses
requiresto import a dependency config that only provides aresourceSelector,skaffold applyrejects anydeploy.kubectl.flagswith:The dependency config has no
deploysection — it only defines aresourceSelector. Skaffold creates an implicit (empty) deployer for it, andskaffold applytreats the parent's deploy flags and the dependency's implicit deployer as "conflicting sets."skaffold devandskaffold deploywork fine with the same configuration — onlyskaffold applyrejects it.Reproduction
Dependency config (
dependency.yaml):Parent config (
skaffold.yaml):Moving
deploy.kubectl.flagsinto a profile instead of the top-level config does not help —skaffold applystill rejects it.Workaround
Inline the
resourceSelectordirectly into the parent config and remove therequiressection.Expected behavior
skaffold applyshould not treat an implicit (empty) deployer from a dependency config as a conflicting set of deploy flags. Dependency configs that only provide non-deploy settings likeresourceSelectorshould not interfere with the parent's deploy configuration.Environment