-
Notifications
You must be signed in to change notification settings - Fork 3
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: natgateway flowlogs rules #94
Conversation
if new_rules != nil { | ||
*rules = append(*rules, *new_rules.Items...) | ||
} |
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.
I think, if the user specifies some custom nat rules, then it should override the default ones, instead of adding to them?
For example, currently, I think there is no way of closing, for example, the default port 10250 TCP
docs/usage/options.md
Outdated
@@ -50,6 +50,8 @@ Available Options for the IONOS Cloud Docker Machine Driver: | |||
| `--ionoscloud-create-nat` | Create a new NAT with some default open ports | | |||
| `--ionoscloud-nat-public-ips` | If --ionoscloud-create-nat is set, change the NAT's public IPs to these values | | |||
| `--ionoscloud-nat-lans-to-gateways` | If --ionoscloud-create-nat is set, change the NAT's mappings of LANs to Gateway IPs to these values. Must respect format `1=10.0.0.1,10.0.0.2:2=10.0.0.10` | | |||
| `--ionoscloud-nat-flowlogs` | If --ionoscloud-create-nat is set, add flowlogs to the nat. Must respect format `name:action:direction:bucket`, | | |||
| `--ionoscloud-nat-rules` | If --ionoscloud-create-nat is set, add rules to the NAT. Must respect format `name:type:protocol:public_ip:source_subnet:target_subnet:target_port_range_start:target_port_range_end`, to skip providing an optional value just omit it (`name:type:protocol::source_subnet:::`), not setting public IP will use the public IP of the NAT for the rule | |
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.
it would be nice to add that the user can add multiple rules by separating these string models via ,
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 should add another --ionoscloud-nat-rules with a second rule and an array will be formed
using "," would result in an error if i remember correctly as the whole array is passed as a string
#97) * feat: added option to skip adding default nat rules, changed default target subnet * test: remove sleep, fix tests * fix: check error first * doc: updated docs with new ionoscloud-skip-default-nat-rules flag
Kudos, SonarCloud Quality Gate passed! |
What does this fix or implement?
fixes #93 and #46
Checklist
feat:
/fix:
/doc:
/test:
/refactor:
)