-
Notifications
You must be signed in to change notification settings - Fork 192
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
implement helm get values with sysdump #1889
implement helm get values with sysdump #1889
Conversation
Commit bfc2d79 does not contain "Signed-off-by". Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin |
bfc2d79
to
8c99872
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.
This looks great overall. I have a few comments regarding names and error messages.
Please re-request my review if you end up waiting on me!
If we want hornor Add: helmDriver := ""
logger := func(format string, v ...interface{}) {}
k8sClient.RESTClientGetter.Namespace = sysdumpOptions.CiliumNamespace
if err := k8sClient.HelmActionConfig.Init(&k8sClient.RESTClientGetter, sysdumpOptions.CiliumNamespace, helmDriver, logger); err != nil {
return fmt.Errorf("failed to init helm action config: %w", err)
} below cilium-cli/internal/cli/cmd/sysdump.go Lines 32 to 35 in ccc2fcb
Not sure if there are other side effects, whether it will affect other commands, because I know nothing about cilium-cli, sorry😣 |
thanks for the reply. I don't quite understand why we need init the NS twice here and I see we dont need to worry about NS in the RESTClientGetter here Lines 125 to 130 in b98ada8
By the way, |
Oh...this project is using the We need switch kubeClient namespace as well. Because in https://github.com/helm/helm/blob/37cc2fa5cefb7f5bb97905b09a2a19b8c05c989f/pkg/action/action.go#L370 See: |
f632d98
to
3bef6c6
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.
Looks great for the most part.
Can you squash the commits down to 1 or 2 commits? Maybe with supporting the additional namespace flag as the second commit.
It's also important that the CLI is fully usable after each commit, which might be one reason to squash down to 1.
a1fc630
to
045aec4
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.
One style comment, otherwise LGTM
include the helm get values in the sysdump collecting, and it will try to grab the user provide value and write to a file. when users provides a sysdump file, we don't have to ask the user to submit a separate helm value file. in this implementation, we just grab the latest value and user provide values for cilium. in the future, there can be more enhancement for this. we can provide more options to collect previous version or the rendered helm values for everything. Signed-off-by: liyi huang <liyi.huang@isovalent.com>
045aec4
to
0ae0bf1
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.
LGTM ✅
include the helm get values in the sysdump collecting, and it will try to grab the user provide value and write to a file. when users provides a sysdump file, we don't have to ask the user to submit a separate helm value file.
in this implementation, we just grab the latest value and user provide values for cilium. in the future, there can be more enhancement for this.
btw, this is my first golang/OSS PR. feel free to let me know what I can do to make this better