Skip to content

skaffold render doesn't support helm chart version templating #9937

@magichuihui

Description

@magichuihui

Expected behavior

The version of helm charts should be able to be templated when we use skaffold render, as it's supported in skaffold deploy.

Actual behavior

skaffold render will return error if we want to expand the version of helm chart from environment variables.

Take this simple config as an example

apiVersion: skaffold/v4beta12
kind: Config
metadata:
  name: istio-release
deploy:
  helm:
    releases:
    - name: istiod
      namespace: istio-release
      createNamespace: true
      remoteChart: oci://gcr.io/istio-release/charts/istiod
      version: "{{.ISTIO_VERSION}}"
      wait: true

Steps to reproduce the behavior

Run skaffold render with the above config.

export ISTIO_VERSION=1.28.0
skaffold render

it will return the following error:

Failed to render release: Error: improper constraint: {{.ISTIO_VERSION}}
(releaseName="istiod", args=[template istiod oci://gcr.io/istio-release/charts/istiod --version {{.ISTIO_VERSION}} --namespace istio-release])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions