OSASINFRA-4401: Add max_allowed_address_pairs cloud network config e2e test - #310
OSASINFRA-4401: Add max_allowed_address_pairs cloud network config e2e test#310danchild wants to merge 2 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
a7996e7 to
dc7dca9
Compare
|
@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. DetailsIn response to this:
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. |
dc7dca9 to
4be4c02
Compare
4be4c02 to
004ac53
Compare
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>
004ac53 to
e89f05e
Compare
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>
e89f05e to
1741c5e
Compare
|
@danchild: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
The
cloud-network-config-controllersupports an optionalmax_allowed_address_pairsfield passed via a ConfigMap. The following E2E test provides coverage for two paths:
rollout
to report
Degradedwith the config key in the message.The
egress-ipconfigannotation parsing logic is abstracted into a separate function tocover multiple call sites across the
openstack-testsuite.Summary of Changes:
ifAddr,capacity, andNodeEgressIPConfigurationout ofgetEgressNetworkInfo's function body into package-level typesparseEgressIPAnnotationhelper that handles annotation lookup andJSON unmarshalling, calling it in
getEgressNetworkInfoandgetEgressIPCapacityFromNodeBeforeEachsetup that records baseline egress IP capacity per node andverifies CNCC is healthy before each spec
rollout, checking network operator degraded status, and waiting for recovery
the configured limit, delete the ConfigMap, and verify capacity returns to baseline
"0","-5", and"abc", verifythe 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