f5-waf-policy-controller
by nginx
F5 WAF Policy Lifecycle Manager
About this chart
WAF Policy Lifecycle Manager Helm Chart
This Helm chart deploys the WAF Policy Lifecycle Manager components for managing security policies through Kubernetes custom resources.
Overview
The chart provides:
- Policy Controller: Kubernetes operator that watches and manages AppProtect custom resources
- Compiler: Compiles security policies and bundles via gRPC
- SeaweedFS: S3-compatible storage for compiled policy bundles
Dependency Wait Image
The chart's dependency-wait init containers use a public image by default:
dependencyWait:
image:
repository: curlimages/curl
tag: "8.20.0"
pullPolicy: IfNotPresent
This is the default chart behavior. If you do not want to pull that public image, override dependencyWait.image.repository and dependencyWait.image.tag with your own internal or mirrored image.
The compiler always runs a separate image-local init container to populate its shared App Protect volume; it does not use the dependency-wait image.
Prerequisites
- Kubernetes Cluster
- Helm 3.7.0+ for chart rendering compatibility. The validation script keeps this legacy floor because a downstream runner still uses Helm 3.7.0; use a newer Helm if your installation flow or platform requires it.
- If you enable Compiler CPU HPA, the cluster must have a
working resource metrics API such as
metrics-server. The chart renders the HPA without it, but the HPA cannot evaluate CPU utilization or scale. - If you enable Compiler CPU HPA, Kubernetes must be 1.23+
because the chart renders
autoscaling/v2for that opt-in feature. - Nodes expected to host compiler pods should have roughly 4 vCPU of headroom at the shipped
compiler.maxConcurrent: 4setting, or overridecompiler.resourcesfor constrained dev/CI clusters.
Custom Resource Definitions (CRDs)
This chart includes and automatically installs the following CRDs during initial installation:
appolicies.appprotect.f5.comaplogconfs.appprotect.f5.comapusersigs.appprotect.f5.comapsignatures.appprotect.f5.com
Important: CRDs are only installed during helm install. They are not upgraded during helm upgrade. If you need to upgrade CRDs, you must apply them manually:
kubectl apply -f crds/
Pull the Chart
-
Login to the registry
helm registry login private-registry.nginx.com -
Pull the chart
helm pull oci://private-registry.nginx.com/nap/waf-policy-lifecycle-managment --version <release-version> --untar -
Change your working directory to waf-policy-lifecycle-managment
cd waf-policy-lifecycle-managment
Basic Installation
helm install <release-name> .
Replace <release-name> with your desired release name.
With Custom Values
helm install <release-name> . \
--values custom-values.yaml
Image Tags
The default image tags in values.yaml (e.g. 5.12.0 for policyController.image.tag,
compiler.image.tag, seaweedfsOperatorConfig.seaweedfs.image.tag)
are placeholders that point at the last published release. They are not synchronised
with the chart version/appVersion and will not match the vX.Y.Z tags that this
repository's CI publishes from .next-version.
When deploying a build produced by this repository, override the relevant image tags explicitly, for example:
helm install <release-name> . \
--set policyController.image.tag=vX.Y.Z \
--set compiler.image.tag=vX.Y.Z
Or pass a values file that pins the tags to the build under test. Treat the defaults
in values.yaml as the contract for the latest published OCI chart, not as the tag
your CI just produced.
Upgrade the Chart
Compiler Capacity Check
Before upgrading, audit that policyController.maxConcurrentCompilations <= compiler.maxConcurrent * compiler.replicas. If the check does not pass, lower policyController.maxConcurrentCompilations or increase compiler.maxConcurrent and compiler.replicas before upgrading. The chart rejects a rendered configuration that exceeds the computed compiler capacity when both values are set explicitly. If compiler.maxConcurrent is empty, the compiler uses its built-in default and the chart skips this render-time guard because it cannot calculate capacity reliably.
In fixed-replica mode, compiler.replicas=0 is not a supported pause configuration when controller dispatch is positive. The chart's default controller dependency-wait init container expects compiler endpoints before startup, and the controller cannot compile without a running compiler.
When Compiler CPU HPA is enabled, plan maximum dispatch against compiler.autoscaling.maxReplicas instead of the fixed replica count.
Upgrading CRDs
Helm does not upgrade CRDs during helm upgrade. If the chart version includes updated CRDs, you must manually apply them before upgrading:
kubectl apply -f crds/
Then proceed with the Helm upgrade:
helm upgrade <release-name> . --values custom-values.yaml
Uninstall the Chart
helm uninstall <release-name>
Note: This will not delete:
- CRDs
- Persistent volumes (if using persistent storage)
- AppProtect custom resources
Configuration
| Parameter | Description | Default |
|---|---|---|
| Global Settings | ||
namespace | Target namespace | "" (uses release namespace) |
imagePullSecrets | List of image pull secret names to use for pulling container images | [] |
dockerConfigJson | Docker config JSON for creating image pull secret | "" |
dependencyWait.enabled | When enabled (and seaweedfsOperatorConfig.enabled=true), add a policy-controller init container that waits for SeaweedFS S3 and compiler gRPC to be reachable | true |
dependencyWait.image.repository | Init container image | curlimages/curl |
dependencyWait.image.tag | Init container image tag | 8.20.0 |
dependencyWait.image.pullPolicy | Init container image pull policy | IfNotPresent |
dependencyWait.timeoutSeconds | Dependency wait timeout | 300 |
| Policy Controller | ||
policyController.replicas | Number of controller replicas. Must stay 1: the chart enforces a single-writer controller and rejects higher values. | 1 |
policyController.image.repository | Controller image repository | private-registry.nginx.com/nap/waf-policy-controller |
policyController.image.tag | Controller image tag | 5.16.3 |
policyController.image.pullPolicy | Image pull policy | IfNotPresent |
policyController.watchNamespace | Namespaces to watch (comma-separated or empty for release namespace) | "" |
policyController.s3.s3Endpoint | Override S3 endpoint (auto-calculated if not set) | "" |
policyController.s3.skipTlsVerify | Skip TLS certificate verification (for testing with self-signed certificates) | true |
policyController.resources.requests.memory | Memory request per policy-controller pod. See Resource Profiles for environment-specific overrides. | 128Mi |
policyController.resources.requests.cpu | CPU request per policy-controller pod. Raise this if you watch many namespaces or run a high reconcile volume. See Resource Profiles for environment-specific overrides. | 250m |
policyController.resources.limits.cpu | CPU limit for the policy-controller pod. Unset by default; add it only when platform policy requires an explicit bound. See Resource Profiles. | (unset) |
policyController.securityContext | Container security context | See values.yaml |
policyController.maxConcurrentCompilations | Maximum number of concurrent compilations sent to compiler. Keep this at or below compiler.maxConcurrent * compiler.replicas; see Compilation Capacity Sizing. | 4 |
policyController.compilerDNSRefreshInterval | How often the controller forces a DNS re-resolution of the headless compiler Service so runtime scale-out reaches new pods without restarting. Values below 30s are clamped to 30s; set to 0 to disable. This fixes endpoint discovery, but you still need enough policyController.maxConcurrentCompilations to feed the added replicas. | 30s |
policyController.env | Additional environment variables | [] |
policyController.initContainers | Additional init containers | [] |
policyController.processingTimeout | Time after which a resource stuck in active processing is considered timed out | 10m |
policyController.pendingTimeout | Time after which a resource waiting in pending is considered timed out | 30m |
policyController.apsignatures.latestAll | Signature updates behavior: on initial create, the chart defaults to an empty apsignatures spec; set to true to create it with latest for all signature revisions. Existing apsignatures settings are always preserved. | false |
| Compiler | ||
compiler.replicas | Fixed number of compiler replicas when autoscaling is disabled | 1 |
compiler.autoscaling.enabled | Enable the CPU-based compiler HPA. Case-insensitive true enables it; case-insensitive false retains fixed-replica behavior, including when passed through --set-string. Other values fail rendering. | false |
compiler.autoscaling.minReplicas | Minimum compiler replicas managed by the HPA. Must be at least 1. | 1 |
compiler.autoscaling.maxReplicas | Maximum compiler replicas managed by the HPA. Must be at least compiler.autoscaling.minReplicas. | 3 |
compiler.autoscaling.targetCPUUtilizationPercentage | Target CPU utilization percentage for the compiler HPA. Must be set and at least 1. | 70 |
compiler.maxConcurrent | Maximum number of concurrent compilations processed by the compiler service (passed as the compiler's --max-concurrent flag). Distinct from policyController.maxConcurrentCompilations. Set to empty to omit the flag and use the compiler's built-in default. | 4 |
compiler.grpc.port | gRPC server port | 50051 |
compiler.health.port | Health check HTTP port | 8080 |
compiler.image.repository | Compiler image repository | private-registry.nginx.com/nap/waf-compiler |
compiler.image.tag | Compiler image tag | 5.16.3 |
compiler.image.pullPolicy | Image pull policy | IfNotPresent |
compiler.resources.requests.memory | Memory request per compiler pod. Heavier policy sets may need more; see Compiler Resource Sizing. | 1Gi |
compiler.resources.requests.cpu | CPU request per compiler pod (about one in-flight compile slot). Raise this if you raise compiler.maxConcurrent; see Compiler Resource Sizing. | 1000m |
compiler.resources.limits.memory | Memory limit per compiler pod. Memory is incompressible, so a limit is protective. | 4Gi |
compiler.resources.limits.cpu | CPU limit. Unset by default: the compiler can burst above its request while compiling, and a CPU limit throttles that work. compiler.maxConcurrent is the intended admission control. See Compiler Resource Sizing. | (unset) |
compiler.securityContext | Container security context | See values.yaml |
| SeaweedFS Operator | ||
seaweedfsOperatorConfig.enabled | Enable SeaweedFS Operator deployment | true |
seaweedfsOperatorConfig.seaweedfs.image.repository | SeaweedFS image repository | private-registry.nginx.com/nap/waf-seaweedfs |
seaweedfsOperatorConfig.seaweedfs.image.tag | SeaweedFS image tag | 5.16.3 |
seaweedfsOperatorConfig.seaweedfs.volumeServerDiskCount | Number of disks per volume server | 1 |
seaweedfsOperatorConfig.seaweedfs.master.replicas | Master node replicas | 1 |
seaweedfsOperatorConfig.seaweedfs.master.volumeSizeLimitMB | Volume size limit in MB | 1024 |
seaweedfsOperatorConfig.seaweedfs.volume.replicas | Volume server replicas | 3 |
seaweedfsOperatorConfig.seaweedfs.volume.requests.storage | Storage size per volume | 2Gi |
seaweedfsOperatorConfig.seaweedfs.volume.topology.rack | Rack topology label | rack1 |
seaweedfsOperatorConfig.seaweedfs.volume.topology.dataCenter | Data center topology label | dc1 |
seaweedfsOperatorConfig.seaweedfs.loggingLevel | SeaweedFS logging level (0-5) | 1 |
seaweedfsOperatorConfig.seaweedfs.filer.replicas | Filer replicas | 1 |
seaweedfsOperatorConfig.seaweedfs.filer.s3Identities | Additional S3 identities (empty by default); each identity is converted to JSON and inserted into config.json identities array. Required fields per identity: name (string), actions (list), credentials (list of {accessKey, secretKey}) | [] |
seaweedfsOperatorConfig.seaweedfs.filer.filerHttpPort | HTTP port for filer API | 8888 |
seaweedfsOperatorConfig.seaweedfs.filer.filerS3Port | S3 API port for filer | 8333 |
seaweedfsOperatorConfig.seaweedfs.filer.filerS3HttpsPort | HTTPS port for S3 API. Requires seaweedfsOperatorConfig.seaweedfs.certificates.enabled=true — setting this port without certificates enabled will cause the operator to reject the configuration and halt reconciliation. | 9333 |
| SeaweedFS Filer Persistence | ||
seaweedfsOperatorConfig.seaweedfs.filer.persistence.enabled | Enable persistent storage for filer metadata and data | true |
seaweedfsOperatorConfig.seaweedfs.filer.persistence.existingClaim | Use an existing PVC instead of creating a new one (leave empty to auto-create) | "" |
seaweedfsOperatorConfig.seaweedfs.filer.persistence.mountPath | Mount path for the persistent volume inside the container | /data |
seaweedfsOperatorConfig.seaweedfs.filer.persistence.subPath | Sub-path within the volume to mount | "" |
seaweedfsOperatorConfig.seaweedfs.filer.persistence.accessModes |
Deploy f5-waf-policy-controller with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has f5-waf-policy-controller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartf5-waf-policy-controller is pinned at v5.16.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply