f5-waf-policy-controller

by nginx

Helm chartv5.16.3App 5.16.3Verified publisherOfficial

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/v2 for that opt-in feature.
  • Nodes expected to host compiler pods should have roughly 4 vCPU of headroom at the shipped compiler.maxConcurrent: 4 setting, or override compiler.resources for constrained dev/CI clusters.

Custom Resource Definitions (CRDs)

This chart includes and automatically installs the following CRDs during initial installation:

  • appolicies.appprotect.f5.com
  • aplogconfs.appprotect.f5.com
  • apusersigs.appprotect.f5.com
  • apsignatures.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

  1. Login to the registry

    helm registry login private-registry.nginx.com
    
  2. Pull the chart

    helm pull oci://private-registry.nginx.com/nap/waf-policy-lifecycle-managment --version <release-version> --untar
    
  3. 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

ParameterDescriptionDefault
Global Settings
namespaceTarget namespace"" (uses release namespace)
imagePullSecretsList of image pull secret names to use for pulling container images[]
dockerConfigJsonDocker config JSON for creating image pull secret""
dependencyWait.enabledWhen enabled (and seaweedfsOperatorConfig.enabled=true), add a policy-controller init container that waits for SeaweedFS S3 and compiler gRPC to be reachabletrue
dependencyWait.image.repositoryInit container imagecurlimages/curl
dependencyWait.image.tagInit container image tag8.20.0
dependencyWait.image.pullPolicyInit container image pull policyIfNotPresent
dependencyWait.timeoutSecondsDependency wait timeout300
Policy Controller
policyController.replicasNumber of controller replicas. Must stay 1: the chart enforces a single-writer controller and rejects higher values.1
policyController.image.repositoryController image repositoryprivate-registry.nginx.com/nap/waf-policy-controller
policyController.image.tagController image tag5.16.3
policyController.image.pullPolicyImage pull policyIfNotPresent
policyController.watchNamespaceNamespaces to watch (comma-separated or empty for release namespace)""
policyController.s3.s3EndpointOverride S3 endpoint (auto-calculated if not set)""
policyController.s3.skipTlsVerifySkip TLS certificate verification (for testing with self-signed certificates)true
policyController.resources.requests.memoryMemory request per policy-controller pod. See Resource Profiles for environment-specific overrides.128Mi
policyController.resources.requests.cpuCPU 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.cpuCPU limit for the policy-controller pod. Unset by default; add it only when platform policy requires an explicit bound. See Resource Profiles.(unset)
policyController.securityContextContainer security contextSee values.yaml
policyController.maxConcurrentCompilationsMaximum number of concurrent compilations sent to compiler. Keep this at or below compiler.maxConcurrent * compiler.replicas; see Compilation Capacity Sizing.4
policyController.compilerDNSRefreshIntervalHow 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.envAdditional environment variables[]
policyController.initContainersAdditional init containers[]
policyController.processingTimeoutTime after which a resource stuck in active processing is considered timed out10m
policyController.pendingTimeoutTime after which a resource waiting in pending is considered timed out30m
policyController.apsignatures.latestAllSignature 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.replicasFixed number of compiler replicas when autoscaling is disabled1
compiler.autoscaling.enabledEnable 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.minReplicasMinimum compiler replicas managed by the HPA. Must be at least 1.1
compiler.autoscaling.maxReplicasMaximum compiler replicas managed by the HPA. Must be at least compiler.autoscaling.minReplicas.3
compiler.autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage for the compiler HPA. Must be set and at least 1.70
compiler.maxConcurrentMaximum 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.portgRPC server port50051
compiler.health.portHealth check HTTP port8080
compiler.image.repositoryCompiler image repositoryprivate-registry.nginx.com/nap/waf-compiler
compiler.image.tagCompiler image tag5.16.3
compiler.image.pullPolicyImage pull policyIfNotPresent
compiler.resources.requests.memoryMemory request per compiler pod. Heavier policy sets may need more; see Compiler Resource Sizing.1Gi
compiler.resources.requests.cpuCPU 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.memoryMemory limit per compiler pod. Memory is incompressible, so a limit is protective.4Gi
compiler.resources.limits.cpuCPU 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.securityContextContainer security contextSee values.yaml
SeaweedFS Operator
seaweedfsOperatorConfig.enabledEnable SeaweedFS Operator deploymenttrue
seaweedfsOperatorConfig.seaweedfs.image.repositorySeaweedFS image repositoryprivate-registry.nginx.com/nap/waf-seaweedfs
seaweedfsOperatorConfig.seaweedfs.image.tagSeaweedFS image tag5.16.3
seaweedfsOperatorConfig.seaweedfs.volumeServerDiskCountNumber of disks per volume server1
seaweedfsOperatorConfig.seaweedfs.master.replicasMaster node replicas1
seaweedfsOperatorConfig.seaweedfs.master.volumeSizeLimitMBVolume size limit in MB1024
seaweedfsOperatorConfig.seaweedfs.volume.replicasVolume server replicas3
seaweedfsOperatorConfig.seaweedfs.volume.requests.storageStorage size per volume2Gi
seaweedfsOperatorConfig.seaweedfs.volume.topology.rackRack topology labelrack1
seaweedfsOperatorConfig.seaweedfs.volume.topology.dataCenterData center topology labeldc1
seaweedfsOperatorConfig.seaweedfs.loggingLevelSeaweedFS logging level (0-5)1
seaweedfsOperatorConfig.seaweedfs.filer.replicasFiler replicas1
seaweedfsOperatorConfig.seaweedfs.filer.s3IdentitiesAdditional 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.filerHttpPortHTTP port for filer API8888
seaweedfsOperatorConfig.seaweedfs.filer.filerS3PortS3 API port for filer8333
seaweedfsOperatorConfig.seaweedfs.filer.filerS3HttpsPortHTTPS 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.enabledEnable persistent storage for filer metadata and datatrue
seaweedfsOperatorConfig.seaweedfs.filer.persistence.existingClaimUse an existing PVC instead of creating a new one (leave empty to auto-create)""
seaweedfsOperatorConfig.seaweedfs.filer.persistence.mountPathMount path for the persistent volume inside the container/data
seaweedfsOperatorConfig.seaweedfs.filer.persistence.subPathSub-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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartf5-waf-policy-controller is pinned at v5.16.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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