OCPBUGS-76971: Update NetworkPolicy egress to support HyperShift custom API ports#3770
Conversation
Signed-off-by: Rashmi Gottipati <rgottipa@redhat.com>
Signed-off-by: Rashmi Gottipati <rgottipa@redhat.com>
Signed-off-by: Rashmi Gottipati <rgottipa@redhat.com>
|
[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 |
Signed-off-by: Rashmi Gottipati <rgottipa@redhat.com>
|
cc @kuiwang02 can you please verify this PR? |
|
/label qe-approved |
| // Wildcard allow all IPs/Ports for kube-apiserver | ||
| {}, | ||
| // Wildcard allow all IPs with DNS ports |
There was a problem hiding this comment.
The {} seems to make the specific ports for DNS redundant.
It's either allow all through, or allow these specific DNS ports.
There was a problem hiding this comment.
Yup this is intentional and adheres with the guidance from the networking team. The reasoning being that if we ever tighten the kube-apiserver rules in the future, we will have DNS rules already separated out and won't accidentally break DNS resolution.
But you're right that the DNS rules currently have no enforcement effect.
Description of the change:
This PR updates NetworkPolicy egress rules in OLM v0 to support HyperShift deployments that use custom Kubernetes API server ports.
Motivation for the change:
The current NetworkPolicy rules hardcode port 6443 for Kubernetes API server access, which breaks HyperShift deployments that customize the API server port. Based on the latest guidance across OCP, we should:
{}for kube-apiserver to allow all IPs/portsThis approach aligns with related projects (catalogd, operator-controller) and the companion fix in operator-marketplace (OCPBUGS-66980).
Architectural changes:
Testing remarks:
Reviewer Checklist
/doc[FLAKE]are truly flaky and have an issueCloses https://issues.redhat.com/browse/OCPBUGS-76971