FirewallPolicy and
WebgroupPolicy. Use it alongside
Distributed Cloud Firewall for Kubernetes
, which covers the day-to-day authoring workflow.
Policy as Code
The CRDs make Aviatrix DCF policy a first-class Kubernetes object, which turns network security into policy as code: declarative, versioned, and governed by the same controls your platform team already trusts. Application teams shift left and own the egress posture for their workload alongside the workload itself. Policies are declared in Git, applied withkubectl, and reviewed in a
pull request, instead of filing a ticket with the network team for every change.
Because each policy is a Kubernetes resource, you can govern it end-to-end:
- Kubernetes RBAC scopes who can create, edit, or delete a
FirewallPolicyin each namespace, so a team can author its own egress rules without touching another team’s. - Git-based review (CODEOWNERS, branch protection, PR approvals) makes every policy change an auditable, reviewable artifact before it ever reaches the cluster.
- Admission policy engines such as Open Policy Agent (OPA/Gatekeeper) or
Kyverno enforce guardrails on the resources themselves. For example, the
engine can reject any rule that combines
action: permitwithdestinationSmartGroups: [{ cidr: 0.0.0.0/0 }], require atlsProfileon TLS-inspected rules, or forbid wildcardallowedDomainsin production namespaces.
API Group
Both resources are installed by the Aviatrixk8s-firewall Helm chart and
served under the API group networking.aviatrix.com/v1alpha1.
FirewallPolicy
AFirewallPolicy defines an ordered list of DCF rules along with any
SmartGroups and WebGroups they reference. The Aviatrix Controller reconciles the
resource into a single ruleset on the controller side.
Top-level Fields
Rule Fields
Note: Controller 10.1.0 changes the per-rule Enforcement control in CoPilot from a two-value slider to a three-value dropdown — Enforce, Monitor, and Disable (see Distributed Cloud Firewall > Policies). The Disable option removes a rule from policy evaluation entirely. This option is not available for rules created through a Kubernetes CRD in Controller 10.1.0 — CRD-managed rules recognize only Enforce and Monitor (the latter via the
watch field above). Support for the Disable option on CRD-managed rules is planned for Controller 10.2.0.SmartGroup and WebGroup Reference Resolution
Aname reference under destinationSmartGroups[] or webGroups[] is resolved
in this order:
- An inline definition under
spec.smartGroups[]orspec.webGroups[]in the sameFirewallPolicy. - A SmartGroup or WebGroup that already exists on the Aviatrix Controller (created by Terraform, the UI, or another team).
uuid reference skips name resolution and is used directly.
This resolution order lets you reuse shared controller-side groups (for example,
corporate-cidrs or production-vpcs) without redefining them in every
cluster.
Example
WebgroupPolicy
AWebgroupPolicy is a shorthand for the common case of “let workload X reach
domain list Y over TLS.” Each WebgroupPolicy reconciles to a single permit
rule with a target SmartGroup, a WebGroup, and TLS inspection.
Spec Fields
Example
Status Schema
After each reconciliation, the Aviatrix Controller writes the resulting state into.status on the resource. Inspect it with kubectl describe or
kubectl get -o yaml.
Object Naming in CoPilot
Objects created from CRs follow predictable name patterns so you can locate them by their source resource. The placeholders are:<namespace> (the resource’s
Kubernetes namespace), <crName> (the resource’s metadata.name),
<clusterId> (the Aviatrix cluster identifier), <sgName> (an inline
SmartGroup name), and <wgName> (an inline WebGroup name).