Skip to content
Documentation menu

Docs / Reference / Zone settings

ManagedTransform

ManagedTransform turns a zone's managed transforms on and off: the request and response headers Cloudflare adds or removes for the zone. One ManagedTransform configures a zone. Deleting it turns all of the zone's managed transforms off, unless the retain deletion policy is set or it adopted them.

API version
kflare.dev/v1alpha1
Scope
Namespaced
Short name
cfmanagedtransform
Token permission
Zone · Managed Headers · Edit

Example

Every field, with the sample's values. The live lines are the repository's sample, which applies as it is; the commented ones are the other fields, filled from other samples where one sets them. Some exclude each other, so check the rules before you uncomment several.

managedtransform.yaml
apiVersion: kflare.dev/v1alpha1
kind: ManagedTransform
metadata:
  name: example-managedtransform
  namespace: default
spec:
  zoneRef:
    name: example-zone
  managedRequestHeaders:
    - id: add_visitor_location_headers
      enabled: true
  managedResponseHeaders:
    - id: remove_x-powered-by_header
      enabled: true
    - id: add_security_headers
      enabled: true

Spec

What you set, with the limits the API server enforces.

FieldDescription
managedRequestHeaders
[]object

ManagedRequestHeaders turns managed request transforms on or off, by ID. A Free zone has add_client_certificate_headers, add_visitor_location_headers, remove_visitor_ip_headers and add_waf_credential_check_status_header. Transforms the list leaves out keep their state.

managedRequestHeaders[].enabled
booleanrequired

Whether the Managed Transform is enabled.

managedRequestHeaders[].id
stringrequired

The human-readable identifier of the Managed Transform.

Limits: at least 1 character

managedResponseHeaders
[]object

ManagedResponseHeaders turns managed response transforms on or off, by ID. A Free zone has remove_x-powered-by_header and add_security_headers. Transforms the list leaves out keep their state.

managedResponseHeaders[].enabled
booleanrequired

Whether the Managed Transform is enabled.

managedResponseHeaders[].id
stringrequired

The human-readable identifier of the Managed Transform.

Limits: at least 1 character

zoneRef
objectrequiredimmutable

ZoneRef references the Zone, in the same namespace, whose settings the resource configures. Immutable after creation.

zoneRef.name
string

Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

Default: ""

Status

What kflare reports. conditions holds the Ready condition, whose reason says why a resource isn't ready.

FieldDescription
cloudflareMetadata
object

CloudflareMetadata identifies the settings in Cloudflare.

cloudflareMetadata.zoneID
string

ZoneID is the Cloudflare zone whose settings the resource configures.

conditions
[]object

Conditions represent the latest available observations of the settings' state.

kubectl get

The columns kubectl get managedtransforms prints.

ColumnSource
ZONE ID.status.cloudflareMetadata.zoneID
READY.status.conditions[?(@.type=="Ready")].status
AGE.metadata.creationTimestamp

Samples

From the repository's config/samples, comments included.

cloudflare_v1alpha1_managedtransform.yaml
# Generated by kflare-gen from generator/generator.yaml. DO NOT EDIT.
#
# ManagedTransform is the Schema for the managedtransforms API.
# It turns a zone's managed transforms on and off: the request and response
# headers Cloudflare adds or removes for the zone. One ManagedTransform
# configures a zone. Deleting it turns all of the zone's managed transforms
# off, unless the retain deletion policy is set or it adopted them.
apiVersion: kflare.dev/v1alpha1
kind: ManagedTransform
metadata:
  name: example-managedtransform
  namespace: default
spec:
  zoneRef:
    name: example-zone
  managedRequestHeaders:
  - id: add_visitor_location_headers
    enabled: true
  managedResponseHeaders:
  - id: remove_x-powered-by_header
    enabled: true
  - id: add_security_headers
    enabled: true

On GitHub