FormalResource
Registers an in-cluster service as a Formal resource.Spec
TLS Configuration
tls.mode is required whenever you set tls.
FormalListener
Creates a listener on an existing Formal connector with routing rules.Spec
Rules
Each rule routes traffic to one or more resources:
When using
resource rules, the operator resolves the resourceRef to the Formal resource ID automatically.
The connector itself is not managed by the operator. Create the connector via
Terraform or the Control Plane, then reference its ID in
FormalListener resources.
FormalNativeUser
Creates a legacy Native User on a Formal Resource. Credentials come from a Kubernetes Secret.This CRD supports only legacy Native Users, which are deprecated. See the
migration guide
to move to new Native Users.
Spec
Only one FormalNativeUser per FormalResource can set
useAsDefault. When several do, the oldest one wins and the others report Ready=False with reason DefaultConflict. The operator reapplies useAsDefault on every reconcile, so a default changed outside Kubernetes (for example in the Formal console) is reverted.The operator watches referenced Secrets. When a Secret is updated, the
operator automatically propagates the new credentials to Formal.
Supported Types
basic
Username and password credentials, sourced from a Kubernetes Secret.
iam
Cloud IAM authentication.
kubernetes
Kubernetes authentication via kubeconfig.
ssh_key
SSH key authentication, with the private key sourced from a Kubernetes Secret.
snowflake_key
Snowflake key-pair authentication, with the private key sourced from a Kubernetes Secret.
http_basic
HTTP Basic authentication, with credentials sourced from a Kubernetes Secret.
http_bearer
HTTP Bearer token authentication, with the token sourced from a Kubernetes Secret.
http_api_key
HTTP API key authentication, with the value sourced from a Kubernetes Secret.
Identity Links
identityLinks binds Formal identities to the native user. Each entry is resolved by name against the Formal control plane:
Resolution rules per
type:
group: matched againstGroup.nameuser: matched againstUser.db_usernameresource_hostname: matched againstResourceHostname.namewithin the parent resource
identityLinks on reconcile are removed, so the spec is the source of truth.
FormalPolicy
Creates and manages a Formal policy from Rego code.Spec
The operator uses
metadata.name as the Formal policy name.
It synchronizes spec changes and stores the Formal policy ID in status.policyId.
If the policy is deleted in Formal, the operator recreates it during reconciliation.
Deleting the custom resource also deletes the policy from Formal.
Disable terminationProtection before deleting a protected policy.
Verify:
FormalConnectorHostname
Sets the hostname of an existing Formal connector. A Formal-Managed hostname takes adnsRecord, and Formal issues its TLS certificate. A Customer-Managed hostname takes a secretRef to a Kubernetes Secret holding the certificate, such as one issued by cert-manager.
Spec
Set exactly one of
dnsRecord or secretRef. A Formal-Managed hostname becomes Ready once Formal has issued its certificate and created its DNS record.
The operator watches the referenced Secret. When the certificate is renewed, the operator uploads it to Formal.