Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Fix helm related float bug when using -set option #32

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

LEQADA
Copy link
Contributor

@LEQADA LEQADA commented Oct 4, 2018

Description

In the travis.yml file we usually declare a global environment variable COMMIT_HASH as a first 8 characters of the commit hash.
Although often there is at least 1 non-numeric character in first 8 characters of a commit hash, sometimes it happens to be a valid number like **44038821**8fb11dcb6649b03f69d0eb3010260cd1.
Later we create an image with a tag which is the truncated commit hash and put to the Container Registry. Then we use this tag to push an image using Helm.

Because of the bug in Helm --set image.tag="$COMMIT_HASH" will be processed as a valid float type variable and become 4.4038821e+07 and later will end up as an error on Kubernetes

couldn't parse image reference "XXX:4.4038821e+07": invalid reference format.
Error: InvalidImageName

In version 2.9.0 to fix this problem Helm introduced another flag to pass a string called --set-string.

Solution

In this PR I change Helm version to the latest one 2.9.1 and replace --set with --set-string in helm upgrade command

@LEQADA LEQADA requested a review from lojzatran October 4, 2018 16:07
@LEQADA LEQADA merged commit e46dfec into master Oct 4, 2018
@LEQADA LEQADA deleted the fix-helm-float-bug branch October 4, 2018 16:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants