Skip to content

OSASINFRA-4400: Add support for max_allowed_address_pairs OpenStack - #3058

Open
danchild wants to merge 2 commits into
openshift:masterfrom
shiftstack:cloud-network-config-cm
Open

OSASINFRA-4400: Add support for max_allowed_address_pairs OpenStack#3058
danchild wants to merge 2 commits into
openshift:masterfrom
shiftstack:cloud-network-config-cm

Conversation

@danchild

@danchild danchild commented Jul 15, 2026

Copy link
Copy Markdown
Member

Following work in openshift/cloud-network-config-controller/pull/230, a mechanism is required to pass the configured max_allowed_address_pairs as a command line argument to the controller.

New feature includes:

  • Add a bootstrap result type for a new cloud-network-config ConfigMap,
    reading it if the platform type is OpenStack
  • Validate platform-os-max-allowed-address-pairs, returning an error
    if it is negative, explicitly set to 0, or an invalid number (e.g.
    alphabetic string)
  • Pass platform-os-max-allowed-address-pairs to the
    cloud-network-config-controller as a command line argument
  • Check for changes to cloud-network-config, restarting the
    cloud-network-config-controller if there's a diff

Please note that openshift/cloud-network-config-controller/pull/230 must be accepted and merged before accepting these changes.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 15, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

@danchild: This pull request references OSASINFRA-4400 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 "5.0.0" version, but no target version was set.

Details

In response to this:

TODO

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.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 15, 2026
@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: c717fd55-4c89-4aab-b6ea-6c8271c94e11

📥 Commits

Reviewing files that changed from the base of the PR and between a0ebeb0 and 7e57523.

📒 Files selected for processing (7)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • bindata/cloud-network-config-controller/self-hosted/controller.yaml
  • pkg/bootstrap/types.go
  • pkg/network/bootstrap.go
  • pkg/network/bootstrap_test.go
  • pkg/network/cloud_network.go
  • pkg/network/cloud_network_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • pkg/network/cloud_network_test.go

Summary by CodeRabbit

  • New Features

    • Added support for configuring the maximum number of allowed address pairs on OpenStack platforms.
    • The setting is read from cloud network configuration and applied to managed and self-hosted deployments.
    • The configuration remains optional when no value is provided.
  • Bug Fixes

    • Added validation to reject zero, negative, or invalid values.
    • Missing configuration is handled gracefully, while configuration access and parsing errors are reported clearly.

Walkthrough

The change reads platform-os-max-allowed-address-pairs from the OpenStack cloud-network-config ConfigMap, validates and propagates it through bootstrap and rendering, and conditionally adds the corresponding flag to managed and self-hosted controller deployments.

Changes

OpenStack address-pair configuration

Layer / File(s) Summary
Bootstrap configuration loading
pkg/bootstrap/types.go, pkg/network/bootstrap.go, pkg/network/bootstrap_test.go, pkg/network/cloud_network_test.go
Bootstrap results carry the optional address-pair value. OpenStack bootstrap reads the ConfigMap, ignores missing resources or keys, validates positive integers, and propagates other errors.
Render data propagation
pkg/network/cloud_network.go, pkg/network/cloud_network_test.go
The bootstrapped value is added to controller render data. Tests cover unset and positive values, including render validation.
Controller argument rendering
bindata/cloud-network-config-controller/*/controller.yaml, pkg/network/cloud_network_test.go
Managed and self-hosted templates conditionally emit the address-pair flag. The self-hosted template uses explicit argument elements and consolidates the secret argument.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Bootstrap
  participant KubernetesAPI
  participant Renderer
  participant ControllerDeployment
  Bootstrap->>KubernetesAPI: fetch cloud-network-config ConfigMap
  KubernetesAPI-->>Bootstrap: return address-pair configuration
  Bootstrap->>Renderer: provide OpenStackMaxAllowedAddressPairs
  Renderer->>ControllerDeployment: render conditional controller flag
Loading

Suggested reviewers: jcaamano, marty-power, tpantelis


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (6 errors, 2 warnings)

Check name Status Explanation Resolution
Pr Quality ❌ Error The 546-line feature change lacks Why/What/Testing sections, automated CNO CI lanes/platforms, and upgrade/rollback considerations in the authored description. Add Why, What, and Testing sections; list automated CNO CI jobs and target platforms; document user impact plus upgrade and rollback behavior.
Commit Message Quality ❌ Error Both PR commits have clear network scope but their subjects lack the required component prefix; the two commit bodies and no-merge structure otherwise meet the listed checks. Prefix both subjects with the affected component, for example network: Pass OS max_allowed_address_pairs... and network: Test cloud-network-config bootstrap and rendering.
E2e Tests For Feature Changes ❌ Error Production Go changes add OpenStack ConfigMap bootstrap and controller argument behavior, but the PR changes no test/e2e files and its description has no Testing or How to verify it section. Add applicable test/e2e coverage and a Testing or How to verify it section with CI jobs, platform coverage, and results. If E2E is not feasible, document why there.
Docs For Feature And Behavior Changes ❌ Error The PR adds OpenStack ConfigMap parsing and a new controller CLI argument, but its full diff contains no docs/ changes or feature markdown file. Add a new markdown file under docs/ that documents the ConfigMap key, CLI behavior, validation, restart and operational failure handling; otherwise explain why docs are not required and use the stated override.
Ai-Generated Code Smell ❌ Error New tests contain unreviewed verbosity: a 56-line RenderValidation table has only no-error cases while retaining unused expectErr/errSubstr branches, alongside duplicated render harnesses. Remove the unused error-case scaffolding and simplify or share the duplicated managed/self-hosted render-test setup; keep only assertions that cover changed behavior.
No-Sensitive-Data-In-Logs ❌ Error The parser includes the unvalidated ConfigMap value in its error, and operconfig_controller logs that error; a misplaced token or secret would be exposed. Remove raw from the parse error. Report only the ConfigMap key and a generic invalid-value message, while retaining the validation failure.
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Go And Test Code Quality ⚠️ Warning New test code calls t.Fatalf("unexpected error: %v", err), which reports only a generic error and does not identify the failed operation. Replace the generic message with operation context, such as t.Fatalf("cloudNetworkConfigBootstrap failed unexpectedly: %v", err).
✅ Passed checks (16 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the imperative mood, stays under 72 characters, and accurately describes the OpenStack address-pair support.
Description check ✅ Passed The description directly explains the ConfigMap bootstrap, validation, controller argument, and restart changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Unit Tests For Go Changes ✅ Passed The PR modifies production Go and bindata templates, and also modifies pkg/network/bootstrap_test.go and pkg/network/cloud_network_test.go with coverage for the changes.
Rbac Least Privilege ✅ Passed The full PR diff changes only two Deployment YAML files under bindata; it adds controller arguments and does not add or modify any Role or ClusterRole rules.
Stale Project Docs And Config ✅ Passed The aggregate diff changes only controller templates and pkg code/tests; no docs/config paths or stale references exist, and existing docs make no claims contradicted by the new ConfigMap or flag.
Stable And Deterministic Test Names ✅ Passed Added tests use Go t.Run with fixed literal names; no Ginkgo titles or dynamic pod, node, namespace, IP, timestamp, UUID, or generated identifiers appear.
Test Structure And Quality ✅ Passed The PR adds standard Go tests, not Ginkgo tests; no It blocks, cluster waits, or cluster resource cleanup requirements apply.
Microshift Test Compatibility ✅ Passed The added tests are standard Go testing unit tests. No Ginkgo e2e tests or MicroShift-incompatible test execution were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The added tests use Go's testing package with t.Run; no Ginkgo e2e tests, multi-node assumptions, or SNO guards are present.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only controller arguments and OpenStack bootstrap/render data. It adds no affinity, spread, replica, PDB, selector, or toleration constraints; existing master selection remains condi...
Ote Binary Stdout Contract ✅ Passed Feature diff adds no main, init, TestMain, or suite setup and no stdout writes; the repository has no OTE JSON-listing binary.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new tests are ordinary Go unit tests using testing.T and fake clients; no Ginkgo e2e tests, IPv4-only networking, or external connectivity was added.
No-Weak-Crypto ✅ Passed The complete feature diff adds no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons; changed Go code imports only context, fmt, and strconv.
Container-Privileges ✅ Passed The PR changes only controller arguments. Both modified manifests retain runAsNonRoot, drop ALL, and allowPrivilegeEscalation:false, with no privileged, hostPID, hostNetwork, hostIPC, or SYS_ADMIN...
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.12.2)

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@v1.3.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.39.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/ope

... [truncated 17377 characters] ...

red in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/gengo/v2@v2.0.0-20251215205346-5ee0d033ba5b: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/kms@v0.35.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tk8s.io/kube-aggregator@v0.35.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.2: 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.

@openshift-ci

openshift-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: danchild
Once this PR has been reviewed and has the lgtm label, please assign kyrtapz for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@danchild
danchild force-pushed the cloud-network-config-cm branch 2 times, most recently from c0144b5 to 666ef2c Compare July 16, 2026 13:47
@danchild
danchild marked this pull request as ready for review July 16, 2026 13:54
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 16, 2026
@openshift-ci
openshift-ci Bot requested review from jcaamano and marty-power July 16, 2026 14:00

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bindata/cloud-network-config-controller/self-hosted/controller.yaml`:
- Around line 50-54: Convert the container args flow sequence around the
existing "-secret-name" and OSMaxAllowedAddressPairs template entries into a
YAML block sequence using list-item syntax. Preserve the current argument values
and conditional inclusion controlled by OSMaxAllowedAddressPairsIsSet and
OSMaxAllowedAddressPairs.

In `@pkg/network/bootstrap.go`:
- Around line 76-107: Update cloudNetworkConfigBootstrap to return the API error
alongside CloudNetworkConfigBootstrapResult, propagating transient errors from
cl.Get instead of logging and returning an empty result. Adjust Bootstrap and
its caller handling to receive the error and return it so reconciliation
requeues with backoff; preserve the existing not-found and successful
configuration behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 10ffe051-5f03-4806-86dd-a122e8f1e1f3

📥 Commits

Reviewing files that changed from the base of the PR and between 76e94f2 and 666ef2c.

📒 Files selected for processing (7)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • bindata/cloud-network-config-controller/self-hosted/controller.yaml
  • pkg/bootstrap/types.go
  • pkg/network/bootstrap.go
  • pkg/network/bootstrap_test.go
  • pkg/network/cloud_network.go
  • pkg/network/cloud_network_test.go

Comment thread bindata/cloud-network-config-controller/self-hosted/controller.yaml Outdated
Comment thread pkg/network/bootstrap.go
@danchild
danchild force-pushed the cloud-network-config-cm branch 2 times, most recently from 62b0134 to 1a3f781 Compare July 16, 2026 14:43
@danchild

Copy link
Copy Markdown
Member Author

/verified by @danchild

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 17, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@danchild: This PR has been marked as verified by @danchild.

Details

In response to this:

/verified by @danchild

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.

@danchild
danchild force-pushed the cloud-network-config-cm branch from 1a3f781 to e5abd93 Compare July 20, 2026 13:47
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Jul 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
bindata/cloud-network-config-controller/self-hosted/controller.yaml (1)

45-54: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Unresolved: args flow sequence + Go template conditional breaks YAML lint.

This is the same pattern flagged in an earlier review round (YAMLlint: expected ',' or ']', but got '{' at this location) — the fix (converting to a block sequence) was not applied. The raw template still mixes a flow sequence args: [...] with an injected {{- if ... }}/{{- end }} block, which a YAML parser cannot parse as valid flow-sequence syntax on the raw (pre-render) template.

🛠️ Proposed fix to use block sequence
-        args: [ "-platform-type", "{{.PlatformType}}",
-                "-platform-region={{.PlatformRegion}}",
-                "-platform-api-url={{.PlatformAPIURL}}",
-                "-platform-aws-ca-override={{.PlatformAWSCAPath}}",
-                "-platform-azure-environment={{.PlatformAzureEnvironment}}",
-                "-secret-name", "cloud-credentials"
-{{- if and .OSMaxAllowedAddressPairsIsSet (gt .OSMaxAllowedAddressPairs 0) }}
-                ,"-platform-os-max-allowed-address-pairs={{ .OSMaxAllowedAddressPairs }}"
-{{- end }}
-                ]
+        args:
+        - "-platform-type"
+        - "{{.PlatformType}}"
+        - "-platform-region={{.PlatformRegion}}"
+        - "-platform-api-url={{.PlatformAPIURL}}"
+        - "-platform-aws-ca-override={{.PlatformAWSCAPath}}"
+        - "-platform-azure-environment={{.PlatformAzureEnvironment}}"
+        - "-secret-name"
+        - "cloud-credentials"
+{{- if and .OSMaxAllowedAddressPairsIsSet (gt .OSMaxAllowedAddressPairs 0) }}
+        - "-platform-os-max-allowed-address-pairs={{ .OSMaxAllowedAddressPairs }}"
+{{- end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bindata/cloud-network-config-controller/self-hosted/controller.yaml` around
lines 45 - 54, Convert the args value in the controller manifest from a flow
sequence to a block sequence, placing each argument as its own list item.
Preserve the conditional OSMaxAllowedAddressPairs argument and its existing
condition, while ensuring the raw Go template remains valid YAML before
rendering.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@bindata/cloud-network-config-controller/self-hosted/controller.yaml`:
- Around line 45-54: Convert the args value in the controller manifest from a
flow sequence to a block sequence, placing each argument as its own list item.
Preserve the conditional OSMaxAllowedAddressPairs argument and its existing
condition, while ensuring the raw Go template remains valid YAML before
rendering.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d5b997b4-8f82-40b0-b3db-5ad96b111c37

📥 Commits

Reviewing files that changed from the base of the PR and between 76e94f2 and e5abd93.

📒 Files selected for processing (7)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • bindata/cloud-network-config-controller/self-hosted/controller.yaml
  • pkg/bootstrap/types.go
  • pkg/network/bootstrap.go
  • pkg/network/bootstrap_test.go
  • pkg/network/cloud_network.go
  • pkg/network/cloud_network_test.go

@danchild
danchild force-pushed the cloud-network-config-cm branch from e5abd93 to 8247a2b Compare July 20, 2026 13:55
@danchild

Copy link
Copy Markdown
Member Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-ovn-upgrade-ipsec
/test e2e-gcp-ovn-techpreview

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn-fdp-qe
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-upgrade
/test e2e-aws-ovn-windows
/test e2e-azure-ovn-upgrade
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-ipv6-ipsec
/test e2e-ovn-ipsec-step-registry
/test hypershift-e2e-aks

@danchild

Copy link
Copy Markdown
Member Author

/verified by @danchild

@danchild danchild closed this Jul 30, 2026
@danchild danchild reopened this Jul 30, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@danchild: This pull request references OSASINFRA-4400 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 "5.0.0" version, but no target version was set.

Details

In response to this:

Following work in openshift/cloud-network-config-controller/pull/230, a mechanism is required to pass the configured max_allowed_address_pairs as a command line argument to the controller.

New feature includes:

  • Add a bootstrap result type for a new cloud-network-config ConfigMap,
    reading it if the platform type is OpenStack
  • Validate platform-os-max-allowed-address-pairs, returning an error
    if it is negative, explicitly set to 0, or an invalid number (e.g.
    alphabetic string)
  • Pass platform-os-max-allowed-address-pairs to the
    cloud-network-config-controller as a command line argument
  • Check for changes to cloud-network-config, restarting the
    cloud-network-config-controller if there's a diff

Please note that openshift/cloud-network-config-controller/pull/230 must be accepted and merged before accepting these changes.

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.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

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

390-393: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the redundant test-helper comments.

Both comments repeat what toPtr and the _test.go file already state.

  • pkg/network/bootstrap_test.go#L390-L393: Delete the comment above toPtr.
  • pkg/network/cloud_network_test.go#L494-L497: Delete the comment above toPtr.

As per coding guidelines, new comments must add genuine value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/network/bootstrap_test.go` around lines 390 - 393, Remove the redundant
comment above the toPtr test helper in pkg/network/bootstrap_test.go at lines
390-393 and pkg/network/cloud_network_test.go at lines 494-497; leave the toPtr
implementations unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bindata/cloud-network-config-controller/self-hosted/controller.yaml`:
- Around line 54-56: Fix the Helm template conditional around
OSMaxAllowedAddressPairs by placing the if/end actions inside YAML comments
without trim markers, while keeping the argument entry valid YAML in the
rendered output. Validate both the branch where OSMaxAllowedAddressPairs is set
and the branch where it is absent, using the existing template structure in
controller.yaml.

In `@pkg/network/bootstrap.go`:
- Around line 86-93: Update Bootstrap to accept a context.Context parameter,
thread that context through cloudNetworkConfigBootstrap, and replace
context.TODO() in its cl.Get ConfigMap request with the provided reconciliation
context.

---

Nitpick comments:
In `@pkg/network/bootstrap_test.go`:
- Around line 390-393: Remove the redundant comment above the toPtr test helper
in pkg/network/bootstrap_test.go at lines 390-393 and
pkg/network/cloud_network_test.go at lines 494-497; leave the toPtr
implementations unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 63994a86-248e-45bf-87f7-e1fe3267b375

📥 Commits

Reviewing files that changed from the base of the PR and between d3ad345 and c860305.

📒 Files selected for processing (7)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • bindata/cloud-network-config-controller/self-hosted/controller.yaml
  • pkg/bootstrap/types.go
  • pkg/network/bootstrap.go
  • pkg/network/bootstrap_test.go
  • pkg/network/cloud_network.go
  • pkg/network/cloud_network_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • bindata/cloud-network-config-controller/managed/controller.yaml

Comment thread bindata/cloud-network-config-controller/self-hosted/controller.yaml Outdated
Comment thread pkg/network/bootstrap.go Outdated
@danchild
danchild force-pushed the cloud-network-config-cm branch from c860305 to 7d46b28 Compare August 5, 2026 16:17
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@danchild

danchild commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

/verified by @danchild

@danchild

danchild commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

/pipeline required

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 5, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@danchild: This PR has been marked as verified by @danchild.

Details

In response to this:

/verified by @danchild

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.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-ovn-upgrade-ipsec
/test e2e-gcp-ovn-techpreview

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn-fdp-qe
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-upgrade
/test e2e-aws-ovn-windows
/test e2e-azure-ovn-upgrade
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-ipv6-ipsec
/test e2e-ovn-ipsec-step-registry
/test hypershift-e2e-aks

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
bindata/cloud-network-config-controller/self-hosted/controller.yaml (1)

54-56: ⚠️ Potential issue | 🔴 Critical

Fix the remaining YAML template syntax error.

Line 54 and Line 56 place Go-template actions outside YAML comments. YAMLlint reports could not find expected ':' at Line 55. Use YAML comments without trim markers, then render both branches. This is the same unresolved issue reported in the previous review.

Proposed fix
-{{- if .OSMaxAllowedAddressPairs }}
+# {{ if .OSMaxAllowedAddressPairs }}
         - "-platform-os-max-allowed-address-pairs={{ .OSMaxAllowedAddressPairs }}"
-{{- end }}
+# {{ end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bindata/cloud-network-config-controller/self-hosted/controller.yaml` around
lines 54 - 56, Fix the conditional block around OSMaxAllowedAddressPairs by
placing the Go-template actions inside YAML comments without trim markers, while
preserving rendering of both the enabled and disabled branches. Ensure the
resulting template remains valid YAML for YAMLlint and continues to emit the
platform argument only when .OSMaxAllowedAddressPairs is set.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@bindata/cloud-network-config-controller/self-hosted/controller.yaml`:
- Around line 54-56: Fix the conditional block around OSMaxAllowedAddressPairs
by placing the Go-template actions inside YAML comments without trim markers,
while preserving rendering of both the enabled and disabled branches. Ensure the
resulting template remains valid YAML for YAMLlint and continues to emit the
platform argument only when .OSMaxAllowedAddressPairs is set.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: a3766d38-afb3-4568-964c-e173a4b38ca2

📥 Commits

Reviewing files that changed from the base of the PR and between d3ad345 and 7d46b28.

📒 Files selected for processing (7)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • bindata/cloud-network-config-controller/self-hosted/controller.yaml
  • pkg/bootstrap/types.go
  • pkg/network/bootstrap.go
  • pkg/network/bootstrap_test.go
  • pkg/network/cloud_network.go
  • pkg/network/cloud_network_test.go
🚧 Files skipped from review as they are similar to previous changes (6)
  • bindata/cloud-network-config-controller/managed/controller.yaml
  • pkg/network/cloud_network.go
  • pkg/bootstrap/types.go
  • pkg/network/bootstrap_test.go
  • pkg/network/cloud_network_test.go
  • pkg/network/bootstrap.go

@danchild

danchild commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

/test e2e-aws-ovn-upgrade

@danchild

danchild commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

/test e2e-gcp-ovn-upgrade

@danchild

danchild commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/test 5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp
/test e2e-aws-ovn-serial-2of2
/test 5.0-upgrade-from-stable-4.22-e2e-azure-ovn-upgrade
/test e2e-gcp-ovn-techpreview
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-gcp-ovn
/test hypershift-e2e-aks

@stephenfin stephenfin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Couple of small comments and some nits

Comment thread bindata/cloud-network-config-controller/self-hosted/controller.yaml Outdated
Comment thread bindata/cloud-network-config-controller/self-hosted/controller.yaml Outdated
Comment thread pkg/bootstrap/types.go Outdated
Comment thread pkg/network/bootstrap.go
Comment thread pkg/network/cloud_network.go Outdated
Following `openshift/cloud-network-config-controller` openshift#230,
a mechanism is required to pass the configured
`max_allowed_address_pairs` as a command line argument
to the controller.

New feature includes:

- Add a bootstrap result type for a new `cloud-network-config` ConfigMap,
  reading it if the platform type is OpenStack
- Validate `platform-os-max-allowed-address-pairs`, returning an error
  if it is negative, explicitly set to 0, or an invalid number (e.g.
  alphabetic string)
- Pass platform-os-max-allowed-address-pairs to the
  `cloud-network-config-controller` as a command line argument
- Check for changes to `cloud-network-config`, restarting the
  cloud-network-config-controller if there's a diff

Signed-off-by: Dan Childers <dchilder@redhat.com>
Exercise managed and self-hosted template rendering for the new
max_allowed_address_pairs flag, including zero, negative, non-integer,
valid, and unset cases. Also error propogation related to fetching
the cloud-network-config ConfigMap is also tested.

Signed-off-by: Dan Childers <dchilder@redhat.com>
@danchild
danchild force-pushed the cloud-network-config-cm branch from 7d46b28 to 7e57523 Compare August 6, 2026 16:32
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@danchild

danchild commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-ovn-upgrade-ipsec

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn-fdp-qe
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-upgrade
/test e2e-aws-ovn-windows
/test e2e-azure-ovn-upgrade
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-metal-ipi-ovn-ipv6
/test e2e-metal-ipi-ovn-ipv6-ipsec
/test e2e-ovn-ipsec-step-registry
/test hypershift-e2e-aks

@danchild

danchild commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/verified by @danchild

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 6, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@danchild: This PR has been marked as verified by @danchild.

Details

In response to this:

/verified by @danchild

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.

@danchild

danchild commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/test e2e-metal-ipi-ovn-ipv6
/test hypershift-e2e-aks
/test e2e-gcp-ovn-upgrade
/test 5.0-upgrade-from-stable-4.22-e2e-azure-ovn-upgrade
/test e2e-aws-ovn-serial-2of2
/test 5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw

@danchild

danchild commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test e2e-metal-ipi-ovn-ipv6
/test e2e-aws-ovn-serial-2of2
/test 5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade
/test hypershift-e2e-aks

@danchild

danchild commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
/test hypershift-e2e-aks

@danchild

danchild commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

/test e2e-metal-ipi-ovn-dualstack-bgp-local-gw

@openshift-ci

openshift-ci Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@danchild: all tests passed!

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

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants