GoogleContainerTools / GoogleContainerTools/skaffold

sync does not sync files to initContainers in Deployment

Open
#9,117 3 comments 0 reactions 0 assignees View on GitHub
area/sync
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior

When I change a file, and restart deployment, the file change will appear in the init containers that use the same image.

### Actual behavior

The init container have stale source code.

### Information

- Skaffold version: v2.6.2
- Operating system: NixOS
- Installed via: nix
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v4beta5
kind: Config
metadata:
name: my-project
build:
artifacts:
- image: my-image
context: .
docker:
dockerfile: backend/Dockerfile
sync:
infer:
- backend/**/*.py
- backend/src/web/templates/*.j2.html

```

### Steps to reproduce the behavior

Create a deployment where `my-image` is used in both a container and and init-container. Change file and see that it is only updated in the container, not the init-container.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.