-
Notifications
You must be signed in to change notification settings - Fork 433
feat: add ipsets to supportbundle #7552
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Anis KHALFALLAH <[email protected]>
| return nil, fmt.Errorf("error saving ipset: %w, output: %s", err, string(output)) | ||
| } | ||
| return output, 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.
missing new line in the end.
| return writeFile(d.fs, filepath.Join(basedir, "iptables"), "iptables", data) | ||
| } | ||
|
|
||
| func (d *agentDumper) dumpIPSets(basedir string) error { |
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.
Can you check and add unit tests for the new function?
|
|
||
| ListEntries(name string) ([]string, error) | ||
|
|
||
| Save() ([]byte, error) |
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.
You need to update the mock code in pkg/agent/util/ipset/testing/mock_ipset.go since you added the method Save().
| return writeFile(d.fs, filepath.Join(basedir, "iptables"), "iptables", data) | ||
| } | ||
|
|
||
| func (d *agentDumper) dumpIPSets(basedir string) error { |
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 (d *agentDumper) dumpIPSets(basedir string) error { | |
| func (d *agentDumper) dumpIPSet(basedir string) error { |
Summary :
Added ipsets information to supportbundle
Component:
pkg/support/dump_others.gopkg/agent/util/ipset/ipset.goCloses #7517