Skip to content

Commit

Permalink
check: rename ExcludedCIDRs to ExcludedCIDRsConf
Browse files Browse the repository at this point in the history
rename the ExcludedCIDRs CiliumEgressGatewayPolicyParams field to
ExcludedCIDRsConf to make it more explicit its use case

Signed-off-by: Gilberto Bertin <[email protected]>
  • Loading branch information
jibi committed Jan 5, 2024
1 parent aa15272 commit 9240186
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions connectivity/check/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ type CiliumEgressGatewayPolicyParams struct {
// PodSelectorKind is used to select the client pods. The parameter is used to select pods with a matching "kind" label
PodSelectorKind string

// ExcludedCIDRs controls how the ExcludedCIDRs property should be configured
ExcludedCIDRs ExcludedCIDRsKind
// ExcludedCIDRsConf controls how the ExcludedCIDRsConf property should be configured
ExcludedCIDRsConf ExcludedCIDRsKind
}

// WithCiliumEgressGatewayPolicy takes a string containing a YAML policy
Expand Down Expand Up @@ -529,7 +529,7 @@ func (t *Test) WithCiliumEgressGatewayPolicy(params CiliumEgressGatewayPolicyPar
// Set the excluded CIDRs
pl[i].Spec.ExcludedCIDRs = []v2.IPv4CIDR{}

switch params.ExcludedCIDRs {
switch params.ExcludedCIDRsConf {
case ExternalNodeExcludedCIDRs:
for _, nodeWithoutCiliumIP := range t.Context().params.NodesWithoutCiliumIPs {
if parsedIP := net.ParseIP(nodeWithoutCiliumIP.IP); parsedIP.To4() == nil {
Expand Down
6 changes: 3 additions & 3 deletions connectivity/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,9 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, addExtraTests func(*ch
if versioncheck.MustCompile(">=1.14.0")(ct.CiliumVersion) {
ct.NewTest("egress-gateway-excluded-cidrs").
WithCiliumEgressGatewayPolicy(check.CiliumEgressGatewayPolicyParams{
Name: "cegp-sample-client",
PodSelectorKind: "client",
ExcludedCIDRs: check.ExternalNodeExcludedCIDRs,
Name: "cegp-sample-client",
PodSelectorKind: "client",
ExcludedCIDRsConf: check.ExternalNodeExcludedCIDRs,
}).
WithFeatureRequirements(features.RequireEnabled(features.EgressGateway),
features.RequireEnabled(features.NodeWithoutCilium)).
Expand Down

0 comments on commit 9240186

Please sign in to comment.