GoogleContainerTools / GoogleContainerTools/skaffold
`skaffold apply` rejects deploy flags when dependency config creates implicit deployer
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
## 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`):
```yaml
apiVersion: skaffold/v4beta2
kind: Config
metadata:
name: "MyResourceSelector"
resourceSelector:
allow:
- groupKind: "MyResource.example.com"
image: [".*"]
```
**Parent config** (`skaffold.yaml`):
```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
Contributor guide
Assessment
This issue has not been assessed yet.