-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make IMAGE_REPO and IMAGE_TAG templated values in custom build and helm deploy #4278
Conversation
… IMAGE_REPO, IMAGE_TAG & IMAGE_DIGEST for helm deploy
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a quick first pass, but I'm not a Helm expert.
@@ -554,18 +536,34 @@ func installArgs(r latest.HelmRelease, builds []build.Artifact, valuesSet map[st | |||
args = append(args, "--set-string", value) | |||
} | |||
|
|||
args, err = constructOverrideArgs(&r, builds, args, func(k string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tstromberg currently skaffold render
for helm passes empty values for image.name
and image.tag
. Also it skips over --set-file
. Shouldn't deploy
and render
lead to identical kubernetes yaml files? That's what I assumed and extracted the common constructOverrideArgs
method. Let me know if that shouldn't be the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems logical to me that deploy and render should yield identical manifests, but there are likely corner cases to be considered. @nkubala - thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some upcoming features to render
that will shift the paradigms a bit from the conventional deploy
flow, but for the most part they should be going through the same code paths so this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code is LGTM. I'll defer to @nkubala for alignment with Skaffold's principles.
@@ -554,18 +536,34 @@ func installArgs(r latest.HelmRelease, builds []build.Artifact, valuesSet map[st | |||
args = append(args, "--set-string", value) | |||
} | |||
|
|||
args, err = constructOverrideArgs(&r, builds, args, func(k string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems logical to me that deploy and render should yield identical manifests, but there are likely corner cases to be considered. @nkubala - thoughts?
@@ -554,18 +536,34 @@ func installArgs(r latest.HelmRelease, builds []build.Artifact, valuesSet map[st | |||
args = append(args, "--set-string", value) | |||
} | |||
|
|||
args, err = constructOverrideArgs(&r, builds, args, func(k string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some upcoming features to render
that will shift the paradigms a bit from the conventional deploy
flow, but for the most part they should be going through the same code paths so this is fine.
Make IMAGE_REPO and IMAGE_TAG templated values in custom build and helm deploy
Fixes: #3343
Description
User facing changes (remove if N/A)
From newly added example project templated-fields:
IMAGE_REPO
andIMAGE_TAG
are available as templated fields inbuild.sh
fileand also in the
helm
deploy section of the skaffold config, which configures artifactskaffold-templated
to build withbuild.sh
: