Accessing active Skaffold profiles as templated fields

21 Views Asked by At

In my skaffold.yml I want to have multiple profiles to build frontend and backend and deploy them individually on test or prod. When I run skaffold deploy --profile backend,test I want to deploy the backend on my test environment. How can I access the active profiles as template fields?

e.g.

deploy:
  helm:
    releases:
      - name: "my-{{.SKAFFOLD_PROFILE[0]}}-service" #should become 'my-backend-service'
        setValues:
          route.prefix: "{{.SKAFFOLD_PROFILE[0]}}-{{.SKAFFOLD_PROFILE[1]}}" #should become 'backend-test'
0

There are 0 best solutions below