Repository navigation
Environment variable for setting the max history for an environment - #8369
Conversation
16e9248 to
f50deda
Compare
|
I'm a little confused, if other modules (such as rollback) want to use this method, |
|
Line 105 in 9b90e84 |
bbb4b83 to
c9c16b1
Compare
Thanks for reply, done. |
4e312f7 to
3140597
Compare
79ca795 to
7659b82
Compare
hickeyma
left a comment
There was a problem hiding this comment.
Sorry for the confusion here. My comment in #8369 (comment) is an observation. I would prefer to change it to MaxHistory but I think because of the flag which cannot be changed until Helm 4, we should follow the naming for consistency.
@wawa0210 Do you mind changing it back?
What we change is only the name of the environment variable, not the name of the command line flag~ Will this affect? If there is a negative impact, I can try to roll back |
|
I am ok with the naming now. |
0f3d323 to
7268a9e
Compare
It seems that all problems have been fixed, can you help approve? |
|
@hickeyma do you think the new environment variable, since it is user-facing, should use the same name as the flag? So HELM_HISTORY_MAX? I'm not convinced it is essential but I wanted to ask. |
|
@hickeyma @marckhouzam @liuming-dev All questions have been answered, can you help approve? |
hickeyma
left a comment
There was a problem hiding this comment.
Nearly there @wawa0210, thanks. A few small nits and need to add the variable and description to https://github.com/helm/helm/blob/master/cmd/helm/root.go#L52
| "HELM_KUBECONTEXT": s.KubeContext, | ||
| "HELM_KUBETOKEN": s.KubeToken, | ||
| "HELM_KUBEAPISERVER": s.KubeAPIServer, | ||
| "HELM_MAX_HISTORY": strconv.Itoa(s.MaxHistory), |
There was a problem hiding this comment.
Move just after HELM_NAMESPACE because comment applies to the kube vars
There was a problem hiding this comment.
Feeling your feedback, done.
| RepositoryCache string | ||
| // PluginsDirectory is the path to the plugins directory. | ||
| PluginsDirectory string | ||
| // MaxHistory is the name of the env var for setting max history. |
There was a problem hiding this comment.
MaxHistory is the name of the env var for setting max history. --> MaxHistory is the max release history maintained.
Thought about it alright @marckhouzam and its something I deliberated over. I think it can remain as its a new variable and I would hope the flag would be changed in Helm 4 to be more descriptive. |
|
I am still a little unconvinced that the env variable needs to be global in the code (i.e. in |
|
@wawa0210 If you can updated this asap, we can try and get it into the 3.3.0 release. It is dues the RC today I think. |
@hickeyma I guess it depends on if we want to apply the Max history logic to |
|
we're cutting rc.1 in a few hours, so we'll have to move this over to the 3.4.0 milestone. |
Yes, this should also be made available for |
Sorry, I didn't have time to update yesterday, maybe the time is too late to 3.3.0 release |
hickeyma
left a comment
There was a problem hiding this comment.
It is nearly there @wawa0210. Do you mind adding a unit test in https://github.com/helm/helm/blob/master/pkg/cli/environment_test.go to test for the variable?
That's ok. It can go into 3.4. |
Added, troublesome review again |
Signed-off-by: wawa0210 <[email protected]>
|
is this feature included in 3.3.0? Will be included on the next release? |
|
@pchico83 this feature is not in the 3.3 release but will be part of 3.4 |
What this PR does / why we need it:
Environment variable for max release history
Special notes for your reviewer:
fix #8367
If applicable: