Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiles don't inherit top-level builds if they specify builds #9507

Open
benmoss opened this issue Aug 23, 2024 · 0 comments
Open

Profiles don't inherit top-level builds if they specify builds #9507

benmoss opened this issue Aug 23, 2024 · 0 comments

Comments

@benmoss
Copy link

benmoss commented Aug 23, 2024

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

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:
apiVersion: skaffold/v4beta11
kind: Config
build:
  artifacts:
    - image: bootstrap
      docker: {}

profiles:
  - name: cool
    build:
      artifacts:
        - image: cool
          docker: {}
    manifests:
      rawYaml:
        - k8s.yaml

Dockerfile:

FROM ubuntu:latest

ENTRYPOINT ["sleep", "infinity" ]

k8s.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant