Skip to content

Skaffold Profile doesn't allow to patch /deploy/helm/releases/0/setValues/global/namespace  #6908

Closed
@rstoermer

Description

Expected behavior

Skaffold id patching the path

Actual behavior

I get the following error:

parsing skaffold config: failed to apply profiles to config "" defined in file "/Users/rene/repos/project/service/skaffold.yaml": applying profile "remote": invalid path: /deploy/helm/releases/0/setValues/global/namespace. There's an issue with one of the profiles defined in config "" in file "/Users/rene/repos/project/service/skaffold.yaml"; refer to the documentation on how to author valid profiles: https://skaffold.dev/docs/environment/profiles/.

Information

  • Skaffold version: v1.35.1
  • Operating system: OSX 11.6.1
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta26
kind: Config
build:
    local:
        push: false
        useDockerCLI: false
        useBuildkit: true
    artifacts:
        - image: registry/service
          context: .
          docker:
              dockerfile: Dockerfile
              target: local
              buildArgs:
                  NPM_TOKEN: "{{ .NPM_TOKEN }}"
          sync:
              manual:
                  # Sync all folders relevant for application development
                  - src: "src/**"
                    dest: .
deploy:
    kubeContext: docker-desktop
    helm:
      releases:
        - name: service-local
          chartPath: ../infrastructure/helm/project/localcharts/service/
          valuesFiles: ["../infrastructure/helm/project/values.yaml"]
          namespace: project-local
          setValues:
            global:
              namespace: project-local
          artifactOverrides:
              image: registry/service
portForward:
  - resourceType: deployment
    resourceName: service-deployment
    namespace: project-local
    port: 1234
    localPort: 1234
profiles:
  - name: remote
    patches:
      - op: replace
        path: /deploy/kubeContext
        value: remote-cluster
      - op: replace
        path: /deploy/helm/releases/0/setValues/global/namespace
        value: new-namespace
      - op: replace
        path: /portForward/0/namespace
        value: new-namespace

Steps to reproduce the behavior

  1. a clonable repository with the sample skaffold project
  2. skaffold <command>
  3. ...

Metadata

Assignees

No one assigned

    Labels

    area/profileskind/bugSomething isn't workingneeds-reproductionneeds reproduction from the maintainers to validate the issue is truly a skaffold bugpriority/awaiting-more-evidenceLowest Priority. May be useful, but there is not yet enough supporting evidence.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions