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

hull.util.transformation.get converts a string to an integer #276

Closed
khmarochos opened this issue Jan 11, 2024 · 3 comments
Closed

hull.util.transformation.get converts a string to an integer #276

khmarochos opened this issue Jan 11, 2024 · 3 comments

Comments

@khmarochos
Copy link

khmarochos commented Jan 11, 2024

Hello!

It seems that I've found an unexpected (at least by me) scenario when a string is being forcefully converted to an integer by hull.util.transformation.get.

Here's a minimalistic values set:

hull:
  objects:
    job:
      my-job:
        pod:
          containers:
            my-container:
              image:
                registry: my-registry.local
                repository: my-repository
                tag: _HT*image.tag
image:
  tag: "09956e29" # in my "real-world" case this value is just a commit tag, the `image.tag` value is set by the CI pipeline

And here's what I get in spec.template.spec.containers[0].image:

my-registry.local/my-repository:9.956e+32

Can I prevent this behaviour?

Thank you in advance, I'm really sorry for disturbance.

@gre9ory
Copy link
Contributor

gre9ory commented Jan 12, 2024

Hi @khmarochos ,

this looks very much the same as the recent issue here.

There is no convenient solution that can be build in HULL as explained there. If you expect a "problematic" value in one of your fields you should try to take the precautions listed in the other issue.

Hope that clears this up.

@khmarochos
Copy link
Author

Thank you very much.

I definitely should have done some research before opening the issue; in that case, I would have understood that it was a Helm-related issue and found some workaround myself.

I have to admit that my mental capacities have gone extremely low during the last year or two. I've been feeling really dumb lately; I can barely remember what was a day or two ago. :-) I'm very sorry for some of the questions I asked (and keep asking).

Will implement _HT!{{ (index . "$").Values.image.tag | toJson | trimAll "\"" | quote }}.

@gre9ory
Copy link
Contributor

gre9ory commented Jan 12, 2024

No worries, any question is welcome :)

@gre9ory gre9ory closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants