Templated Fields  beta 

Skaffold allows for certain fields in the config to be templated with values either from environment variables, or certain special values computed by Skaffold.

build:
  tagPolicy:
    envTemplate:
      template: "{{.IMAGE_NAME}}:{{.FOO}}"
  artifacts:
  - image: gcr.io/k8s-skaffold/example

Suppose the value of the FOO environment variable is v1, the image built will be gcr.io/k8s-skaffold/example:v1.

List of fields that support templating:

Please note, this list is not exhaustive.

List of variables that are available for templating:

  • all environment variables passed to the Skaffold process at startup
  • IMAGE_NAME - the artifacts’ image name - the image name rewriting acts after the template is calculated