Skip to content
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

chore(kumactl) improve flags description, add extra validation #2352

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

lobkovilya
Copy link
Contributor

Summary

Some minor chores for kumactl install transparent-proxy command.

Full changelog

  • fix typo in the class name
  • delete flag --modify-iptables, correct me if I'm wrong but what's the point running kumactl install transparent-proxy with --modify-iptables=false
  • add validation to avoid --redirect-dns and --redirect-all-dns-traffic passed at the same time
  • improve descriptions for the flags

Issues resolved

Fix #XXX

Documentation

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

Backwards compatibility

  • Add backport-to-stable label if the code is backwards compatible. Otherwise, list breaking changes.

Signed-off-by: lobkovilya <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya requested a review from a team as a code owner July 12, 2021 11:16
Signed-off-by: Ilya Lobkov <lobkovilya@yandex.ru>
@codecov-commenter
Copy link

Codecov Report

Merging #2352 (6aeec4e) into master (82c6818) will increase coverage by 0.37%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2352      +/-   ##
==========================================
+ Coverage   52.14%   52.51%   +0.37%     
==========================================
  Files         875      879       +4     
  Lines       47801    47841      +40     
==========================================
+ Hits        24925    25125     +200     
+ Misses      20855    20669     -186     
- Partials     2021     2047      +26     
Impacted Files Coverage Δ
...p/kumactl/cmd/install/install_transparent_proxy.go 64.79% <63.63%> (-0.18%) ⬇️
pkg/insights/components.go 70.00% <0.00%> (-30.00%) ⬇️
pkg/mads/v1/client/client.go 41.25% <0.00%> (-2.50%) ⬇️
api/observability/v1/mads.pb.go 34.53% <0.00%> (-1.04%) ⬇️
pkg/insights/resyncer.go 64.70% <0.00%> (-0.85%) ⬇️
...k8s/native/controllers/proxytemplate_controller.go 0.00% <0.00%> (ø)
api/internal/util/proto/types.go 100.00% <0.00%> (ø)
...kg/plugins/resources/k8s/native/pkg/test/within.go 100.00% <0.00%> (ø)
api/internal/util/proto/proto.go 70.00% <0.00%> (ø)
pkg/xds/generator/direct_access_proxy_generator.go 83.90% <0.00%> (+1.14%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82c6818...6aeec4e. Read the comment docs.

return errors.Errorf("--kuma-dp-user or --kuma-dp-uid should be supplied")
}

if args.RedirectAllDNSTraffic && args.RedirectDNS {
return errors.Errorf("one of --redirect-dns or --redirect-all-dns-traffic should be specified")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd phrase this as

Suggested change
return errors.Errorf("one of --redirect-dns or --redirect-all-dns-traffic should be specified")
return errors.Errorf("exactly one of --redirect-dns or --redirect-all-dns-traffic should be specified")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of them is also a valid case, I think I probably should do only one of ...?

Copy link
Contributor

@bartsmykla bartsmykla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lobkovilya lobkovilya merged commit 4aa8ec3 into master Jul 14, 2021
@lobkovilya lobkovilya deleted the fix/transparent-proxy-flags branch July 14, 2021 07:19
mergify bot pushed a commit that referenced this pull request Jul 14, 2021
bartsmykla pushed a commit that referenced this pull request Jul 14, 2021
#2365)

(cherry picked from commit 4aa8ec3)

Co-authored-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants