Expected behavior
skaffold fix should correctly update yaml paths to take account of v1->v2 changes.
Actual behavior
At least for me it seems to be producing an invalid config, that causes an error when run.
Information
- Skaffold version: v2.2.0
- Operating system: Ubuntu
- Installed via: Google Cloud SDK
- Contents of skaffold.yaml:
apiVersion: skaffold/v1
kind: Config
metadata:
name: demo-service
build:
artifacts:
- image: my-image
docker: {}
deploy:
kubectl:
manifests:
- k8s/env_configmap.yaml
profiles:
- name: test-profile
patches:
- op: replace
path: /deploy/kubectl/manifests/0
value: k8s/test_configmap.yaml
Steps to reproduce the behavior
Paste the above skaffold file into an empty directory and run skaffold fix. This produces:
apiVersion: skaffold/v4beta3
kind: Config
metadata:
name: demo-service
build:
artifacts:
- image: my-image
docker: {}
manifests:
rawYaml:
- k8s/env_configmap.yaml
deploy:
kubectl: {}
profiles:
- name: test-profile
patches:
- op: replace
path: /manifests/rawYaml/manifests/0
value: k8s/test_configmap.yaml
The path in the new patch - /manifests/rawYaml/manifests/0 is incorrect. It should just be /manifests/rawYaml/0.
Trying to deploy the config results in this error:
parsing skaffold config: failed to apply profiles to config "demo-service" defined in file "/home/mike/testing/skaffold.yaml": applying profile "test-profile": invalid path: /manifests/rawYaml/manifests/0. There's an issue with one of the profiles defined in config "demo-service" in file "/home/mike/testing/skaffold.yaml"; refer to the documentation on how to author valid profiles: https://skaffold.dev/docs/environment/profiles/.
Expected behavior
skaffold fix should correctly update yaml paths to take account of v1->v2 changes.
Actual behavior
At least for me it seems to be producing an invalid config, that causes an error when run.
Information
Steps to reproduce the behavior
Paste the above skaffold file into an empty directory and run
skaffold fix. This produces:The path in the new patch -
/manifests/rawYaml/manifests/0is incorrect. It should just be/manifests/rawYaml/0.Trying to deploy the config results in this error: