GoogleContainerTools / GoogleContainerTools/skaffold
Profiles don't inherit top-level builds if they specify builds
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
If I specify a `builds:` section under a profile I expect it to be merged into the top-level `builds:` section
### Actual behavior
It seems to override the top-level builds
The [docs on profiles say](https://skaffold.dev/docs/environment/profiles/)
> Once a profile is activated, the specified build, test and deploy configuration in it will be laid onto, but won’t completely replace, the build, test and deploy sections declared in the main section of skaffold.yaml.
This seems kinda ambiguous but it seems like set intersection is probably the most intuitive way this could work
### Information
- Skaffold version: `v2.13.2`
- Operating system: OSX 14.6.1
- Installed via: Homebrew
- Contents of skaffold.yaml:
```yaml
apiVersion: skaffold/v4beta11
kind: Config
build:
artifacts:
- image: bootstrap
docker: {}
profiles:
- name: cool
build:
artifacts:
- image: cool
docker: {}
manifests:
rawYaml:
- k8s.yaml
```
Dockerfile:
```dockerfile
FROM ubuntu:latest
ENTRYPOINT ["sleep", "infinity" ]
```
k8s.yaml:
```yaml
apiVersion: v1
kind: Pod
metadata:
name: bootstrap
labels:
name: bootstrap
spec:
containers:
- name: bootstrap
image: bootstrap
- name: cool
image: cool
```
### Steps to reproduce the behavior
1. a clonable repository with the sample skaffold project
2. `skaffold dev -p cool`
```
Generating tags...
- cool -> cool:latest
Some taggers failed. Rerun with -vdebug for errors.
Checking cache...
- cool: Found Locally
Tags used in deployment:
- cool -> cool:4b786b30fdaa5bb77cdab2e3493d8e85e811c6940a52d32840fd9d12d3ec62e1
Starting deploy...
Loading images into kind cluster nodes...
- cool:4b786b30fdaa5bb77cdab2e3493d8e85e811c6940a52d32840fd9d12d3ec62e1 -> Found
Images loaded in 92.475125ms
- pod/bootstrap created
Waiting for deployments to stabilize...
- pods: container bootstrap is waiting to start: bootstrap can't be pulled
- pod/bootstrap: container bootstrap is waiting to start: bootstrap can't be pulled
- pods failed. Error: container bootstrap is waiting to start: bootstrap can't be pulled.
Cleaning up...
- pod "bootstrap" deleted
1/1 deployment(s) failed
```
Contributor guide
Assessment
This issue has not been assessed yet.