Skip to content

CORENET-6813: Add config override for allow-icmp-network-policy#2920

Open
arkadeepsen wants to merge 1 commit intoopenshift:masterfrom
arkadeepsen:allow-icmp-netpol
Open

CORENET-6813: Add config override for allow-icmp-network-policy#2920
arkadeepsen wants to merge 1 commit intoopenshift:masterfrom
arkadeepsen:allow-icmp-netpol

Conversation

@arkadeepsen
Copy link
Member

@arkadeepsen arkadeepsen commented Mar 5, 2026

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Summary by CodeRabbit

  • New Features

    • Support for an allow-icmp-network-policy option passed through to OVN-Kubernetes invocations.
  • Refactor

    • Standardized parsing and boolean validation for the allow-icmp-network-policy override, aligning with existing override handling.
  • Tests

    • Added tests validating allow-icmp-network-policy override behavior for present, absent, and invalid values.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 5, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 5, 2026

@arkadeepsen: This pull request references CORENET-6854 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Walkthrough

Adds support for an allow-icmp-network-policy override: template flag injection, parsing and validation in ovn_kubernetes rendering, and unit tests covering present, absent, and invalid override cases.

Changes

Cohort / File(s) Summary
Script template
bindata/network/ovn-kubernetes/common/008-script-lib.yaml
Adds allow_icmp_network_policy_flag variable, sets it when AllowICMPNetworkPolicy is non-empty, and appends ${allow_icmp_network_policy_flag} to the ovnkube invocation.
OVN Kubernetes rendering
pkg/network/ovn_kubernetes.go
Adds reading/trimming/boolean validation for allow-icmp-network-policy from bootstrapResult.OVN.OVNKubernetesConfig.ConfigOverrides, sets data.Data["AllowICMPNetworkPolicy"] (mirrors existing openflow-probe handling), and logs a warning on invalid values.
Tests
pkg/network/ovn_kubernetes_test.go
Adds TestRenderOVNKubernetes_AllowICMPNetworkPolicyOverride with helper and three subtests to assert rendered script contains the flag for valid override, the empty/default pattern when absent, and fallback to empty when override is invalid.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ❓ Inconclusive Test uses standard Go testing with Gomega assertions, not Ginkgo BDD framework specified in check instructions. Clarify whether check applies to standard Go tests or only Ginkgo tests, and review codebase conventions for assertion message expectations.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically describes the main change: adding a config override for the allow-icmp-network-policy flag, which aligns with the summary of changes across all three modified files.
Stable And Deterministic Test Names ✅ Passed All test names in TestRenderOVNKubernetes_AllowICMPNetworkPolicyOverride are stable, deterministic, and descriptive without dynamic content.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/Masterminds/semver@v1.5.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/Masterminds/sprig/v3@v3.2.3: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/containernetworking/cni@v0.8.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/ghodss/yaml@v1.0.1-0.20190212211648-25d852aebe32: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/go-bindata/go-bindata@v3.1.2+incompatible: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/onsi/gomega@v1.38.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/ope

... [truncated 17231 characters] ...

ired in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/gengo/v2@v2.0.0-20250922181213-ec3ebc5fd46b: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/kms@v0.34.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/kube-aggregator@v0.34.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/randfill@v1.0.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/structured-merge-diff/v6@v6.3.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from danwinship and kyrtapz March 5, 2026 15:03
@arkadeepsen
Copy link
Member Author

Upstream PR which implemented the feature: ovn-kubernetes/ovn-kubernetes#5247
Downstream merge PR containing the commits from the PR: openshift/ovn-kubernetes#3011

/hold
until the downstream PR merges

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 5, 2026

@arkadeepsen: This pull request references CORENET-6854 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Summary by CodeRabbit

  • New Features

  • Added support for ICMP network policy configuration in OVN-Kubernetes deployments. The new allow-icmp-network-policy option enables flexible control over ICMP traffic handling within cluster network policies.

  • Tests

  • Added comprehensive test coverage for the ICMP network policy configuration override, including validation of valid boolean values and invalid input handling.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@arkadeepsen arkadeepsen changed the title CORENET-6854: Add config override for allow-icmp-network-policy CORENET-6813: Add config override for allow-icmp-network-policy Mar 5, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 5, 2026

@arkadeepsen: This pull request references CORENET-6813 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Summary by CodeRabbit

  • New Features

  • Added support for ICMP network policy configuration in OVN-Kubernetes deployments. The new allow-icmp-network-policy option enables flexible control over ICMP traffic handling within cluster network policies.

  • Tests

  • Added comprehensive test coverage for the ICMP network policy configuration override, including validation of valid boolean values and invalid input handling.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/network/ovn_kubernetes_test.go (1)

4338-4357: Harden these assertions to avoid whitespace-sensitive failures and add explicit false coverage.

At Line 4338 and Line 4354, multiline block matching is fragile to harmless template formatting changes. Prefer targeted token assertions (e.g., flag/value substrings) and add a false override case to complete boolean-path coverage.

✅ Suggested test refinement
 	t.Run("with allow-icmp-network-policy override", func(t *testing.T) {
 		ovnkubeScriptLib := renderWithOverrides(map[string]string{"allow-icmp-network-policy": "true"})
-		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`
-  if [[ "true" != "" ]]; then
-    allow_icmp_network_policy_flag="--allow-icmp-network-policy=true"
-  fi`))
+		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`allow_icmp_network_policy_flag="--allow-icmp-network-policy=true"`))
 	})

+	t.Run("with allow-icmp-network-policy=false override", func(t *testing.T) {
+		ovnkubeScriptLib := renderWithOverrides(map[string]string{"allow-icmp-network-policy": "false"})
+		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`allow_icmp_network_policy_flag="--allow-icmp-network-policy=false"`))
+	})
+
 	t.Run("without allow-icmp-network-policy override", func(t *testing.T) {
 		ovnkubeScriptLib := renderWithOverrides(nil)
-		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`
-  if [[ "" != "" ]]; then
-    allow_icmp_network_policy_flag="--allow-icmp-network-policy="
-  fi`))
+		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`if [[ "" != "" ]]; then`))
 	})

 	t.Run("with invalid allow-icmp-network-policy override", func(t *testing.T) {
 		ovnkubeScriptLib := renderWithOverrides(map[string]string{"allow-icmp-network-policy": "-60"})
-		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`
-  if [[ "" != "" ]]; then
-    allow_icmp_network_policy_flag="--allow-icmp-network-policy="
-  fi`))
+		g.Expect(ovnkubeScriptLib).To(ContainSubstring(`if [[ "" != "" ]]; then`))
 	})
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/network/ovn_kubernetes_test.go` around lines 4338 - 4357, The tests in
ovn_kubernetes_test.go use fragile multiline substring matches for the
allow-icmp-network-policy flag; update the three cases that call
renderWithOverrides to assert targeted tokens instead (e.g., check for the
presence of "--allow-icmp-network-policy=true" when override is "true", check
for "--allow-icmp-network-policy=" for empty/invalid overrides) and add an
explicit test case using
renderWithOverrides(map[string]string{"allow-icmp-network-policy":"false"}) that
asserts the flag "--allow-icmp-network-policy=false" appears; locate assertions
around the renderWithOverrides calls in the t.Run blocks for "with
allow-icmp-network-policy override", "without allow-icmp-network-policy
override", and "with invalid allow-icmp-network-policy override" and replace
multiline ContainSubstring checks with focused token checks to avoid whitespace
sensitivity and to cover the false path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pkg/network/ovn_kubernetes_test.go`:
- Around line 4338-4357: The tests in ovn_kubernetes_test.go use fragile
multiline substring matches for the allow-icmp-network-policy flag; update the
three cases that call renderWithOverrides to assert targeted tokens instead
(e.g., check for the presence of "--allow-icmp-network-policy=true" when
override is "true", check for "--allow-icmp-network-policy=" for empty/invalid
overrides) and add an explicit test case using
renderWithOverrides(map[string]string{"allow-icmp-network-policy":"false"}) that
asserts the flag "--allow-icmp-network-policy=false" appears; locate assertions
around the renderWithOverrides calls in the t.Run blocks for "with
allow-icmp-network-policy override", "without allow-icmp-network-policy
override", and "with invalid allow-icmp-network-policy override" and replace
multiline ContainSubstring checks with focused token checks to avoid whitespace
sensitivity and to cover the false path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cee2851d-7ad3-4882-8da7-f44c1e3ea1d1

📥 Commits

Reviewing files that changed from the base of the PR and between 0341016 and aac499f.

📒 Files selected for processing (3)
  • bindata/network/ovn-kubernetes/common/008-script-lib.yaml
  • pkg/network/ovn_kubernetes.go
  • pkg/network/ovn_kubernetes_test.go

@danwinship
Copy link
Contributor

we really need to refactor that code...
/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 5, 2026
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 5, 2026
@arkadeepsen
Copy link
Member Author

we really need to refactor that code...

Tried to refactor the code. PLMK whether this needs any other changes or not.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 5, 2026

@arkadeepsen: This pull request references CORENET-6813 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Summary by CodeRabbit

  • New Features

  • Added support for ICMP network policy configuration (allow-icmp-network-policy) in OVN-Kubernetes deployments.

  • Refactor

  • Centralized and standardized parsing/validation of OVN-Kubernetes config overrides to improve robustness and consistency.

  • Tests

  • Expanded and consolidated tests for config overrides to cover multiple keys, valid/invalid inputs, and flag generation.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/network/ovn_kubernetes_test.go`:
- Around line 4270-4276: The test case entry for the config override
"allow-icmp-network-policy" currently has checkInvalid set to false so the
bool-validation path isn’t exercised; update that table entry in
pkg/network/ovn_kubernetes_test.go so checkInvalid is true and provide an
invalidValue (e.g., "not-a-bool" or "invalid") for the allow-icmp-network-policy
override to trigger the rejection path in the render/validation logic (look for
the test table row containing configOverrideKey: "allow-icmp-network-policy" and
adjust checkInvalid and invalidValue accordingly).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f70ef0c9-0744-4741-8f21-3c127d804816

📥 Commits

Reviewing files that changed from the base of the PR and between aac499f and fb4e1f4.

📒 Files selected for processing (3)
  • bindata/network/ovn-kubernetes/common/008-script-lib.yaml
  • pkg/network/ovn_kubernetes.go
  • pkg/network/ovn_kubernetes_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • bindata/network/ovn-kubernetes/common/008-script-lib.yaml

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 5, 2026

@arkadeepsen: This pull request references CORENET-6813 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Summary by CodeRabbit

  • New Features

  • Added support for ICMP network policy configuration (allow-icmp-network-policy) in OVN-Kubernetes invocations.

  • Refactor

  • Centralized and standardized parsing/validation of OVN-Kubernetes config overrides for improved robustness and consistency.

  • Tests

  • Consolidated tests into a data-driven suite covering multiple override keys, valid/invalid inputs, and resulting flag generation.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@danwinship
Copy link
Contributor

Oh, I didn't mean we should refactor it as part of a blocking PR. We can do it later.O

(We should probably unparse the YAML into a config struct rather than parsing each piece by hand...)

@arkadeepsen
Copy link
Member Author

Oh, I didn't mean we should refactor it as part of a blocking PR. We can do it later.O

Ack. Reverted to the previous commit.

(We should probably unparse the YAML into a config struct rather than parsing each piece by hand...)

I'll probably create another PR to take care of the refactor.

@danwinship
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 6, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arkadeepsen, danwinship

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@arkadeepsen
Copy link
Member Author

/retest-required

1 similar comment
@arkadeepsen
Copy link
Member Author

/retest-required

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 11, 2026
The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 11, 2026

New changes are detected. LGTM label has been removed.

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 11, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 11, 2026

@arkadeepsen: This pull request references CORENET-6813 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR adds config override for allow-icmp-network-policy. The allow-icmp-network-policy flag can be set to true when starting ovnkube-controller to allow ICMP/ICMPv6 traffic when using network policy.

Summary by CodeRabbit

  • New Features

  • Support for an allow-icmp-network-policy option passed through to OVN-Kubernetes invocations.

  • Refactor

  • Standardized parsing and boolean validation for the allow-icmp-network-policy override, aligning with existing override handling.

  • Tests

  • Added tests validating allow-icmp-network-policy override behavior for present, absent, and invalid values.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
pkg/network/ovn_kubernetes_test.go (1)

4360-4381: Make these assertions less formatting-sensitive.

These subtests depend on an exact multiline shell fragment, including indentation and the current empty-value branch shape. That will break on harmless template cleanup. Matching the flag assignment substring, like the nearby openflow-probe test, would keep this focused on behavior.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/network/ovn_kubernetes_test.go` around lines 4360 - 4381, The test
assertions are too format-sensitive; update the three subtests in
pkg/network/ovn_kubernetes_test.go that call renderWithOverrides and assert on a
multi-line, indented shell fragment to instead assert only on the relevant flag
assignment substring. Locate the checks using ContainSubstring that reference
the allow_icmp_network_policy block and replace them with asserts that match the
assignment (e.g., look for allow_icmp_network_policy_flag and the
--allow-icmp-network-policy= token or the full assignment including "true" for
the true override) so the test verifies presence and value of the flag without
relying on exact whitespace or multi-line shape.
pkg/network/ovn_kubernetes.go (1)

192-202: Consider extracting config-override parsing into a helper.

This follows the openflow-probe flow almost line-for-line. A small helper for trim/validate/warn/set would keep future overrides consistent and make this section easier to maintain.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/network/ovn_kubernetes.go` around lines 192 - 202, Extract the repeated
trim/validate/warn/set logic into a small helper (e.g.,
SetBoolOverrideFromConfigOverrides or parseBoolOverride) that accepts the
ConfigOverrides map, the override key ("allow-icmp-network-policy"), the target
data map (data.Data) and target field name ("AllowICMPNetworkPolicy"); inside
the helper trim the raw string, return early on empty, attempt strconv.ParseBool
and on error call klog.Warningf with the same message, otherwise set the
validated value into data.Data; then replace the inline block in the
OVNKubernetesConfig handling with a single call to that helper to keep behavior
identical and reusable (use the same klog and strconv imports/symbols).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pkg/network/ovn_kubernetes_test.go`:
- Around line 4360-4381: The test assertions are too format-sensitive; update
the three subtests in pkg/network/ovn_kubernetes_test.go that call
renderWithOverrides and assert on a multi-line, indented shell fragment to
instead assert only on the relevant flag assignment substring. Locate the checks
using ContainSubstring that reference the allow_icmp_network_policy block and
replace them with asserts that match the assignment (e.g., look for
allow_icmp_network_policy_flag and the --allow-icmp-network-policy= token or the
full assignment including "true" for the true override) so the test verifies
presence and value of the flag without relying on exact whitespace or multi-line
shape.

In `@pkg/network/ovn_kubernetes.go`:
- Around line 192-202: Extract the repeated trim/validate/warn/set logic into a
small helper (e.g., SetBoolOverrideFromConfigOverrides or parseBoolOverride)
that accepts the ConfigOverrides map, the override key
("allow-icmp-network-policy"), the target data map (data.Data) and target field
name ("AllowICMPNetworkPolicy"); inside the helper trim the raw string, return
early on empty, attempt strconv.ParseBool and on error call klog.Warningf with
the same message, otherwise set the validated value into data.Data; then replace
the inline block in the OVNKubernetesConfig handling with a single call to that
helper to keep behavior identical and reusable (use the same klog and strconv
imports/symbols).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c6cd5637-c9d9-4820-bfba-a13e9347d4b1

📥 Commits

Reviewing files that changed from the base of the PR and between 43cba04 and f7a5fff.

📒 Files selected for processing (3)
  • bindata/network/ovn-kubernetes/common/008-script-lib.yaml
  • pkg/network/ovn_kubernetes.go
  • pkg/network/ovn_kubernetes_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • bindata/network/ovn-kubernetes/common/008-script-lib.yaml

@asood-rh
Copy link

Pre merge testing done with network policy for ICMP and ICMPv6.
Details in https://issues.redhat.com/browse/CORENET-6825

@arkadeepsen
Copy link
Member Author

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 12, 2026

@arkadeepsen: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/hypershift-e2e-aks f7a5fff link true /test hypershift-e2e-aks
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp f7a5fff link true /test e2e-metal-ipi-ovn-dualstack-bgp
ci/prow/security f7a5fff link false /test security
ci/prow/e2e-aws-ovn-hypershift-conformance f7a5fff link true /test e2e-aws-ovn-hypershift-conformance
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw f7a5fff link true /test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
ci/prow/e2e-azure-ovn-upgrade f7a5fff link true /test e2e-azure-ovn-upgrade

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants