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

feat: Introduce --no-default-rules flag, deprecate --create-rules #462

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Praveen005
Copy link
Contributor

@Praveen005 Praveen005 commented Sep 6, 2024

This PR addresses the issue in #446

In here, I,

  • Added a new --no-default-rules flag to control default firewall rule creation.
  • Marked --create-rules as deprecated but kept for backward compatibility.
  • Added a deprecation warning for --create-rules usage.
  • Error out when both the flags are used simultaneously.
  • Updated the documentation to reflect the changes.

Why deprecate --create-rules flag ?

If we see the documentation, it seems --create-rules was introduced to give users a way to create firewalls without any default firewall rules set.

image

But, now that we have --no-default-rules flag, deprecating (not removing) --create-rules I feel is the obvious next step here.

Note: when a flag is deprecated, It continues to function but does not show up in help or usage messages.


Result:

  1. Firewall correctly created with default rules without --create-rules flag
Screenshot 2024-09-06 194631

2.When we use --create-rules flag, a warning message flashes, but default rule still gets created as before.

Screenshot 2024-09-06 195339 image
  1. Backward compatibility not getting affected:
image
  1. Firewall correctly getting created with --no-default-rules
Screenshot 2024-09-06 195446
  1. No firewall rules applied with --no-default-rules flag
Screenshot 2024-09-06 195526
  1. Error out when both flags are used:
image
  1. Updated Documentation
Screenshot 2024-09-06 200008

- Add new --no-default-rules flag to control default firewall rule creation.
- Mark --create-rules as deprecated but keep for backward compatibility.
- Add deprecation warning for --create-rules usage.
- Update documentation to reflect new flag.
@Praveen005
Copy link
Contributor Author

Hi @uzaxirr,

This PR is ready for review. Whenever you have a moment, could you please take a look at it?

Thank you!

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.

1 participant