Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templating for chartPath does not work #9198

Closed
sakirma opened this issue Nov 29, 2023 · 1 comment · Fixed by #9243
Closed

Templating for chartPath does not work #9198

sakirma opened this issue Nov 29, 2023 · 1 comment · Fixed by #9243
Assignees
Labels
kind/bug Something isn't working priority/p1 High impact feature/bug.

Comments

@sakirma
Copy link

sakirma commented Nov 29, 2023

Expected behavior

chartPath templating should work in the unit test

Actual behavior

chartPath templating pastes directly the {{.FOO}} into the render output

Information

  • Skaffold version: v2.9.0
  • Operating system: OSX
  • Installed via: Cloned the repository and tested on my IDE & Brew
    image
@sakirma
Copy link
Author

sakirma commented Nov 29, 2023

I could be wrong with the unit test. Having read the code, io.Discard is being used. But it does not make sense why my skaffold is receiving the env key instead of the value.

My skaffold looks like this:

apiVersion: skaffold/v4beta8
kind: Config
build:
  tagPolicy:
    customTemplate:
      template: "{{.USER}}_{{.HASH}}"
      components:
        - name: USER
          envTemplate:
            template: "{{.USER}}"
        - name: HASH
          sha256: {}
  artifacts:
    - image: "a image name comes here"
      context: .
      custom:
        buildCommand: "make docker_build_svc SVC={{.SERVICE}}"
        dependencies:
          paths:
            - "."
          ignore:
            - "svc/*/bin/**"
  local:
    push: false
deploy:
  helm:
    releases:
      - name: "{{.SERVICE}}"
        chartPath: "../core/charts/{{.SERVICE}}" # <---- this does not work
        namespace: nid
        upgradeOnChange: true
        valuesFiles:
          - "./default_svc_values.yaml"
          - "./services/{{.SERVICE}}.yaml"
        setValues:
          skaffold: "true"
          environment.LOG_FORMAT.value: "text"
        setValueTemplates:
          name: "{{.SERVICE}}"
          fullnameOverride: "{{.SERVICE}}"
          hosts[0]: "{{.SERVICE}}.{{.CLUSTER_HOST}}"
          image: "an image name comes here"
          imagePullPolicy: Never
          deploymentAnnotations.sidecar\.istio\.io/proxyCPU: "1m"
          deploymentAnnotations.sidecar\.istio\.io/proxyMemory: 16Mi
          istioVersion: "{{.ISTIO_VERSION}}"

The output that I am receiving is:

Starting deploy...
Loading images into kind cluster nodes...
 - an image name comes here -> Found
Images loaded in 49.08925ms
INFO[0002] Deploying with helm v3.12.2 ...               subtask=0 task=Deploy
INFO[0002] Building helm dependencies...                 subtask=0 task=Deploy
Error: could not find ../core/charts/{{.SERVICE}}: stat ../core/charts/{{.SERVICE}}: no such file or directory
deploying "wallet-gql": building helm dependencies: exit status 1

@ericzzzzzzz ericzzzzzzz added priority/p1 High impact feature/bug. kind/bug Something isn't working labels Jan 8, 2024
@ericzzzzzzz ericzzzzzzz self-assigned this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/p1 High impact feature/bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants