Skip to content

OSASINFRA-4401: Add max_allowed_address_pairs cloud network config e2e test - #310

Open
danchild wants to merge 2 commits into
openshift:mainfrom
shiftstack:cloud-network-config-max-address-pairs
Open

OSASINFRA-4401: Add max_allowed_address_pairs cloud network config e2e test#310
danchild wants to merge 2 commits into
openshift:mainfrom
shiftstack:cloud-network-config-max-address-pairs

Conversation

@danchild

@danchild danchild commented Aug 3, 2026

Copy link
Copy Markdown
Member

The cloud-network-config-controller supports an optional max_allowed_address_pairs
field passed via a ConfigMap. The following E2E test provides coverage for two paths:

  1. Normal lifecycle where setting the field changes operator behavior and triggers a CNCC deployment
    rollout
  2. Degradation path where an invalid value causes the network operator
    to report Degraded with the config key in the message.

The egress-ipconfig annotation parsing logic is abstracted into a separate function to
cover multiple call sites across the openstack-test suite.

Summary of Changes:

  • Lift ifAddr, capacity, and NodeEgressIPConfiguration out of
    getEgressNetworkInfo's function body into package-level types
  • Extract a parseEgressIPAnnotation helper that handles annotation lookup and
    JSON unmarshalling, calling it in getEgressNetworkInfo and
    getEgressIPCapacityFromNode
  • Add BeforeEach setup that records baseline egress IP capacity per node and
    verifies CNCC is healthy before each spec
  • Add helper functions for creating/deleting the ConfigMap, waiting for a CNCC
    rollout, checking network operator degraded status, and waiting for recovery
  • Valid-value test: set a valid value, verify per-node egress IP capacity reflects
    the configured limit, delete the ConfigMap, and verify capacity returns to baseline
  • Invalid-value degradation test: for each of "0", "-5", and "abc", verify
    the network operator enters Degraded state with the config key referenced in the
    message and recover after the ConfigMap is deleted

Dependencies:
openshift/cluster-network-operator#3058
openshift/cloud-network-config-controller#230

@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 Aug 3, 2026
@openshift-ci

openshift-ci Bot commented Aug 3, 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

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign eurijon 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-max-address-pairs branch 2 times, most recently from a7996e7 to dc7dca9 Compare August 6, 2026 13:48
@danchild danchild changed the title cloud network config max address pairs OSASINFRA-4401: E2E Test, Cloud Network Config Aug 6, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 6, 2026

Copy link
Copy Markdown

@danchild: This pull request references OSASINFRA-4401 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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 6, 2026
@danchild
danchild force-pushed the cloud-network-config-max-address-pairs branch from dc7dca9 to 4be4c02 Compare August 6, 2026 17:55
@danchild danchild changed the title OSASINFRA-4401: E2E Test, Cloud Network Config OSASINFRA-4401: Add max_allowed_address_pairs cloud network config e2e test Aug 6, 2026
@danchild
danchild force-pushed the cloud-network-config-max-address-pairs branch from 4be4c02 to 004ac53 Compare August 6, 2026 18:10
getEgressNetworkInfo and getEgressIPCapacityFromNode each defined their own
local struct types and parsed the egress-ipconfig annotation independently.
The new cloud network config test also needs to read that annotation, so this
pulls the types and parsing logic into one shared place rather than duplicating
it a third time.

- Lift ifAddr, capacity, and NodeEgressIPConfiguration out of
  getEgressNetworkInfo's function body into package-level types
- Extract a parseEgressIPAnnotation helper that handles annotation lookup
  and JSON unmarshalling
- Update getEgressNetworkInfo and getEgressIPCapacityFromNode to use
  the helper
- Restore a diagnostic Logf call for the annotation-not-found path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
@danchild
danchild force-pushed the cloud-network-config-max-address-pairs branch from 004ac53 to e89f05e Compare August 6, 2026 18:13
@danchild
danchild marked this pull request as ready for review August 6, 2026 18:13
@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 Aug 6, 2026
@openshift-ci
openshift-ci Bot requested review from gryf and mandre August 6, 2026 18:15
The cloud-network-config-controller supports an optional
max_allowed_address_pairs field set via a ConfigMap. This adds coverage
for two paths: the normal lifecycle where setting the field changes operator
behavior and triggers a CNCC deployment rollout, and the degradation path
where an invalid value causes the network operator to report Degraded with
the config key in the message.

- Add BeforeEach setup that records baseline egress IP capacity per node
  and verifies CNCC is healthy before each spec
- Add helper functions for creating/deleting the ConfigMap, waiting for
  a CNCC rollout, checking network operator degraded status, and waiting
  for operator recovery
- Happy-path test: set a valid value, verify per-node egress IP capacity
  reflects the configured limit, delete the ConfigMap, verify capacity
  returns to baseline
- Invalid-value degradation test: for each of "0", "-5", and "abc", verify
  the network operator enters Degraded state with the config key referenced
  in the message, then recovers after the ConfigMap is deleted

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Dan Childers <dchilder@redhat.com>
@danchild
danchild force-pushed the cloud-network-config-max-address-pairs branch from e89f05e to 1741c5e Compare August 6, 2026 19:35
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@danchild: The following test 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/test 1741c5e link true /test test

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants