Skip to content

OCPBUGS-81741: Watch Network and Infrastructure in proxyconfig controller#2968

Open
jluhrsen wants to merge 1 commit into
openshift:masterfrom
jluhrsen:OCPBUGS-81741-master
Open

OCPBUGS-81741: Watch Network and Infrastructure in proxyconfig controller#2968
jluhrsen wants to merge 1 commit into
openshift:masterfrom
jluhrsen:OCPBUGS-81741-master

Conversation

@jluhrsen

@jluhrsen jluhrsen commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

The proxyconfig controller reads Network.Status.ClusterNetwork and Infrastructure.Status to compute Proxy.Status.NoProxy, but only watched Proxy and ConfigMaps. Network or Infrastructure changes would not trigger reconciliation, leaving proxy status stale.

Add watches for Network and Infrastructure resources to ensure reconciliation occurs when these resources change.

Also add Proxy status subresource support to fake client and unit tests covering reconciliation logic.

Co-authored-by: Claude Code <noreply@anthropic.com)

Summary by CodeRabbit

  • Tests

    • Added comprehensive unit tests for proxy reconciliation, validating status updates when network or infrastructure change, empty-spec behavior, and handling missing resources.
  • Improvements

    • Controller now watches Network and Infrastructure and more predictably handles cluster-scoped events to keep proxy status in sync.
  • Chores

    • Test harness and fake client extended to include proxy status subresource for more realistic test scenarios.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Apr 22, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jluhrsen: This pull request references Jira Issue OCPBUGS-81741, which is invalid:

  • expected the bug to target the "5.0.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

The proxyconfig controller reads Network.Status.ClusterNetwork and Infrastructure.Status to compute Proxy.Status.NoProxy, but only watched Proxy and ConfigMaps. Network or Infrastructure changes would not trigger reconciliation, leaving proxy status stale.

Add watches for Network and Infrastructure resources to ensure reconciliation occurs when these resources change.

Also add Proxy status subresource support to fake client and unit tests covering reconciliation logic.

Co-authored-by: Claude Code <noreply@anthropic.com)

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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 22, 2026
@coderabbitai

coderabbitai Bot commented Apr 22, 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

Walkthrough

Adds Proxy to the fake client's status subresources, registers watches for configv1.Network and configv1.Infrastructure in the proxy controller, adjusts reconcile dispatch/logging for cluster-scoped requests, and adds tests verifying Proxy.Status.NoProxy updates and error handling.

Changes

Proxy status and watches

Layer / File(s) Summary
Fake client: include Proxy in status subresources
pkg/client/fake/fake_client.go
NewFakeClient constructs a configv1.Proxy and passes it to the fake client builder's WithStatusSubresource, enabling Proxy status handling in tests.
Controller: watch Network and Infrastructure; reconcile dispatch
pkg/controller/proxyconfig/controller.go
add(mgr, r) registers watches for configv1.Network and configv1.Infrastructure; reconcile entry logic treats cluster-scoped requests via empty request.Namespace, ignores unrelated cluster-scoped objects, and uses names.PROXY_CONFIG for proxy logs.
Tests: init and reconciliation scenarios
pkg/controller/proxyconfig/controller_test.go
Adds test scaffolding that registers configv1 types and tests ensuring ReconcileProxyConfig.Reconcile updates Proxy.Status.NoProxy for Network CIDR changes and Infrastructure APIServerInternalURL hostname changes; also covers empty Proxy spec and missing-resource error cases.

Sequence Diagram(s)

sequenceDiagram
  participant Network as Network (configv1)
  participant Infrastructure as Infrastructure (configv1)
  participant Controller as Controller
  participant Reconciler as Reconciler
  participant Proxy as Proxy (configv1)

  Note over Network,Infrastructure: Resource change events
  Network->>Controller: change event (ClusterNetwork)
  Infrastructure->>Controller: change event (APIServerInternalURL)

  Controller->>Reconciler: Enqueue reconcile request
  Reconciler->>Network: Read ClusterNetwork CIDRs
  Reconciler->>Infrastructure: Read APIServerInternalURL
  Reconciler->>Proxy: Update Status.NoProxy (CIDRs + hostname)
  Proxy->>Reconciler: Status updated
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning Tests use standard Go testing, not Ginkgo. All 13 context operations use context.TODO() without timeouts despite performing cluster I/O operations (Get/Update/Reconcile). Replace context.TODO() with context.WithTimeout() on all cluster I/O operations to add appropriate timeouts as required by the check.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding watches for Network and Infrastructure resources in the proxyconfig controller.
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
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.
Stable And Deterministic Test Names ✅ Passed PR adds only standard Go tests (func Test*), no Ginkgo-style test names (It(), Describe(), etc.) present. Custom check targets Ginkgo tests only; not applicable to this PR.
Microshift Test Compatibility ✅ Passed The new tests are standard Go unit tests using testing.T, not Ginkgo e2e tests. The check applies specifically to Ginkgo e2e tests with It(), Describe(), etc., which are not present here.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds only unit tests (using testing.T), not Ginkgo e2e tests. SNO compatibility check only applies to new Ginkgo e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed PR introduces no scheduling constraints. Changes limited to controller wiring and test infrastructure only. No deployment manifests, pod specs, or topology constraints modified.
Ote Binary Stdout Contract ✅ Passed All logging in modified files uses Go's log package and klog, which default to stderr. Test file is standard Go testing (testing.T), not OTE/Ginkgo. No stdout writes found in process-level code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new test file (controller_test.go) uses standard Go testing, not Ginkgo e2e tests. The custom check applies only to Ginkgo e2e tests (with It(), Describe(), etc.), so it is not applicable here.
No-Weak-Crypto ✅ Passed No weak cryptography, custom crypto implementations, or unsafe secret comparisons detected. Changes involve only proxy controller logic, watches, and tests with no cryptographic code.
Container-Privileges ✅ Passed PR modifies only Go source files (.go), not container/K8s manifests (YAML/JSON). Check is not applicable to this codebase change.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data exposed in logs. HTTPProxy/HTTPSProxy values (may contain auth) are never logged. Only safe metadata (object Name, Namespace) and error messages are logged.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from mattedallo and tssurya April 22, 2026 02:41

@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.

🧹 Nitpick comments (1)
pkg/controller/proxyconfig/controller_test.go (1)

220-228: Also assert that the old API hostname is removed.

Right now this test only proves the new hostname was added. It would still pass if reconciliation appended the new host without dropping the stale one.

Suggested assertion
 	if !strings.Contains(proxy.Status.NoProxy, updatedAPIServer) {
 		t.Errorf("Expected proxy.Status.NoProxy to contain updated API server %s, got: %s",
 			updatedAPIServer, proxy.Status.NoProxy)
 	}
+	if strings.Contains(proxy.Status.NoProxy, initialAPIServer) {
+		t.Errorf("proxy.Status.NoProxy still contains old API server %s, got: %s",
+			initialAPIServer, proxy.Status.NoProxy)
+	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/controller/proxyconfig/controller_test.go` around lines 220 - 228, The
test currently only asserts that proxy.Status.NoProxy contains updatedAPIServer;
also assert that the previous API hostname is removed by checking that
strings.Contains(proxy.Status.NoProxy, oldAPIServer) is false (use whatever
variable name holds the pre-update hostname in this test), i.e., add an
assertion after fetching proxy that proxy.Status.NoProxy does NOT contain the
old API hostname to ensure reconciliation replaced rather than appended the
host.
🤖 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/controller/proxyconfig/controller_test.go`:
- Around line 220-228: The test currently only asserts that proxy.Status.NoProxy
contains updatedAPIServer; also assert that the previous API hostname is removed
by checking that strings.Contains(proxy.Status.NoProxy, oldAPIServer) is false
(use whatever variable name holds the pre-update hostname in this test), i.e.,
add an assertion after fetching proxy that proxy.Status.NoProxy does NOT contain
the old API hostname to ensure reconciliation replaced rather than appended the
host.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 41e9f990-8f6b-40f0-b896-52eb993948a5

📥 Commits

Reviewing files that changed from the base of the PR and between bdbba59 and 16d068b.

📒 Files selected for processing (3)
  • pkg/client/fake/fake_client.go
  • pkg/controller/proxyconfig/controller.go
  • pkg/controller/proxyconfig/controller_test.go

@jluhrsen

Copy link
Copy Markdown
Contributor Author

/retest

@jluhrsen

Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 20, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@jluhrsen: This pull request references Jira Issue OCPBUGS-81741, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

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 removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label May 20, 2026
@jluhrsen jluhrsen force-pushed the OCPBUGS-81741-master branch from 16d068b to 74e43ba Compare May 20, 2026 22:46
@jluhrsen

Copy link
Copy Markdown
Contributor Author

@danwinship @tssurya @kyrtapz @pliurh looking for someone to check on this. it's been sitting idle on my open bug list for a while now. haven't really followed up to find a reviewer yet.

I've verified the fix manually and passed this through coderabbit review (locally). should be good for a human to look now.

@jluhrsen

jluhrsen commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@jluhrsen

jluhrsen commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@jluhrsen

jluhrsen commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

/test 4.22-upgrade-from-stable-4.21-e2e-azure-ovn-upgrade

@danwinship danwinship left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(oops, I reviewed this the other day but I guess I forgot to hit "submit")

}

// Watch for changes to the network resource.
err = c.Watch(source.Kind[crclient.Object](mgr.GetCache(), &configv1.Network{}, &handler.EnqueueRequestForObject{}))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should require a change to Reconcile() too shouldn't it? (It checks what kind of object it's reconciling.)

Assuming that's correct, that means this patch doesn't actually work at all, which makes me feel like it probably ought to have had a corresponding e2e test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @danwinship . I tested this fix with a live cluster so I am pretty confident in the change, but obviously don't know this code base like you do.

But, I think it works because Reconcile() is interested in the "Name" which I guess always will be "cluster" for these.

I think an e2e might be complicated, but if you need one figured out to validate this even further, I try to figure it out.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

huh... you should fix Reconcile so that the switch does something that actually looks like it should work, rather than than something that just coincidentally happens to work. Possibly just split out the "configmap" and "not a configmap" cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, I think I see what you mean. I gave it another try to hopefully make it a little more clear

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@danwinship, WDYT?

@jluhrsen jluhrsen force-pushed the OCPBUGS-81741-master branch from 74e43ba to 67eeb38 Compare June 5, 2026 16:49

@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: 1

🤖 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 `@pkg/controller/proxyconfig/controller.go`:
- Line 117: The log call using log.Println in the proxyconfig controller (the
line that currently reads "Ignoring unknown cluster-scoped object,
reconciliation will be skipped", "request", request) should be changed to use
log.Printf with a format specifier so the request is rendered correctly; update
the logging in the reconcile/controller function where that log.Println appears
(reference the log.Println call) to something like log.Printf("Ignoring unknown
cluster-scoped object, reconciliation will be skipped: request=%v", request) so
the request value is formatted into the message.
🪄 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: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f179ee0c-097c-4ca1-b085-57f324f1b0c9

📥 Commits

Reviewing files that changed from the base of the PR and between 74e43ba and 67eeb38.

📒 Files selected for processing (3)
  • pkg/client/fake/fake_client.go
  • pkg/controller/proxyconfig/controller.go
  • pkg/controller/proxyconfig/controller_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/client/fake/fake_client.go
  • pkg/controller/proxyconfig/controller_test.go

Comment thread pkg/controller/proxyconfig/controller.go Outdated
@jluhrsen jluhrsen force-pushed the OCPBUGS-81741-master branch 2 times, most recently from fc3adac to 9818f9c Compare June 5, 2026 17:04
@jluhrsen

jluhrsen commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@jluhrsen

Copy link
Copy Markdown
Contributor Author

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

switch request.Namespace {
case "":
if request.Name != names.CLUSTER_CONFIG {
log.Printf("Ignoring unknown cluster-scoped object, reconciliation will be skipped: request=%v", request)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, so what I meant before was, change Reconcile() so that basically it checks "does request point to a ConfigMap in ADDL_TRUST_BUNDLE_CONFIGMAP_NS", and if it does, then it does that case, and if not, then it doesn't look at request again, it just assumes it's supposed to re-resolve the proxy config from the top down.

Maybe split those out into two functions, reconcileTrustBundle(request) and reconcileProxyConfig().

log.Printf("Reconciling proxy '%s'", request.Name)
if err := r.client.Get(ctx, request.NamespacedName, proxyConfig); err != nil {
log.Printf("Reconciling proxy '%s'", names.PROXY_CONFIG)
if err := r.client.Get(ctx, names.Proxy(), proxyConfig); err != nil {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(This change and the one below are correct.)

@jluhrsen jluhrsen force-pushed the OCPBUGS-81741-master branch from 9818f9c to 0afe4d3 Compare June 16, 2026 21:25
@jluhrsen

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@jluhrsen

Copy link
Copy Markdown
Contributor Author

/retest

@danwinship

Copy link
Copy Markdown
Contributor

So it's hard to point out in the diff, but it seems that a bunch of code got deleted in the rewrite.

Before, the trust bundle case was

		log.Printf("Reconciling additional trust bundle configmap '%s/%s'", request.Namespace, request.Name)
		// Only proceed if request matches the configmap referenced by proxy trustedCA.
		// Validate the trust bundle configmap.
		// Create a configmap containing the merged proxy.trustedCA/system bundles.
		// A nil proxy is generated by upgrades and installs not requiring a proxy.
			// Create a configmap containing the system trust bundle.
			// Validate trustedCA of proxy spec.
		log.Printf("Reconciling additional trust bundle configmap '%s/%s' complete", request.Namespace, request.Name)

now it's

        log.Printf("Reconciling additional trust bundle configmap '%s/%s'", request.Namespace, request.Name)
        // Only proceed if request matches the configmap referenced by proxy trustedCA.
        // Validate the trust bundle configmap.
        // Create a configmap containing the merged proxy.trustedCA/system bundles.
        log.Printf("Reconciling additional trust bundle configmap '%s/%s' complete", request.Namespace, request.Name)

That is, previously, half of the "Reconciling proxy" case was duplicated into the "Reconciling additional trust bundle" case, and now it isn't any longer. (The duplication of the code before was bad and ought to have been done in a better way, but we need to make sure we're doing all of the necessary steps. Or were those steps unnecessary?)

(Sorry, I'm not really familiar with this code, so I keep discovering more things as the diff touches more parts of the file...)

@jluhrsen jluhrsen force-pushed the OCPBUGS-81741-master branch from 0afe4d3 to e4f6dcd Compare June 17, 2026 21:00
@jluhrsen

Copy link
Copy Markdown
Contributor Author

So it's hard to point out in the diff, but it seems that a bunch of code got deleted in the rewrite.

Before, the trust bundle case was

		log.Printf("Reconciling additional trust bundle configmap '%s/%s'", request.Namespace, request.Name)
		// Only proceed if request matches the configmap referenced by proxy trustedCA.
		// Validate the trust bundle configmap.
		// Create a configmap containing the merged proxy.trustedCA/system bundles.
		// A nil proxy is generated by upgrades and installs not requiring a proxy.
			// Create a configmap containing the system trust bundle.
			// Validate trustedCA of proxy spec.
		log.Printf("Reconciling additional trust bundle configmap '%s/%s' complete", request.Namespace, request.Name)

now it's

        log.Printf("Reconciling additional trust bundle configmap '%s/%s'", request.Namespace, request.Name)
        // Only proceed if request matches the configmap referenced by proxy trustedCA.
        // Validate the trust bundle configmap.
        // Create a configmap containing the merged proxy.trustedCA/system bundles.
        log.Printf("Reconciling additional trust bundle configmap '%s/%s' complete", request.Namespace, request.Name)

That is, previously, half of the "Reconciling proxy" case was duplicated into the "Reconciling additional trust bundle" case, and now it isn't any longer. (The duplication of the code before was bad and ought to have been done in a better way, but we need to make sure we're doing all of the necessary steps. Or were those steps unnecessary?)

(Sorry, I'm not really familiar with this code, so I keep discovering more things as the diff touches more parts of the file...)

@danwinship , you are many times more familiar with this code base than I am, so no worries there.

I think the short answer is, yes those duplication steps were unnecessary, but maybe it wasn't perfectly de-duped 🤷🏻

the problem is that the original fix here was small and worked, but I get the confusion. so now we are in more of a refactor mode on top of that fix, and claude is recognizing that duplication and refactoring as it sees fit. I've spun the changes through codex and coderabbit double and triple checking that they believe functionality is not affected here. and yes, apparently there was unneeded duplication that got removed.

However, I've posted a new try. keeping the duplication so the review is easier to look at. But, it's not breaking things out in to your idea of two functions, reconcileTrustBundle(request) and reconcileProxyConfig(). When I try that we end up with the ugly diff. Maybe can think about a de-dup and split out refactor later if that seems important to you.

Does it, at least, make what's happening in Reconcile() a little more clear?

@jluhrsen

Copy link
Copy Markdown
Contributor Author

also, @danwinship , I created this as maybe a better idea to do this kind of refactoring you are noticing we need. It tries to make smaller refactor commits for easier review. please don't spend time on it yet, but let me know if you like this idea better and I'll take it further. I need to review it myself, let the e2e's run and who knows what the rabbit is gonna say about it.


switch {
case request.NamespacedName == names.Proxy():
case request.Namespace != names.ADDL_TRUST_BUNDLE_CONFIGMAP_NS:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
case request.Namespace != names.ADDL_TRUST_BUNDLE_CONFIGMAP_NS:
case request.Namespace != names.ADDL_TRUST_BUNDLE_CONFIGMAP_NS:
// Additional trust bundles are handled below; for all other config changes,
// regardless of which object changed, we just re-resolve everything starting
// from the Proxy config.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@danwinship

Copy link
Copy Markdown
Contributor

From what I was seeing when I looked at it before, it seemed like it might all boil down to

if the reconciliation is caused by a trust bundle change {
    update trust bundle stuff
}
re-resolve the proxy config from the top down

but anyway, the current simple fix (with the added explanatory comment) is good enough I guess

The proxyconfig controller reads Network.Status.ClusterNetwork and
Infrastructure.Status to compute Proxy.Status.NoProxy, but only
watched Proxy and ConfigMaps. Network or Infrastructure changes
would not trigger reconciliation, leaving proxy status stale.

Add watches for Network and Infrastructure resources to ensure
reconciliation occurs when these resources change. Refactor
Reconcile so non-ConfigMap events re-resolve proxy config from the
current cluster state rather than depending on the triggering request.

Also add Proxy status subresource support to fake client and unit
tests covering reconciliation logic.

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
@jluhrsen jluhrsen force-pushed the OCPBUGS-81741-master branch from e4f6dcd to 8db6228 Compare June 18, 2026 17:50
@jluhrsen

Copy link
Copy Markdown
Contributor Author

From what I was seeing when I looked at it before, it seemed like it might all boil down to

if the reconciliation is caused by a trust bundle change {
    update trust bundle stuff
}
re-resolve the proxy config from the top down

but anyway, the current simple fix (with the added explanatory comment) is good enough I guess

ok, thank you. if you think it's worth following up with the full refactor idea, let me know and I'll chase that down after this PR lands.

@jluhrsen

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@jluhrsen

Copy link
Copy Markdown
Contributor Author

/retest

@danwinship

Copy link
Copy Markdown
Contributor

/lgtm

I don't think the full refactor is worth it, given that neither of us really knows the code well enough to know exactly how it should be refactored 😬

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2026
@openshift-ci

openshift-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2026
@openshift-ci

openshift-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

@jluhrsen: 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/4.22-upgrade-from-stable-4.21-e2e-azure-ovn-upgrade 74e43ba link false /test 4.22-upgrade-from-stable-4.21-e2e-azure-ovn-upgrade
ci/prow/5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade 8db6228 link false /test 5.0-upgrade-from-stable-4.22-e2e-gcp-ovn-upgrade
ci/prow/e2e-gcp-ovn-upgrade 8db6228 link true /test e2e-gcp-ovn-upgrade
ci/prow/e2e-aws-ovn-upgrade 8db6228 link true /test e2e-aws-ovn-upgrade
ci/prow/e2e-aws-ovn-upgrade-ipsec 8db6228 link true /test e2e-aws-ovn-upgrade-ipsec
ci/prow/e2e-metal-ipi-ovn-dualstack-bgp-local-gw 8db6228 link true /test e2e-metal-ipi-ovn-dualstack-bgp-local-gw
ci/prow/e2e-ovn-ipsec-step-registry 8db6228 link true /test e2e-ovn-ipsec-step-registry
ci/prow/e2e-metal-ipi-ovn-ipv6-ipsec 8db6228 link true /test e2e-metal-ipi-ovn-ipv6-ipsec
ci/prow/e2e-azure-ovn-upgrade 8db6228 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. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants