Giter Club home page Giter Club logo

Comments (5)

jbielick avatar jbielick commented on July 1, 2024

Yep, image.repository and image.tag are interpolated for the deployment here:

image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

I have no suggestions based on the code sample you provided. There are a lot of ways to provide values in helm, so that may have something to do with what you're seeing.

from charts.

jbielick avatar jbielick commented on July 1, 2024

I've added some tests that I believe verify things work correctly.

@test "$name: uses correct image tag" {
template_with_defaults $name
[ "$status" -eq 0 ]
local actual=$(get '.spec.template.spec.containers[] | select(.name == "web") | .image')
[ "$actual" = "ansible/awx:17.1.0" ]
}
@test "$name: uses custom image tag" {
template_with_defaults $name --set image.tag=16.0.0
[ "$status" -eq 0 ]
local actual=$(get '.spec.template.spec.containers[] | select(.name == "web") | .image')
[ "$actual" = "ansible/awx:16.0.0" ]
}
@test "$name: task uses correct image tag" {
template_with_defaults $name
[ "$status" -eq 0 ]
local actual=$(get '.spec.template.spec.containers[] | select(.name == "task") | .image')
[ "$actual" = "ansible/awx:17.1.0" ]
}
@test "$name: task uses custom image tag" {
template_with_defaults $name --set image.tag=16.0.0
[ "$status" -eq 0 ]
local actual=$(get '.spec.template.spec.containers[] | select(.name == "task") | .image')
[ "$actual" = "ansible/awx:16.0.0" ]
}

Let me know if I've missed something.

from charts.

gmisura avatar gmisura commented on July 1, 2024

@jbielick
I agree your test proves it is working, but doesn't explain how the values.yaml should be constructed to override the tag.
I've tried both

image:
tag: "16.0.0"

and

image.tag: "16.0.0"

and I still end up with v17.x

from charts.

jbielick avatar jbielick commented on July 1, 2024

@gmisura there are quite a few ways of providing values to helm and using this chart. In my experience, some combination of how you're using -f (values file), --set and how and what order those command line args and files are being read is usually the issue in situations like this.

Since I have no info about how you're invoking helm, how you're providing or layering values files, what command line flags you're providing to helm, I simply cannot provide any additional insight.

The tests demonstrate that when the values are provided via the command-line as image.tag, the chart works correctly. Unless I've missed something egregious, the problem likely exists in your invocation of helm and using this chart.

If you can provide a minimal reproducible case, I might be able to help find your issue.

Here's a minimal reproducible case of things working correctly:

› cat test.yaml
image:
  tag: "1.2.3"
› helm install adwerx/awx \
    --dry-run --debug --generate-name \
    --set defaultAdminExistingSecret=test \
    --set secretKeyExistingSecret=test \
    --set postgresqlExistingSecret=test \
    --set postgresql.postgresqlPassword='abc' \
    -f test.yaml | grep ansible/awx 
install.go:172: [debug] Original chart version: ""
install.go:189: [debug] CHART PATH: /Users/me/Library/Caches/helm/repository/awx-3.2.1.tgz

  repository: ansible/awx
          image: "ansible/awx:1.2.3"
          image: "ansible/awx:1.2.3"

from charts.

gmisura avatar gmisura commented on July 1, 2024

What the heck? I tried exactly that and it didn't work before and now it does! Shesh.
Thanks

from charts.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.