CNF-18992: HTTP01 Challenge Proxy for cert-manager-operator - #1929
CNF-18992: HTTP01 Challenge Proxy for cert-manager-operator#1929sebrandon1 wants to merge 3 commits into
Conversation
|
@sebrandon1: This pull request references CNF-18992 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 epic to target the "4.22.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. |
23bfec3 to
58b2f96
Compare
|
/retest |
58b2f96 to
f1cbdfd
Compare
|
/retest |
|
Inactive enhancement proposals go stale after 28d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Mark the proposal as fresh by commenting If this proposal is safe to close now please do so with /lifecycle stale |
|
/remove-lifecycle stale |
f1cbdfd to
697f4bc
Compare
697f4bc to
c62f651
Compare
Add the HTTP01 Challenge Proxy feature to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. This follows the IstioCSR controller pattern and includes: - HTTP01Proxy CRD with mode (DefaultDeployment/CustomDeployment) and optional customDeployment.internalPort configuration - Full controller-runtime reconciler with finalizer handling, status conditions (Ready/Degraded), and managed resource watches - DaemonSet deployment on control plane nodes with hostNetwork, nftables NET_ADMIN capability, and hostnetwork-v2 SCC - RBAC for reading Infrastructure/Ingress cluster config - NetworkPolicies for deny-all and allow-egress - FeatureHTTP01Proxy feature gate (Alpha, default: false) - Composed cache builder for shared controller-runtime manager - Generated clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1929
Add the HTTP01 Challenge Proxy feature to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. This follows the IstioCSR controller pattern and includes: - HTTP01Proxy CRD with mode (DefaultDeployment/CustomDeployment) and optional customDeployment.internalPort configuration - Full controller-runtime reconciler with finalizer handling, status conditions (Ready/Degraded), and managed resource watches - DaemonSet deployment on control plane nodes with hostNetwork, nftables NET_ADMIN capability, and hostnetwork-v2 SCC - RBAC for reading Infrastructure/Ingress cluster config - NetworkPolicies for deny-all and allow-egress - FeatureHTTP01Proxy feature gate (Alpha, default: false) - Integrated with unified cache builder and common package - Generated clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1929
Add the HTTP01 Challenge Proxy feature to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. This follows the IstioCSR/TrustManager controller pattern and includes: - HTTP01Proxy CRD with mode (DefaultDeployment/CustomDeployment) and optional customDeployment.internalPort configuration - Full controller-runtime reconciler with finalizer handling, status conditions (Ready/Degraded), and managed resource watches - Platform validation via Infrastructure CR — only deploys on BareMetal platforms with distinct API/Ingress VIPs, sets Degraded condition with descriptive message on unsupported platforms - DaemonSet deployment on control plane nodes with hostNetwork, nftables NET_ADMIN capability, and privileged SCC - RBAC for reading cluster config and managing MachineConfig resources - NetworkPolicies for deny-all and allow-egress - FeatureHTTP01Proxy feature gate (Alpha, default: false) - Integrated with unified cache builder and common package utilities - Controller-runtime metrics on :8085 to avoid library-go port conflict - Generated clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1929
Add the HTTP01 Challenge Proxy feature to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. This follows the IstioCSR/TrustManager controller pattern and includes: - HTTP01Proxy CRD with mode (DefaultDeployment/CustomDeployment) and optional customDeployment.internalPort configuration - Full controller-runtime reconciler with finalizer handling, status conditions (Ready/Degraded), and managed resource watches - Platform validation via Infrastructure CR — only deploys on BareMetal platforms with distinct API/Ingress VIPs, sets Degraded condition with descriptive message on unsupported platforms - DaemonSet deployment on control plane nodes with hostNetwork, nftables NET_ADMIN capability, and privileged SCC - RBAC for reading cluster config and managing MachineConfig resources - NetworkPolicies for deny-all and allow-egress - FeatureHTTP01Proxy feature gate (Alpha, default: false) - Integrated with unified cache builder and common package utilities - Controller-runtime metrics on :8085 to avoid library-go port conflict - Generated clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1929
Add the HTTP01 Challenge Proxy feature to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. This follows the IstioCSR/TrustManager controller pattern and includes: - HTTP01Proxy CRD with mode (DefaultDeployment/CustomDeployment) and optional customDeployment.internalPort configuration - Full controller-runtime reconciler with finalizer handling, status conditions (Ready/Degraded), and managed resource watches - Platform validation via Infrastructure CR — only deploys on BareMetal platforms with distinct API/Ingress VIPs, sets Degraded condition with descriptive message on unsupported platforms - DaemonSet deployment on control plane nodes with hostNetwork, nftables NET_ADMIN capability, and privileged SCC - RBAC for reading cluster config and managing MachineConfig resources - NetworkPolicies for deny-all and allow-egress - FeatureHTTP01Proxy feature gate (Alpha, default: false) - Integrated with unified cache builder and common package utilities - Controller-runtime metrics on :8085 to avoid library-go port conflict - Generated clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1929
Add the HTTP01 Challenge Proxy feature to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. This follows the IstioCSR/TrustManager controller pattern and includes: - HTTP01Proxy CRD with mode (DefaultDeployment/CustomDeployment) and optional customDeployment.internalPort configuration - Full controller-runtime reconciler with finalizer handling, status conditions (Ready/Degraded), and managed resource watches - Platform validation via Infrastructure CR — only deploys on BareMetal platforms with distinct API/Ingress VIPs, sets Degraded condition with descriptive message on unsupported platforms - DaemonSet deployment on control plane nodes with hostNetwork, nftables NET_ADMIN capability, and privileged SCC - RBAC for reading cluster config and managing MachineConfig resources - NetworkPolicies for deny-all and allow-egress - FeatureHTTP01Proxy feature gate (Alpha, default: false) - Integrated with unified cache builder and common package utilities - Controller-runtime metrics on :8085 to avoid library-go port conflict - Generated clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1929
|
Inactive enhancement proposals go stale after 28d of inactivity. See https://github.com/openshift/enhancements#life-cycle for details. Mark the proposal as fresh by commenting If this proposal is safe to close now please do so with /lifecycle stale |
|
/remove-lifecycle stale |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: anandkuma77 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 |
Adds the HTTP01 Challenge Proxy controller to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. When a user creates an HTTP01Proxy CR with mode DefaultDeployment, the operator validates the platform is BareMetal with distinct API and Ingress VIPs, then deploys a DaemonSet on control plane nodes running a reverse proxy. The proxy uses nftables to redirect HTTP traffic from API_VIP:80 to a local proxy port (default 8888). Only /.well-known/acme-challenge/* requests are forwarded to the Ingress VIP; all other requests are rejected. Feature gate: HTTP01Proxy (Alpha, disabled by default) Enable via: --unsupported-addon-features=HTTP01Proxy=true Jira: https://issues.redhat.com/browse/CM-716 Enhancement: openshift/enhancements#1929
Adds the HTTP01 Challenge Proxy controller to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. When a user creates an HTTP01Proxy CR with mode DefaultDeployment, the operator validates the platform is BareMetal with distinct API and Ingress VIPs, then deploys a DaemonSet on control plane nodes running a reverse proxy. The proxy uses nftables to redirect HTTP traffic from API_VIP:80 to a local proxy port (default 8888). Only /.well-known/acme-challenge/* requests are forwarded to the Ingress VIP; all other requests are rejected. Feature gate: HTTP01Proxy (Alpha, disabled by default) Enable via: --unsupported-addon-features=HTTP01Proxy=true Jira: https://issues.redhat.com/browse/CM-716 Enhancement: openshift/enhancements#1929
Adds the HTTP01 Challenge Proxy controller to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. When a user creates an HTTP01Proxy CR with mode DefaultDeployment, the operator validates the platform is BareMetal with distinct API and Ingress VIPs, then deploys a DaemonSet on control plane nodes running a reverse proxy. The proxy uses nftables to redirect HTTP traffic from API_VIP:80 to a local proxy port (default 8888). Only /.well-known/acme-challenge/* requests are forwarded to the Ingress VIP; all other requests are rejected. Feature gate: HTTP01Proxy (Alpha, disabled by default) Enable via: --unsupported-addon-features=HTTP01Proxy=true Jira: https://issues.redhat.com/browse/CM-716 Enhancement: openshift/enhancements#1929
Adds the HTTP01 Challenge Proxy controller to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. When a user creates an HTTP01Proxy CR with mode DefaultDeployment, the operator validates the platform is BareMetal with distinct API and Ingress VIPs, then deploys a DaemonSet on control plane nodes running a reverse proxy. The proxy uses nftables to redirect HTTP traffic from API_VIP:80 to a local proxy port (default 8888). Only /.well-known/acme-challenge/* requests are forwarded to the Ingress VIP; all other requests are rejected. Feature gate: HTTP01Proxy (Alpha, disabled by default) Enable via: --unsupported-addon-features=HTTP01Proxy=true Jira: https://issues.redhat.com/browse/CM-716 Enhancement: openshift/enhancements#1929
Adds the HTTP01 Challenge Proxy controller to cert-manager-operator, enabling cert-manager to complete HTTP01 ACME challenges for the API endpoint on baremetal platforms where the API VIP is not exposed via OpenShift Ingress. When a user creates an HTTP01Proxy CR with mode DefaultDeployment, the operator validates the platform is BareMetal with distinct API and Ingress VIPs, then deploys a DaemonSet on control plane nodes running a reverse proxy. The proxy uses nftables to redirect HTTP traffic from API_VIP:80 to a local proxy port (default 8888). Only /.well-known/acme-challenge/* requests are forwarded to the Ingress VIP; all other requests are rejected. Feature gate: HTTP01Proxy (Alpha, disabled by default) Enable via: --unsupported-addon-features=HTTP01Proxy=true Jira: https://issues.redhat.com/browse/CM-716 Enhancement: openshift/enhancements#1929
59494aa to
58d42f7
Compare
Update the enhancement to reflect the MachineConfig-based DNAT+SNAT implementation, replacing the previous DaemonSet + reverse proxy design. The operator now creates a MachineConfig that deploys nftables DNAT rules and a systemd oneshot service on master nodes. Traffic to API_VIP:80 is forwarded at the kernel level to INGRESS_VIP:80 via DNAT+MASQUERADE, eliminating the need for a userspace proxy, container image, DaemonSet, RBAC, SCC, or NetworkPolicies. The superseded DaemonSet approach is documented in the Alternatives section.
58d42f7 to
ceeaef9
Compare
|
@sebrandon1: This pull request references CNF-18992 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 epic 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. |
- Break 3 lines exceeding 400-char limit into shorter lines - Add language specifier to fenced code block (text) - Fix unordered list indentation (2 items)
…late The template-lint check requires the exact heading "## Alternatives (Not Implemented)".
|
@sebrandon1: all tests passed! 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. |
Summary
Add enhancement for HTTP01 Challenge Proxy as a controller within cert-manager-operator, following the istio-csr-controller pattern.
This enables cert-manager to complete HTTP01 challenges for the API endpoint (api.cluster.example.com) on baremetal platforms where DNS01 is not available.
Supersedes: #1773
Key Design Decisions
Implementation Approach
The operator creates a MachineConfig (98-nftables-crtmgr-http01-dnat) that deploys nftables DNAT rules and a systemd oneshot service on control plane master nodes. Traffic to API_VIP:80 is forwarded at the kernel level to INGRESS_VIP:80 via DNAT+MASQUERADE — no userspace proxy, container image, DaemonSet, or additional RBAC required.
Changes from Previous Approaches
The original enhancement (PR #1773) proposed adding configuration to the APIServer CRD in cluster-kube-apiserver-operator. This was updated to use a dedicated HTTP01Proxy CRD within cert-manager-operator.
The initial implementation used a DaemonSet running a Go reverse proxy binary. This was superseded by the MachineConfig-based DNAT approach for operational simplicity, smaller attack surface, and elimination of a separate container image lifecycle. The superseded DaemonSet approach is documented in the Alternatives section of the enhancement.
Tracking