Skip to content

OCPBUGS-77457: Respect proxy configuration on gwapi provisioning#1383

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
rikatz:use-system-proxy-for-istio
Mar 20, 2026
Merged

OCPBUGS-77457: Respect proxy configuration on gwapi provisioning#1383
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
rikatz:use-system-proxy-for-istio

Conversation

@rikatz
Copy link
Copy Markdown
Member

@rikatz rikatz commented Mar 12, 2026

This PR adds support for global proxy configuration on Gateway API provisioning.

It mutates the Istio resource creation to pass the *_PROXY environment variables when deploying Istio controller, and this is passed down to Gateway instances created by users.

This configuration allows envoy proxies that rely on downloading WASMPlugins, on an air-gapped environment that enforces the usage of a network proxy, to download the artifacts using the network proxy.

Test executed

  • Deploy the current version on a running cluster
  • Deploy GatewayClass and Gateway
  • Gateway instance does NOT have the envvars for HTTP_PROXY
  • Configure the proxy: kubectl edit proxy cluster
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
  name: cluster
spec:
  httpProxy: http://some.proxy.tld:8080
  httpsProxy: http://another.proxy.tld:8080
  • Verify the status is added to the proxy kubectl get proxy cluster -o yaml
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
  name: cluster
...
status:
  httpProxy: http://some.proxy.tld:8080
  httpsProxy: http://another.proxy.tld:8080
  noProxy: .cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost
  • The Gateway API envoy instance is re-created with the right envvars: kubectl get pods -n openshift-ingress testcustom-openshift-default-7686989d6f-nxwmw -o jsonpath='{range .spec.containers[*].env[*]}{.name}{"="}{.value}{"\n"}{end}' |grep PROXY
PROXY_CONFIG={"discoveryAddress":"istiod-openshift-gateway.openshift-ingress.svc:15012","proxyMetadata":{"HTTPS_PROXY":"http://another.proxy.tld:8080","HTTP_PROXY":"http://some.proxy.tld:8080","NO_PROXY":".cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost"},"proxyHeaders":{"server":{"disabled":true},"envoyDebugHeaders":{"disabled":true},"metadataExchangeHeaders":{"mode":"IN_MESH"}}}
HTTPS_PROXY=http://another.proxy.tld:8080
HTTP_PROXY=http://some.proxy.tld:8080
NO_PROXY=.cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost

@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. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 12, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: This pull request references Jira Issue OCPBUGS-77457, which is invalid:

  • expected the bug to target the "4.22.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:

This PR adds support for global proxy configuration on Gateway API provisioning.

It mutates the Istio resource creation to pass the *_PROXY environment variables when deploying Istio controller, and this is passed down to Gateway instances created by users.

This configuration allows envoy proxies that rely on downloading WASMPlugins, on an air-gapped environment that enforces the usage of a network proxy, to download the artifacts using the network proxy.

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 requested review from bentito and rfredette March 12, 2026 21:40
@rikatz rikatz force-pushed the use-system-proxy-for-istio branch from f2521d5 to 7107797 Compare March 12, 2026 21:40
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 41620ec9-dc7c-4ed4-8e70-4ae5f47bd994

📥 Commits

Reviewing files that changed from the base of the PR and between 34eb7aa and ea77eed.

📒 Files selected for processing (5)
  • pkg/operator/controller/gatewayclass/controller.go
  • pkg/operator/controller/gatewayclass/controller_test.go
  • pkg/operator/controller/gatewayclass/istio_olm.go
  • pkg/operator/controller/gatewayclass/istio_sail_installer.go
  • pkg/operator/controller/gatewayclass/istio_sail_installer_test.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/operator/controller/gatewayclass/controller.go
  • pkg/operator/controller/gatewayclass/controller_test.go

📝 Walkthrough

Walkthrough

The changes add support for reading the OpenShift cluster-scoped configv1.Proxy named "cluster" and propagate it into Istio mesh settings. A new internal extraIstioConfig struct holds the proxy data. The controller watches the cluster Proxy resource and enqueues GatewayClass reconciliations on changes. desiredIstio, buildInstallerOptions, and openshiftValues were extended to accept extraIstioConfig and conditionally inject proxy metadata into MeshConfig.DefaultConfig. Tests and test helpers were extended and new test cases validate proxy metadata propagation for OLM and Sail Library installation paths.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'OCPBUGS-77457: Respect proxy configuration on gwapi provisioning' directly summarizes the main change: adding proxy configuration support to Gateway API provisioning.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of proxy configuration support, how it works, and providing detailed test results that validate the implementation.
Stable And Deterministic Test Names ✅ Passed All test names in the modified pull request are stable and deterministic, using Go's standard testing package with static, descriptive names without dynamic information.
Test Structure And Quality ✅ Passed Custom check not applicable; codebase uses standard Go testing, not Ginkgo framework. New test follows established patterns with single responsibility, helper functions, table-driven design, and meaningful assertions.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 12, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 12, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: This pull request references Jira Issue OCPBUGS-77457, which is valid. The bug has been moved to the POST state.

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

No GitHub users were found matching the public email listed for the QA contact in Jira (iamin@redhat.com), skipping review request.

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.

Copy link
Copy Markdown

@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

🧹 Nitpick comments (1)
pkg/operator/controller/gatewayclass/controller.go (1)

149-151: Scope Proxy watch to the cluster resource.

This controller only consumes Proxy named cluster (Line 241). Adding a name predicate here avoids unnecessary reconciles and keeps intent explicit.

Proposed refactor
+	isClusterProxy := predicate.NewPredicateFuncs(func(o client.Object) bool {
+		return o.GetName() == "cluster"
+	})
 	// Watch for Proxy configuration to set the right options on Istio resource
-	if err := c.Watch(source.Kind[client.Object](operatorCache, &configv1.Proxy{}, reconciler.enqueueRequestForSomeGatewayClass())); err != nil {
+	if err := c.Watch(source.Kind[client.Object](operatorCache, &configv1.Proxy{}, reconciler.enqueueRequestForSomeGatewayClass(), isClusterProxy)); err != nil {
 		return nil, err
 	}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/operator/controller/gatewayclass/controller.go` around lines 149 - 151,
The Proxy watch is currently broad; restrict
c.Watch(source.Kind[client.Object](operatorCache, &configv1.Proxy{},
reconciler.enqueueRequestForSomeGatewayClass())) to only trigger for the Proxy
named "cluster". Update the Watch call to include a name predicate (e.g., using
controller-runtime predicate.Funcs or predicate.NewPredicateFuncs) that checks
object.GetName() == "cluster" so only the configv1.Proxy named "cluster" causes
reconciles via reconciler.enqueueRequestForSomeGatewayClass().
🤖 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/operator/controller/gatewayclass/istio.go`:
- Around line 219-225: The code writes all three proxy keys into
istio.Spec.Values.MeshConfig.DefaultConfig.ProxyMetadata even when some proxycfg
fields are empty, leading to empty env vars; update the block that currently
checks if proxycfg.HTTPProxy != "" || proxycfg.HTTPSProxy != "" ||
proxycfg.NoProxy != "" to set each key conditionally—only assign
ProxyMetadata["HTTP_PROXY"] when proxycfg.HTTPProxy != "", only assign
ProxyMetadata["HTTPS_PROXY"] when proxycfg.HTTPSProxy != "", and only assign
ProxyMetadata["NO_PROXY"] when proxycfg.NoProxy != ""; ensure ProxyMetadata map
creation remains as-is (create if nil) before these conditional assignments.

---

Nitpick comments:
In `@pkg/operator/controller/gatewayclass/controller.go`:
- Around line 149-151: The Proxy watch is currently broad; restrict
c.Watch(source.Kind[client.Object](operatorCache, &configv1.Proxy{},
reconciler.enqueueRequestForSomeGatewayClass())) to only trigger for the Proxy
named "cluster". Update the Watch call to include a name predicate (e.g., using
controller-runtime predicate.Funcs or predicate.NewPredicateFuncs) that checks
object.GetName() == "cluster" so only the configv1.Proxy named "cluster" causes
reconciles via reconciler.enqueueRequestForSomeGatewayClass().

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: c7f1262f-41c7-400b-b086-31a3ae34bd0d

📥 Commits

Reviewing files that changed from the base of the PR and between c2eae34 and 7107797.

📒 Files selected for processing (3)
  • pkg/operator/controller/gatewayclass/controller.go
  • pkg/operator/controller/gatewayclass/controller_test.go
  • pkg/operator/controller/gatewayclass/istio.go

@rikatz rikatz force-pushed the use-system-proxy-for-istio branch from 7107797 to d47b784 Compare March 12, 2026 22:01
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: This pull request references Jira Issue OCPBUGS-77457, which is valid.

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

No GitHub users were found matching the public email listed for the QA contact in Jira (iamin@redhat.com), skipping review request.

Details

In response to this:

This PR adds support for global proxy configuration on Gateway API provisioning.

It mutates the Istio resource creation to pass the *_PROXY environment variables when deploying Istio controller, and this is passed down to Gateway instances created by users.

This configuration allows envoy proxies that rely on downloading WASMPlugins, on an air-gapped environment that enforces the usage of a network proxy, to download the artifacts using the network proxy.

Test executed

  • Deploy the current version on a running cluster
  • Deploy GatewayClass and Gateway
  • Gateway instance does NOT have the envvars for HTTP_PROXY
  • Configure the proxy: kubectl edit proxy cluster
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
 name: cluster
spec:
 httpProxy: http://some.proxy.tld:8080
 httpsProxy: http://another.proxy.tld:8080
  • Verify the status is added to the proxy kubectl get proxy cluster -o yaml
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
 name: cluster
...
status:
 httpProxy: http://some.proxy.tld:8080
 httpsProxy: http://another.proxy.tld:8080
 noProxy: .cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost
  • The Gateway API envoy instance is re-created with the right envvars: kubectl get pods -n openshift-ingress testcustom-openshift-default-7686989d6f-nxwmw -o jsonpath='{range .spec.containers[*].env[*]}{.name}{"="}{.value}{"\n"}{end}' |grep PROXY
PROXY_CONFIG={"discoveryAddress":"istiod-openshift-gateway.openshift-ingress.svc:15012","proxyMetadata":{"HTTPS_PROXY":"http://another.proxy.tld:8080","HTTP_PROXY":"http://some.proxy.tld:8080","NO_PROXY":".cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost"},"proxyHeaders":{"server":{"disabled":true},"envoyDebugHeaders":{"disabled":true},"metadataExchangeHeaders":{"mode":"IN_MESH"}}}
HTTPS_PROXY=http://another.proxy.tld:8080
HTTP_PROXY=http://some.proxy.tld:8080
NO_PROXY=.cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost

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.

@lihongan
Copy link
Copy Markdown
Contributor

/retest

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 13, 2026

@coderabbitai do a full analysis of this PR, but tell me just if there are any critical or major issues

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

Let me read the actual code changes to do a thorough analysis.


🏁 Script executed:

#!/bin/bash
echo "=== controller.go ==="
cat pkg/operator/controller/gatewayclass/controller.go

echo ""
echo "=== istio.go ==="
cat pkg/operator/controller/gatewayclass/istio.go

echo ""
echo "=== controller_test.go ==="
cat pkg/operator/controller/gatewayclass/controller_test.go

Length of output: 36084


@rikatz: I reviewed all three files. No critical issues found — the core logic is correct, proxy removal is handled properly, and the test coverage is solid. There are two major concerns worth addressing:


🔴 Major: Missing name predicate on the Proxy watch

In controller.go, the Proxy watch triggers on all configv1.Proxy resources, not just "cluster":

// Current — no filter
if err := c.Watch(source.Kind[client.Object](operatorCache, &configv1.Proxy{},
    reconciler.enqueueRequestForSomeGatewayClass())); err != nil {
    return nil, err
}

But Reconcile only ever reads the "cluster" proxy. Any other Proxy object mutating will cause spurious reconciliations. Should be:

isClusterProxy := predicate.NewPredicateFuncs(func(o client.Object) bool {
    return o.GetName() == "cluster"
})
if err := c.Watch(source.Kind[client.Object](operatorCache, &configv1.Proxy{},
    reconciler.enqueueRequestForSomeGatewayClass(), isClusterProxy)); err != nil {
    return nil, err
}

🟠 Major: r.client.Get used for Proxy instead of r.cache.Get

All other resource reads in Reconcile use r.cache.Get (e.g., GatewayClass), but the Proxy read uses r.client.Get:

// Current — bypasses the cache
if err := r.client.Get(ctx, types.NamespacedName{Name: "cluster"}, &proxyConfig); err != nil && ...

This is inconsistent with the rest of the controller and, depending on how the manager's client is configured, could read stale data that doesn't match what the informer-based watch is seeing. Should be:

if err := r.cache.Get(ctx, types.NamespacedName{Name: "cluster"}, &proxyConfig); err != nil && ...

🟡 Minor: extraConfig.proxyConfig != nil is always true

Since proxyConfig is declared as a value type and &proxyConfig is always passed (even when NotFound), the nil check in desiredIstio is vacuously true. It's functionally safe because of the len(proxyMetadata) > 0 guard, but misleading. Consider passing nil explicitly when the proxy is not found:

var extraConfig *extraIstioConfig
if proxyConfig.Name != "" { // i.e., was actually fetched
    extraConfig = &extraIstioConfig{proxyConfig: &proxyConfig}
}
if _, _, err := r.ensureIstio(ctx, &gatewayclass, istioVersion, extraConfig); err != nil {

@rikatz rikatz force-pushed the use-system-proxy-for-istio branch from d47b784 to e6461cc Compare March 13, 2026 12:08
Copy link
Copy Markdown

@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/operator/controller/gatewayclass/controller_test.go (1)

54-65: Add regression cases for partial and removed proxy config.

Please add table cases where only one/two proxy fields are set, and where proxy config transitions from set → empty/not-found, to lock in key omission/removal behavior.

Also applies to: 140-302

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

In `@pkg/operator/controller/gatewayclass/controller_test.go` around lines 54 -
65, Add table-driven test cases in controller_test.go around the proxyConfig and
istio helpers to cover (1) partial proxy fields (only HTTP, only HTTPS, only
NoProxy, and combinations of two) and (2) transitions where a proxy entry goes
from set → empty string and set → not-found (i.e., removed from the config map).
For each case, use the proxyConfig(...) constructor to create the initial
cluster proxy status and the istio(...) helper to build the Istio resource, then
assert the controller behavior/expected output when reconciling after the
partial configs and after the transition from a populated proxy to an empty or
missing proxy config; ensure you add explicit table rows for each permutation so
omission/removal behavior is exercised and locked in.
pkg/operator/controller/gatewayclass/controller.go (1)

243-278: Preserve explicit nil semantics for missing cluster Proxy.

Line 244 and Line 276 currently pass a non-nil proxy pointer even when the cluster Proxy is not found. Consider passing nil in that path so extraConfig.proxyConfig != nil remains meaningful and future-safe.

Suggested refactor
-	var proxyConfig configv1.Proxy
-	if err := r.cache.Get(ctx, types.NamespacedName{Name: "cluster"}, &proxyConfig); err != nil && !errors.IsNotFound(err) {
-		return reconcile.Result{}, err
-	}
+	var proxyConfig *configv1.Proxy
+	var clusterProxy configv1.Proxy
+	if err := r.cache.Get(ctx, types.NamespacedName{Name: "cluster"}, &clusterProxy); err != nil {
+		if !errors.IsNotFound(err) {
+			return reconcile.Result{}, err
+		}
+	} else {
+		proxyConfig = &clusterProxy
+	}
...
-	if _, _, err := r.ensureIstio(ctx, &gatewayclass, istioVersion, &extraIstioConfig{
-		proxyConfig: &proxyConfig,
+	if _, _, err := r.ensureIstio(ctx, &gatewayclass, istioVersion, &extraIstioConfig{
+		proxyConfig: proxyConfig,
 	}); err != nil {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/operator/controller/gatewayclass/controller.go` around lines 243 - 278,
The code currently always passes a non-nil pointer for proxyConfig even when the
"cluster" Proxy is missing; change the Get logic to preserve explicit nil
semantics by using a proxy pointer variable (e.g., proxyConfigPtr
*configv1.Proxy) initialized to nil, call r.cache.Get(ctx,
types.NamespacedName{Name: "cluster"}, &proxyConfig) and if err == nil set
proxyConfigPtr = &proxyConfig, if errors.IsNotFound(err) leave proxyConfigPtr
nil, and if other error return it; then pass proxyConfigPtr into ensureIstio via
extraIstioConfig{ proxyConfig: proxyConfigPtr } so extraIstioConfig.proxyConfig
!= nil stays meaningful.
🤖 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/operator/controller/gatewayclass/controller_test.go`:
- Around line 54-65: Add table-driven test cases in controller_test.go around
the proxyConfig and istio helpers to cover (1) partial proxy fields (only HTTP,
only HTTPS, only NoProxy, and combinations of two) and (2) transitions where a
proxy entry goes from set → empty string and set → not-found (i.e., removed from
the config map). For each case, use the proxyConfig(...) constructor to create
the initial cluster proxy status and the istio(...) helper to build the Istio
resource, then assert the controller behavior/expected output when reconciling
after the partial configs and after the transition from a populated proxy to an
empty or missing proxy config; ensure you add explicit table rows for each
permutation so omission/removal behavior is exercised and locked in.

In `@pkg/operator/controller/gatewayclass/controller.go`:
- Around line 243-278: The code currently always passes a non-nil pointer for
proxyConfig even when the "cluster" Proxy is missing; change the Get logic to
preserve explicit nil semantics by using a proxy pointer variable (e.g.,
proxyConfigPtr *configv1.Proxy) initialized to nil, call r.cache.Get(ctx,
types.NamespacedName{Name: "cluster"}, &proxyConfig) and if err == nil set
proxyConfigPtr = &proxyConfig, if errors.IsNotFound(err) leave proxyConfigPtr
nil, and if other error return it; then pass proxyConfigPtr into ensureIstio via
extraIstioConfig{ proxyConfig: proxyConfigPtr } so extraIstioConfig.proxyConfig
!= nil stays meaningful.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: f8717dff-4fc4-40c3-b0d4-cdf9b1dac1a9

📥 Commits

Reviewing files that changed from the base of the PR and between 7107797 and e6461cc.

📒 Files selected for processing (3)
  • pkg/operator/controller/gatewayclass/controller.go
  • pkg/operator/controller/gatewayclass/controller_test.go
  • pkg/operator/controller/gatewayclass/istio.go

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 13, 2026

/retest-required

1 similar comment
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 13, 2026

/retest-required

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 16, 2026

/test e2e-gcp-operator
flaky because of internal LB...

@bentito
Copy link
Copy Markdown
Contributor

bentito commented Mar 17, 2026

/assign @bentito

@bentito
Copy link
Copy Markdown
Contributor

bentito commented Mar 17, 2026

/lgtm

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

gcs278 commented Mar 18, 2026

/assign @Thealisyed

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2026
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 19, 2026

added everything and tested here:

kubectl get pods -n openshift-ingress testcustom-openshift-default-7d6f4c5858-97ftd -o jsonpath='{range .spec.containers[*].env[*]}{.name}{"="}{.value}{"\n"}{end}' |grep -i PROXY
PROXY_CONFIG={"discoveryAddress":"istiod-openshift-gateway.openshift-ingress.svc:15012","proxyMetadata":{"HTTPS_PROXY":"http://another.proxy.tld:8080","HTTP_PROXY":"http://some.proxy.tld:8080","NO_PROXY":".cluster.local,.ec2.internal,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-0rkglt2-76ef8.aws-4.ci.openshift.org,localhost","http_proxy":"http://some.proxy.tld:8080","https_proxy":"http://another.proxy.tld:8080","no_proxy":".cluster.local,.ec2.internal,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-0rkglt2-76ef8.aws-4.ci.openshift.org,localhost"},"proxyHeaders":{"server":{"disabled":true},"envoyDebugHeaders":{"disabled":true},"metadataExchangeHeaders":{"mode":"IN_MESH"}}}
HTTPS_PROXY=http://another.proxy.tld:8080
HTTP_PROXY=http://some.proxy.tld:8080
NO_PROXY=.cluster.local,.ec2.internal,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-0rkglt2-76ef8.aws-4.ci.openshift.org,localhost
http_proxy=http://some.proxy.tld:8080
https_proxy=http://another.proxy.tld:8080
no_proxy=.cluster.local,.ec2.internal,.svc,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-0rkglt2-76ef8.aws-4.ci.openshift.org,localhost

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 19, 2026

and applying a wasmfilter on my Gateway I can see it fails to download because of proxy:

2026-03-19T21:22:52.910761Z	error	wasm	error in converting the wasm config to local: cannot fetch Wasm module oci://ghcr.io/networking-incubator/coraza-proxy-wasm:1902646ac7391b65be092cdec9b47d29fa5724c7: could not fetch Wasm OCI image: could not fetch manifest: Get "https://ghcr.io/v2/": proxyconnect tcp: dial tcp: lookup another.proxy.tld on 172.30.0.10:53: no such host. applying deny RBAC filter

and removing the proxy configuration it works:

2026-03-19T21:24:37.933392Z	info	wasm	fetching image networking-incubator/coraza-proxy-wasm from registry ghcr.io with tag 1902646ac7391b65be092cdec9b47d29fa5724c7
2026-03-19T21:24:41.265851Z	critical	envoy wasm external/envoy/source/extensions/common/wasm/context.cc:1158	wasm log: Fetching initial rules from ruleset cache server: outbound|80||coraza-kubernetes-operator.coraza-system.svc.cluster.local, instance: default/default-ruleset	thread=9

@gcs278
Copy link
Copy Markdown
Contributor

gcs278 commented Mar 19, 2026

Everything makes sense logically in the code, and seems like a straightforward change.

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278

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 Mar 19, 2026
@gcs278
Copy link
Copy Markdown
Contributor

gcs278 commented Mar 19, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 19, 2026
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 19, 2026

/cc @lihongan @ShudiLi @melvinjoseph86 @rhamini3
if I can get a "/verified"

the test of hypershift-conformance is failing but not due to this PR, so we may override it.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 20, 2026

Confirming, I have tested it on both OLM and non-OLM environment:

  • Created an HTTP Proxy on build cluster (authenticated) and exposed it
  • Configured the proxy on proxies
spec:
    httpProxy: http://user:pwd@address:8080
    httpsProxy: http://user:pwd@address:8080

Installed gateway class

  • Worked on OLM, could fetch the wasmplugin
  • Enabled featuregate for non-OLM
  • new proxy was provisioned also with the envvars
  • wasmplugin could still be downloaded through the proxy

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 20, 2026

/retest-required

1 similar comment
@lihongan
Copy link
Copy Markdown
Contributor

/retest-required

@lihongan
Copy link
Copy Markdown
Contributor

/retest-required

some tests timeout (15m) in hypershift-conformance

@lihongan
Copy link
Copy Markdown
Contributor

/verified by @lihongan

launch proxy cluster and the related ENV are applied

$ oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-03-20-101006-test-ci-ln-085s20t-latest   True        False         21m     Cluster version is 4.22.0-0-2026-03-20-101006-test-ci-ln-085s20t-latest

$ oc -n openshift-ingress get deployment gateway-openshift-default -oyaml | grep PROXY -A1
        - name: PROXY_CONFIG
          value: |
            {"discoveryAddress":"istiod-openshift-gateway.openshift-ingress.svc:15012","proxyMetadata": ...
        - name: HTTPS_PROXY
          value: http://ci-xx:xxx@10.0.1.181:xxx/
        - name: HTTP_PROXY
          value: http://ci-xx:xxx@10.0.1.181:xxx/
        - name: NO_PROXY
          value: .cluster.local,.svc,....

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 20, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

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

Details

In response to this:

/verified by @lihongan

launch proxy cluster and the related ENV are applied

$ oc get clusterversion
NAME      VERSION                                                AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.22.0-0-2026-03-20-101006-test-ci-ln-085s20t-latest   True        False         21m     Cluster version is 4.22.0-0-2026-03-20-101006-test-ci-ln-085s20t-latest

$ oc -n openshift-ingress get deployment gateway-openshift-default -oyaml | grep PROXY -A1
       - name: PROXY_CONFIG
         value: |
           {"discoveryAddress":"istiod-openshift-gateway.openshift-ingress.svc:15012","proxyMetadata": ...
       - name: HTTPS_PROXY
         value: http://ci-xx:xxx@10.0.1.181:xxx/
       - name: HTTP_PROXY
         value: http://ci-xx:xxx@10.0.1.181:xxx/
       - name: NO_PROXY
         value: .cluster.local,.svc,....

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.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Mar 20, 2026

/override ci/prow/e2e-aws-ovn-hypershift-conformance

test is permafailing: https://redhat.atlassian.net/browse/OCPBUGS-78977

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 20, 2026

@rikatz: Overrode contexts on behalf of rikatz: ci/prow/e2e-aws-ovn-hypershift-conformance

Details

In response to this:

/override ci/prow/e2e-aws-ovn-hypershift-conformance

test is permafailing: https://redhat.atlassian.net/browse/OCPBUGS-78977

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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 20, 2026

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

@openshift-merge-bot openshift-merge-bot bot merged commit 2b994ed into openshift:master Mar 20, 2026
18 checks passed
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: Jira Issue Verification Checks: Jira Issue OCPBUGS-77457
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-77457 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

This PR adds support for global proxy configuration on Gateway API provisioning.

It mutates the Istio resource creation to pass the *_PROXY environment variables when deploying Istio controller, and this is passed down to Gateway instances created by users.

This configuration allows envoy proxies that rely on downloading WASMPlugins, on an air-gapped environment that enforces the usage of a network proxy, to download the artifacts using the network proxy.

Test executed

  • Deploy the current version on a running cluster
  • Deploy GatewayClass and Gateway
  • Gateway instance does NOT have the envvars for HTTP_PROXY
  • Configure the proxy: kubectl edit proxy cluster
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
 name: cluster
spec:
 httpProxy: http://some.proxy.tld:8080
 httpsProxy: http://another.proxy.tld:8080
  • Verify the status is added to the proxy kubectl get proxy cluster -o yaml
apiVersion: config.openshift.io/v1
kind: Proxy
metadata:
 name: cluster
...
status:
 httpProxy: http://some.proxy.tld:8080
 httpsProxy: http://another.proxy.tld:8080
 noProxy: .cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost
  • The Gateway API envoy instance is re-created with the right envvars: kubectl get pods -n openshift-ingress testcustom-openshift-default-7686989d6f-nxwmw -o jsonpath='{range .spec.containers[*].env[*]}{.name}{"="}{.value}{"\n"}{end}' |grep PROXY
PROXY_CONFIG={"discoveryAddress":"istiod-openshift-gateway.openshift-ingress.svc:15012","proxyMetadata":{"HTTPS_PROXY":"http://another.proxy.tld:8080","HTTP_PROXY":"http://some.proxy.tld:8080","NO_PROXY":".cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost"},"proxyHeaders":{"server":{"disabled":true},"envoyDebugHeaders":{"disabled":true},"metadataExchangeHeaders":{"mode":"IN_MESH"}}}
HTTPS_PROXY=http://another.proxy.tld:8080
HTTP_PROXY=http://some.proxy.tld:8080
NO_PROXY=.cluster.local,.svc,.us-east-2.compute.internal,10.0.0.0/16,10.128.0.0/14,127.0.0.1,169.254.169.254,172.30.0.0/16,api-int.ci-ln-s0bqi4k-76ef8.aws-2.ci.openshift.org,localhost

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.

stbenjam added a commit to stbenjam/cluster-ingress-operator that referenced this pull request Mar 20, 2026
…y-for-istio"

This reverts commit 2b994ed, reversing
changes made to 128729e.
@lihongan
Copy link
Copy Markdown
Contributor

Fix included in accepted release 4.22.0-0.nightly-2026-03-23-022245

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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants