cron-connector

by Helm

Helm chartv0.6.18

Trigger OpenFaaS Functions with cron schedules

About this chart

OpenFaaS Cron Connector

Schedule function invocations using a cron expression.

OpenFaaS Pro enables compatibility with other connectors at the same time. For the CE version to work, the topic must only contain one value cron-function.

Pre-requisite

You must have a working OpenFaaS installation.

Install via arkade

arkade install cron-connector

# Install for Pro

arkade install cron-connector --set openfaasPro=true

Configure for token-based auth with OpenFaaS IAM

openfaasPro: true

iam:
  enabled: true
  systemIssuer:
  # URL for the OpenFaaS OpenID connect provider for system components. This is usually the public url of the gateway.
    url: "https://gateway.example.com"
  # Scope of access for the connector.
  # By default it operates on all function namespaces.
  resource: ["*"]

Install via the published chart

  • Add OpenFaaS chart repo to helm and install using the following command.
# Add OpenFaaS chart repo
$ helm repo add openfaas https://openfaas.github.io/faas-netes/

$ helm upgrade --install \
cron-connector openfaas/cron-connector \
    --namespace openfaas

Deploying using local version of the chart

git clone https://github.com/openfaas/faas-netes.git

cd faas-netes

helm upgrade --install --namespace openfaas \
  cron-connector \
  ./chart/cron-connector

Configuration options

ParameterDescriptionDefault
openfaasProEnable or disable OpenFaaS Pro featuresfalse
openfaasPro.imageThe OpenFaaS Pro image that should be deployedSee values.yaml
imageThe cron-connector image that should be deployedSee values.yaml
gatewayURLThe URL for the API gateway."http://gateway.openfaas:8080"
basicAuthEnable or disable basic authtrue
asyncInvocationInvoke via the asynchronous function endpointfalse
iam.enabledEnable token-based authentication for use with OpenFaaS IAMfalse
iam.systemIssuer.urlURL for the OpenFaaS OpenID connect provider for system components. This is usually the public url of the gateway."https://gateway.example.com"
iam.kubernetesIssuer.urlURL for the Kubernetes service account issuer."https://kubernetes.default.svc.cluster.local"
iam.resourcePermission scope for the connecter. By default the connecter has access to all namespaces.["*"]

| contentType | Set a contentType for all invocations | text/plain | | logs.debug | Print debug logs (pro feature) | false | | logs.format | The log encoding format. Supported values: json or console (pro feature) | console |

See also: values.yaml

Remove the cron-connector

All components can be cleaned up with helm:

helm uninstall -n openfaas cron-connector

Deploy cron-connector with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cron-connector 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 chartcron-connector is pinned at v0.6.18 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