Operator-managed NetworkPolicies
When you deploy Ansible Automation Platform on Red Hat OpenShift Container Platform, the Ansible Automation Platform Operator automatically creates and manages Kubernetes NetworkPolicy resources to enforce least-privilege networking within the Ansible Automation Platform namespace.
The operator creates and updates these policies during reconciliation. You do not need to create or maintain them manually.
The operator uses a layered approach: a default-deny policy blocks all ingress and egress traffic for Ansible Automation Platform-managed pods first, followed by per-component allow policies that explicitly permit only the traffic each component requires. Because Ansible Automation Platform is a layered product that might share a namespace with other workloads, these policies target only pods managed by the Ansible Automation Platform Operator and do not affect other applications in the same namespace.
Unrestricted egress for user-configured destinations
Several Ansible Automation Platform components connect to external services whose destinations and ports are entirely user-configured and cannot be predicted at policy creation time. For these components, the NetworkPolicy permits unrestricted egress in addition to any specific per-component allow rules. Components with unrestricted egress are noted in the following tables.
Examples of user-configured external destinations include:
- Platform gateway: Red Hat Subscription Management (RHSM), Lightweight Directory Access Protocol (LDAP) and LDAP over TLS (LDAPS) directories, Security Assertion Markup Language (SAML) and OAuth identity providers, webhooks
- Automation controller: source control management (SCM) hosts, receptor mesh peers, execution environments
- Automation hub: external collection registries, signing services
- Event-Driven Ansible: External Secret Management System, user-defined event sources
External databases and Redis
When you use an external (customer-managed) PostgreSQL database or Redis instance instead of the operator-deployed defaults, the relevant NetworkPolicy allows egress to the configured port to any destination.
- If you use an external PostgreSQL database, components that connect to it require egress on port 5432 to any destination.
- If you use an external Redis instance, the platform gateway requires egress on port 6379 to any destination.
Restricted network environments
If you are deploying Ansible Automation Platform in a restricted network environment, be aware of the following considerations:
- All Ansible Automation Platform-managed pods require egress for DNS resolution. Most components require egress to the
openshift-dnsnamespace on port 5353 TCP and UDP. See the NetworkPolicy specifications tables for the exact DNS egress rules per component. - Components with unrestricted egress must be able to reach their user-configured external services. If your environment applies additional network controls outside of Kubernetes NetworkPolicies, such as egress firewalls or service mesh policies, you must permit these components to reach the relevant destinations.
- If you use an external PostgreSQL database or Redis instance, ensure your network controls allow traffic from the Ansible Automation Platform namespace to those endpoints on ports 5432 and 6379 respectively.
- The operator manages these NetworkPolicies automatically and restores them to their expected state during each reconciliation cycle. If you require custom network controls, apply them as separate NetworkPolicies that do not overlap with the operator-managed set.
NetworkPolicy specifications for operator deployments
The Ansible Automation Platform Operator creates a NetworkPolicy resource for each component in your deployment, controlling the ingress and egress traffic the component is permitted to send and receive.
Each operator uses the name of its own custom resource (CR) as the NetworkPolicy name prefix, using the following conventions:
<aap-name>is the name of yourAnsibleAutomationPlatformCR<controller-name>is the name of yourAutomationControllerCR<hub-name>is the name of yourAutomationHubCR<eda-name>is the name of yourEDAServerCR<metrics-name>is the name of yourMetricsServiceCR
In a standard Ansible Automation Platform Operator deployment, the sub-operator CRs are created automatically with names derived from the AnsibleAutomationPlatform CR.
Platform gateway operator
The following table lists the NetworkPolicy resources created by the platform gateway operator.
| NetworkPolicy | Component | Ingress allowed | Egress allowed |
|---|---|---|---|
<aap-name>-default-deny |
All platform gateway operator-managed pods | None | None |
<aap-name>-gateway |
Platform gateway |
|
Unrestricted egress (RHSM, LDAP, LDAPS, SAML, OpenID Connect (OIDC), OAuth, and webhook destinations are user-configured and cannot be enumerated at policy creation time). Specific egress to managed PostgreSQL (port 5432), managed Redis (port 6379), and |
<aap-name>-postgres-<version> |
Managed PostgreSQL |
|
openshift-dns namespace (port 5353 TCP and UDP) |
<aap-name>-redis |
Managed Redis (standalone mode) | Platform gateway (port 6379) | openshift-dns namespace (port 5353 TCP and UDP) |
<aap-name>-redis-cluster |
Managed Redis (cluster mode) |
|
|
<aap-name>-redis-cluster-init |
Redis cluster init Job (cluster mode only, ephemeral) | None |
|
<aap-name>-db-management |
Platform backup and restore pods | None |
|
Automation controller operator
The following table lists the NetworkPolicy resources created by the automation controller operator.
| NetworkPolicy | Component | Ingress allowed | Egress allowed |
|---|---|---|---|
<controller-name>-default-deny |
All automation controller operator-managed pods | None | None |
<controller-name>-web |
Automation controller web | Any source (port 8052; port 8053 for TLS passthrough routes) |
|
<controller-name>-task |
Automation controller task | None |
|
<controller-name>-mesh-ingress |
Automation controller mesh ingress (conditional; present only when anAutomationControllerMeshIngress CR exists) |
Any source (port 27199) |
|
<controller-name>-postgres-<version> |
Automation controller managed PostgreSQL |
|
|
<controller-name>-db-management |
Automation controller backup and restore pods | None |
|
Automation hub operator
The following table lists the NetworkPolicy resources created by the automation hub operator.
| NetworkPolicy | Component | Ingress allowed | Egress allowed |
|---|---|---|---|
<hub-name>-default-deny |
All automation hub operator-managed pods | None | None |
<hub-name>-api |
Automation hub API |
|
|
<hub-name>-web |
Automation hub web |
|
|
<hub-name>-content |
Automation hub content | Automation hub operator-managed pods and operator controller-manager (port 24816) |
|
<hub-name>-worker |
Automation hub worker | None |
|
<hub-name>-postgres-<version> |
Automation hub managed PostgreSQL | Automation hub operator-managed pods, platform gateway pods, and operator controller-manager (port 5432) | openshift-dns namespace (port 5353 TCP and UDP) |
<hub-name>-redis |
Automation hub managed Redis | Automation hub operator-managed pods (port 6379) | openshift-dns namespace (port 5353 TCP and UDP) |
<hub-name>-db-management |
Automation hub backup and restore pods | None |
|
Event-Driven Ansible operator
The following table lists the NetworkPolicy resources created by the Event-Driven Ansible operator.
| NetworkPolicy | Component | Ingress allowed | Egress allowed |
|---|---|---|---|
<eda-name>-default-deny |
All Event-Driven Ansible operator-managed pods | None | None |
<eda-name>-api |
EDA API |
|
Unrestricted egress (JWT key fetch, external secret management services, and external service connections are user-configured and cannot be enumerated at policy creation time) |
<eda-name>-activation-worker |
EDA activation worker | None | Unrestricted egress (Kubernetes API calls, user-defined event source destinations, and external services cannot be enumerated at policy creation time) |
<eda-name>-default-worker |
EDA default worker | None | Unrestricted egress (rulebook tasks and external service destinations cannot be enumerated at policy creation time) |
<eda-name>-event-stream |
EDA event stream |
|
Unrestricted egress (JWT key fetch, PostgreSQL by usingpg_notify, and external event source destinations cannot be enumerated at policy creation time) |
<eda-name>-postgres-<version> |
EDA managed PostgreSQL |
|
openshift-dns namespace (port 5353 TCP and UDP) |
<eda-name>-db-management |
EDA backup and restore pods | None |
|
Automation metrics operator
The following table lists the NetworkPolicy resources created by the automation metrics operator.
| NetworkPolicy | Component | Ingress allowed | Egress allowed |
|---|---|---|---|
<metrics-name>-default-deny |
All automation metrics operator-managed pods | None | None |
<metrics-name>-web |
Automation metrics web |
|
|
<metrics-name>-tasks |
Automation metrics tasks | None |
|
<metrics-name>-scheduler |
Automation metrics scheduler | None |
|
Automation orchestrator operator
The automation orchestrator operator creates its own set of NetworkPolicy resources for the pods it manages. For the full NetworkPolicy specification for automation orchestrator deployments, see operator managed network policies in the automation orchestrator documentation