Skip to content

Conversation

@simcod
Copy link

@simcod simcod commented Dec 11, 2025

Description

Allows specifying an initial rule set for firewall creation.

Code extracted from: #64

@metal-robot metal-robot bot added the area: gardener Affects the gardener area. label Dec 11, 2025
@simcod simcod added the area: cluster-api Affects the cluster-api area. label Dec 11, 2025
@simcod simcod marked this pull request as ready for review December 11, 2025 09:36
@simcod simcod requested a review from a team as a code owner December 11, 2025 09:36
@vknabel vknabel force-pushed the initial-firewall-ruleset-v2 branch from a4e5cb2 to fd56c1b Compare January 8, 2026 12:18
@vknabel vknabel requested a review from Gerrit91 January 8, 2026 12:18
Copy link
Contributor

@Gerrit91 Gerrit91 left a comment

Choose a reason for hiding this comment

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

Looks really good, just one remark.

// Protocol constraints the protocol this rule applies to.
Protocol NetworkProtocol `json:"protocol"`
// To source address cidrs this rule applies to.
To []string `json:"to"`
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not have to be 100% complete (this is done by metal-api anyway) but maybe some very basic validation would be nice to prevent misconfiguration. The validations can be found api/v2/validation/firewall.go.

For me it would be sufficient to add:

  • Valid protocol
  • Valid CIDRs
  • Valid port range

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

Labels

area: cluster-api Affects the cluster-api area. area: gardener Affects the gardener area.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants