fix: add egress NetworkPolicy for CA extractor on OCP 4.22#166
Conversation
OCP 4.22 introduces platform-managed default-deny NetworkPolicies in openshift-config namespace. This blocks the ztvp-certificates CA extractor Job from reaching the Kubernetes API server and CoreDNS, causing cascading deployment failures (no trusted CA ConfigMap, qtodo stuck in Init, ACS Central unconfigured). Add an egress NetworkPolicy that allows the CA extractor pods to reach the k8s API (port 6443) and CoreDNS (port 5353). The policy is harmless on OCP 4.21 and earlier where no default-deny exists. Also update DEVELOPMENT.md with supported OCP versions table and add 4.22 to the recommended provisioning options. Verified on OCP 4.22.4: cert extractor completes in 13s (vs 7+ min timeout without the policy), all ArgoCD apps recover to Synced/Healthy. Co-authored-by: Cursor <cursoragent@cursor.com>
mlorenzofr
left a comment
There was a problem hiding this comment.
The change itself works fine, but unfortunately, during validation, I discovered that we have more dependencies that need to be fixed before we can say that the pattern supports version 4.22.
Changes need to be made to the versions of ODF, RHTAS, quay, and pipelines before considering the pattern valid for that version (supply chain).
| |---|---|---| | ||
| | **4.20** | Supported | Tested and verified | | ||
| | **4.21** | Supported | Tested and verified | | ||
| | **4.22** | Supported | Tested and verified | |
There was a problem hiding this comment.
we should remove 4.22 for now
| * Salesforce ID: Can be omitted (See note below) | ||
| * Cloud Provider: AWS | ||
| * OpenShift Version: 4.20, 4.21 | ||
| * OpenShift Version: 4.20, 4.21, 4.22 |
There was a problem hiding this comment.
we should remove 4.22 for now
|
|
||
| | OCP Stream | Status | Notes | | ||
| |---|---|---| | ||
| | **4.20** | Supported | Tested and verified | |
There was a problem hiding this comment.
| | **4.20** | Supported | Tested and verified | | |
| | **< 4.20** | Unsupported | | | |
| | **4.20** | Supported | Tested and verified | |
Ah... true. I didn't test other supply chain use case and its components like ODF, RHTAS or quay. OK, I will remove 4.22 from the support scope for now. I think still fixing |
Summary
OCP 4.22 introduces platform-managed
default-deny-allNetworkPolicies in coreopenshift-*namespaces, includingopenshift-config. These are owned byClusterVersion/versionand cannot be removed. This is a breaking change for theztvp-certificateschart, whose CA extractor Job runs inopenshift-configand requires egress to the Kubernetes API server and CoreDNS.Without this fix, the CA extractor Job times out on every API call (~150s each), fails to create the
ztvp-trusted-caConfigMap, and causes cascading failures:qtodopods stuck inInit:0/4(missing CA volume mount)ztvp-certificatesArgoCD app: OutOfSync/DegradedChanges
charts/ztvp-certificates/templates/ca-extractor-netpol.yaml— egress NetworkPolicy allowing CA extractor pods to reach:openshift-dnsnamespace).Values.enabledselectorLabelshelper — covers both the initial Job and the CronJob podsdocs/DEVELOPMENT.md— added supported OCP versions table (4.20, 4.21, 4.22) and updated recommended provisioning optionsVerification
Tested on OCP 4.22.4 (live cluster dry-run):
ztvp-trusted-caConfigMap createdWhy port-only rules
The k8s API server rule has no
toselector because API endpoints are node IPs after DNAT —podSelectorandnamespaceSelectorcannot match them. This is standard OVN-Kubernetes behavior on OpenShift.Made with Cursor