cloudflare-zero-trust-operator

by Zelic.io

Helm chartv0.7.1App 0.7.1Apache-2.0

Operator for managing Cloudflare Zero Trust settings

About this chart

cloudflare-zero-trust-operator

Operator for managing Cloudflare Zero Trust settings

Cloudflare Zero-Trust operator allow you to manage your zero-trust configuration directly from kubernetes.

Homepage: https://github.com/bojanzelic/cloudflare-zero-trust-operator

Values

KeyTypeDefaultDescription
cloudflare_account_idstring""Cloudflare Account ID - required (or set secretRef)
cloudflare_api_emailstring""Cloudflare API Email - required (one of cloudflare_api_token or cloudflare_api_key + cloudflare_api_email) (or set secretRef)
cloudflare_api_keystring""API Key from cloudflare - required (one of cloudflare_api_token or cloudflare_api_key + cloudflare_api_email) (or set secretRef)
cloudflare_api_tokenstring""Cloudflare API Token - required (one of cloudflare_api_token or cloudflare_api_key + cloudflare_api_email) (or set secretRef)
fullnameOverridestring""override name for helm chart
image.pullPolicystring"IfNotPresent"manager pullPolicy
image.repositorystring"ghcr.io/bojanzelic/cloudflare-zero-trust-operator"manager image repo
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]config reference for pulling containers
manager.resourcesobject{}limits & requests(cpu & memory) to apply to the manager container
nameOverridestring""override name for helm chart
podAnnotationsobject{}annotations to add to the pod
proxy.resourcesobject{}limits & requests(cpu & memory) to apply to the manager container
replicaCountint1number of replicas to run
secretRefstring""name of the secret that contains the following keys: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_KEY, CLOUDFLARE_API_EMAIL, CLOUDFLARE_API_TOKEN
service.portint8443port of service
service.typestring"ClusterIP"type of service
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template

Installing

Install with Helm

  1. Create your namespace
kubectl create ns zero-trust-system
  1. Create a secret with your cloudflare credentials (Alternatively these values can be supplied via values.yaml)
apiVersion: v1
metadata:
  name: cloudflare-creds
  namespace: zero-trust-system
kind: Secret
type: Opaque
stringData:
  CLOUDFLARE_ACCOUNT_ID: <id>
  # Either EMAIL+KEY or TOKEN must be supplied
  # note: keys must still be defined even if they are empty
  CLOUDFLARE_API_EMAIL: <email>
  CLOUDFLARE_API_KEY: <api_key>
  CLOUDFLARE_API_TOKEN: <api_token>
  1. Install the helm repo
helm repo add zelic-io https://zelic-io.github.io/charts

helm install --namespace=zero-trust-system --set secretRef=cloudflare-creds cloudflare-zero-trust-operator zelic-io/cloudflare-zero-trust-operator

Deploy cloudflare-zero-trust-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cloudflare-zero-trust-operator 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 chartcloudflare-zero-trust-operator is pinned at v0.7.1 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