Yaml file parses correctly and directory syncing works.
Parse error on the latest version. No more directory sync.
A little while ago I approached skaffold with an issue syncing entire directories. I was instructed to use an undocumented pattern ***/*.js. That worked, but it appears that pattern has been removed on the latest version so I'm looking for a solution to be able to do that again?
apiVersion: skaffold/v1beta10
kind: Config
build:
local:
push: false
artifacts:
- image: test/dev-client
docker:
dockerfile: Dockerfile.dev
context: ./client
sync:
'***/*.css': .
'***/*.scss': .
'***/*.js': .
'***/*.less': .
- image: test/dev-server
docker:
dockerfile: Dockerfile.dev
context: ./server
sync:
'***/*.py': .
deploy:
kubectl:
manifests:
- k8s-dev/client-deployment.yaml
- k8s-dev/server-deployment.yaml
skaffold devFATA[0000] creating runner: parsing skaffold config: unable to parse config: yaml: unmarshal errors:
line 12: field ***/*.css not found in type latest.Sync
line 13: field ***/*.scss not found in type latest.Sync
line 14: field ***/*.js not found in type latest.Sync
line 15: field ***/*.less not found in type latest.Sync
line 21: field ***/*.py not found in type latest.Sync
The sync config was improved with version v1beta10. The easiest fix is to change your config version to v1beta9 and call skaffold fix. Skaffold will update your sync config for you.
@corneliusweig thank you! Very help and solved my issue.
@corneliusweig
So this is the proper approach now for the triple star?
manual:
- src: '**/*.css'
dest: .
- src: '**/*.scss'
dest: .
- src: '**/*.js'
dest: .
- src: '**/*.less'
dest: .
docker:
Just checking that "dest" is meant to be empty?
Yes this is correct. Please see https://skaffold.dev/docs/how-tos/filesync/ for details.
@corneliusweig thanks for the info and link.
I've noticed now that I'm back to the problem I had previously when files get flattened ever since making this change.
However, the current filesync documentation found here doesn't show anything about preserving that file structure that the triple asterisk used to accomplish. https://skaffold.dev/docs/how-tos/filesync/
Any thoughts on how I can get this back in there?
I updated my skaffold version to v1beta11 and it seems to be working better now...tough to confirm though. On v1beta10 this was definitely an issue though.
The directory structure will always be preserved. Flattening is completely gone.
Are you still experiencing an issue with sync or does everything work as expected? I lost track of what you are trying to accomplish.
@corneliusweig seems to be working a little more fluidly today. Perhaps there was something going on with my cache or I didn't have something setup properly. Will continue to watch it, but we can consider this closed for now!
Thanks for your help.