-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support defining image paths for HelmReleases #2249
Conversation
f47bacc
to
a214627
Compare
Where, The use of subdomains (as opposed to e.g. a path) to denote what you are specifying seems a bit funky, but we probably can't do better due to the restrictions of the annotation syntax imposed by k8s. Maybe we could add another subdomain to make it more clear? e.g. |
Correct, this is the most Kubernetes native approach to defining the mapping and is conform their specifications for annotations.
Can not decide if the clarity improvement would weight up to the annoyance of a really long annotation key. |
2df534b
to
11ee161
Compare
11ee161
to
a6d7501
Compare
a6d7501
to
4e22bc8
Compare
05e55af
to
27648fa
Compare
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.
Mostly just suggestions. One item that does need a revision, or a rebuttal: shouldn't SetWorkloadContainerImage fail if it finds annotations but can't make sense of them?
// By using github.com/ghodss/yaml to unmarshal HelmReleases. | ||
// This effectively results in all keys of `Value`s being strings | ||
// and not interface{}. | ||
if err := jsonyaml.Unmarshal(bytes, &fhr); err != nil { |
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.
Does this mean the mapper
stuff above can be removed?
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.
Above where? Quite a lot of 'mapper' things on this page...
27648fa
to
c6739bd
Compare
This commit adds support for supplying image paths for `HelmRelease` resources through annotations, and introduces a new alias for image tag filters. For an image mapping to be valid, the image path _must_ be defined and _may_ be supplemented by a tag and/or registry path.
c6739bd
to
38d69c5
Compare
The `kubeyaml set` command used to update values by YAML dot notation path was introduced in this version.
38d69c5
to
e272223
Compare
And switch to the `fluxcd.io` domain for all annotations.
e272223
to
32cb1c3
Compare
This commit adds support for supplying image paths for
HelmRelease
resources through annotations, and introduces a new alias for image
tag filters.
For an image mapping to be valid, the image path must be defined
and may be supplemented by a tag and/or registry path. In case
the combination of resolved values does not result in a valid image
ref, the mapping will be ignored.
Supported annotations:
registry.fluxcd.io/<alias>: <registry path>
repository.fluxcd.io/<alias>: <image path>
tag.fluxcd.io/<alias>: <tag path>
filter.fluxcd.io/<alias>: <tag filter>
Image mappings are composed by
<alias>
.A valid annotation mapping is for example:
which would map the image for the following
values
structure:This PR is in need of
squaremo/kubeyaml#11squaremo/kubeyaml#14 to persist the actual changes to git.Fixes: #1262