-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
feat: add labels for helm release #1046
base: main
Are you sure you want to change the base?
Conversation
c33c17d
to
39bcf40
Compare
@@ -2563,6 +2571,8 @@ func (st *HelmState) flagsForUpgrade(helm helmexec.Interface, release *ReleaseSp | |||
|
|||
flags = st.appendHelmXFlags(flags, release) | |||
|
|||
flags = st.appendLabelsFlags(flags, helm, release) |
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.
The release label in helmfile only allows users to choose release. Is it necessary to add it to helm installation parameters?
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.
see: helm/helm#10533
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
2b16d1b
to
918d5a7
Compare
@mumoshu WDYT? Looking forward to your feedback. thanks so much. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Signed-off-by: yxxhero <[email protected]>
918d5a7
to
62026c0
Compare
{ | ||
name: "empty label value", | ||
labels: map[string]string{"foo": ""}, | ||
want: "foo=null", |
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.
want: "foo=null", | |
want: "foo=", |
Probably we want this presuming "null" and ""(empty string) are two different things and it's actually an empty string here
for _, k := range keys { | ||
val := labels[k] | ||
if val == "" { | ||
val = "null" |
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.
func (st *HelmState) SelectReleases(includeTransitiveNeeds bool) ([]Release, error) { | ||
values := st.Values() | ||
rs, err := markExcludedReleases(st.Releases, st.Selectors, st.CommonLabels, values, includeTransitiveNeeds) | ||
rs, err := markExcludedReleases(st.Releases, st.Selectors, values, includeTransitiveNeeds) |
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.
Hmmm.. not ideal but probably we'd better do assign releases with labels here so that we won't accidentally miss calling GetReleasesWithLabels()
rs, err := markExcludedReleases(st.Releases, st.Selectors, values, includeTransitiveNeeds) | |
st.Releases = st.GetReleasesWithLabels() | |
rs, err := markExcludedReleases(st.Releases, st.Selectors, values, includeTransitiveNeeds) |
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.
And make it a private func getReleasesWithLabels
so that it is clearer that the function is not supposed to be called by the consumer of State
Any update on this? @yxxhero |
helm/helm#10533