Skip to content

Conversation

@robo-cap
Copy link
Member

Add option to create NSGs with stateless rules.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 29, 2025
@robo-cap robo-cap requested a review from hyder October 29, 2025 13:20
@hyder
Copy link
Contributor

hyder commented Nov 19, 2025

Can you please elaborate why:

  1. we need stateless rules here
    2)all rules need to be stateless?

@robo-cap
Copy link
Member Author

Can you please elaborate why:

  1. we need stateless rules here
    2)all rules need to be stateless?
  1. With this PR I want to provide the option to choose between stateful and stateless rules via the use_stateless_rules variable.
  2. Stateless rules will be used by default for the ease of setup and troubleshooting.
  3. Egress rules to 0.0.0.0/0 from pods and worker nodes will be stateful independent of the value for use_stateless_rules variable because of security concerns.
  4. It's recommended to use stateless rules for large clusters.
  5. I strongly recommend for stateless rules setup to be tested before using it in production. This is why for now it is considered EXPERIMENTAL.

@eshneken
Copy link

eshneken commented Dec 3, 2025

+1 on the value of this. We've had a few situations working with customers where they used the TF modules and then had to redo the NSGs to make them stateless due to running into performance issues.

) : {}
)

bastion_stateless_rules = merge(
Copy link
Contributor

Choose a reason for hiding this comment

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

Bastion and operator are used for admin/troubleshooting purposes. I don't see the need to make their rules stateless.

protocol = local.icmpv6_protocol, source = local.worker_nsg_id, source_type = local.rule_type_nsg,
},
} : {},
local.operator_nsg_enabled ? {
Copy link
Contributor

Choose a reason for hiding this comment

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

as above, operator is for troubleshooting. do we really need this rule to be stateless? maybe for the bastion and operator, just create them separately?

Copy link
Contributor

@hyder hyder left a comment

Choose a reason for hiding this comment

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

Let me know what you think about the bastion and operator rules for stateless and then I'll test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants