GoogleContainerTools / GoogleContainerTools/skaffold

Use file sync only

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

Description

hi! Thank you for this wonderful product, it looks very promising!
A small question: is it possible to use JUST [file sync](https://skaffold.dev/docs/filesync/)?

I think I did something wrong here, but I can't figure out what exactly.

### Expected behavior
I modify a file and, according to the [doc](https://skaffold.dev/docs/filesync/), Skaffold creates a tar file with changed files that match the sync rules. This tar file is sent to and extracted on the corresponding containers.

### Actual behavior
Skaffold builds an image and tries to redeploy the whole app
the Skaffold output:
```
Generating tags...
- my-image -> my-image:0.1.9-01c818c
Checking cache...
- my-image: Not found. Building
Starting build...
Building [my-image]...
Target platforms: [linux/amd64]

Build [my-image] succeeded
Tags used in deployment:
- my-image -> my-image:0.1.9-01c818c@sha256:ec687110b5af7458c733a746035654fe9f95c3d15856a9e924212502de472a66
Starting deploy...
Waiting for deployments to stabilize...
Deployments stabilized in 731.038406ms

```

### Information

- Skaffold version:
v2.9.0

- Operating system: Linux 5.15.0-88-generic 20.04.1-Ubuntu
- Installed via: skaffold.dev
- Contents of skaffold.yaml:

```yaml

apiVersion: skaffold/v4beta8
kind: Config
metadata:
name: myapp
build:
local: {}
artifacts:
- image: my-image
context: .
sync:
manual:
- src: "src/"
dest: "/app/src"
- src: "__version__.py"
dest: "/app/__version__.py"
custom:
buildCommand:
"make docker-build-dev"
tagPolicy:
customTemplate:
template: 0.1.9-01c818c
manifests:
rawYaml:
- deployment.yaml

deploy:
kubectl:
defaultNamespace: mynamespace
flags:
global:
- --context=some-cluster

```

### Steps to reproduce the behavior

1. a clonable repository with the sample skaffold project
2. `skaffold dev`

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.