faktory

by Helm

Helm chartv0.12.4App 1.6.0

A Helm chart for deploying Faktory

About this chart

Contribsys Faktory

A Helm chart for deploying Faktory

Homepage: https://github.com/contribsys/faktory

Faktory Helm Chart

At a high level, Faktory is a work server. It is the repository for background jobs within your application. Jobs have a type and a set of arguments and are placed into queues for workers to fetch and execute.

You can use this server to distribute jobs to one or hundreds of machines. Jobs can be executed with any language by clients using the Faktory API to fetch a job from a queue.

Installing charts from this repo

In order to install charts from this repository, you'll first need to add this repository.

Add the repo named adwerx with the command below:

helm repo add adwerx https://adwerx.github.io/charts

Installation

Add our repo:

helm repo add adwerx https://adwerx.github.io/charts

Install the chart:

helm install adwerx/faktory

Maintainers

NameEmailUrl
jbielick

Source Code

Requirements

Kubernetes: >= 1.9.0-0

Faktory Configuration Changes

You can add Faktory configuration to the config value. Each key will become the file name and the value should be a heredoc of file contents. See examples in the values.yaml for more info. Ensure that they end in .toml and Faktory will read all of these files from a ConfigMap. Changes to these files are typically propogated to Faktory in less than a minute.

Config changes are hot-reloaded by Faktory with a SIGHUP signal.

Why not inotify watch for config changes?

https://github.com/kubernetes/kubernetes/issues/24215

Values

KeyTypeDefaultDescription
affinityobject{}
configstringnilA ConfigMap structure of config file names (keys) and config file contents (values).
configWatcher.image.registrystring"docker.io"
configWatcher.image.pullPolicystring"IfNotPresent"
configWatcher.image.repositorystring"library/busybox"
configWatcher.image.tagstring"latest"
environmentstring"production"The Faktory server environment
extraEnvobject{}key-value map of variables to define
global.faktoryobject{}
image.pullPolicystring"IfNotPresent"
image.registrystring"docker.io"
image.repositorystring"contribsys/faktory"
image.tagstring"1.5.1"
licenseExistingSecretobject{"key":null,"name":null}Use a key from an existing secret for the faktory pro license
livenessProbe.enabledbooltrue
livenessProbe.failureThresholdint6
livenessProbe.initialDelaySecondsint30
livenessProbe.periodSecondsint10
livenessProbe.successThresholdint1
livenessProbe.timeoutSecondsint5
metrics.enabledboolfalseWhether to enable third-party prometheus exporter for faktory metrics
metrics.image.registrystring"docker.io"
metrics.image.pullPolicystring"IfNotPresent"
metrics.image.repositorystring"envek/faktory_exporter"
metrics.image.tagstring"0.4.1"
metrics.serviceMonitor.enabledboolfalse
metrics.serviceMonitor.intervalstringnil
metrics.serviceMonitor.labelsobject{}
metrics.serviceMonitor.namespacestringnilSpecify a namespace if needed and fallback to the prometheus default unless specified
nodeSelectorobject{}
passwordstringnilSet a password for faktory using this variable or passwordExistingSecret
passwordExistingSecretobject{"key":null,"name":null}Use a key from an existing secret for the faktory password
persistence.accessModes[0]string"ReadWriteOnce"
persistence.annotationsobject{}
persistence.enabledbooltrue
persistence.sizestring"8Gi"
readinessProbe.enabledbooltrue
readinessProbe.failureThresholdint6
readinessProbe.initialDelaySecondsint10
readinessProbe.periodSecondsint10
readinessProbe.successThresholdint1
readinessProbe.timeoutSecondsint5
replicaCountint1
resourcesobject{}
securityContextobject{"capabilities":{"add":["SYS_PTRACE"]}}You may need the following settings to be able to write to the persistent disk your cloud provider attaches for the PVC. If Faktory fails to start with a permission error writing to disk in environments such as GKE, this may solve the issue.
serverobject{}
tolerationslist[]
ui.enabledbooltrueWhether to run the Faktory web UI or not
ui.ingress.annotationsobject{}
ui.ingress.enabledboolfalse
ui.ingress.hostslist[]
ui.ingress.tlslist[]
ui.service.portint7420
ui.service.typestring"ClusterIP"
updateStrategystring"OnDelete"NOTE! In order to avoid unexpected downtime, pods will not be automatically rolled out when the spec changes, you must delete the faktory pod for it to be recreated. Choose RollingUpdate if you'd prefer for kubernetes to replace the pod for you automatically--this will incur some downtime and thus is not automated. If you're only changing the faktory configs, you need not delete the pod—Faktory will hot reload the changes.

Examples

Expose Faktory Web UI on subpath

If your cluster is using Nginx Ingress controller, then you can use configuration snippet to specify X-Script-Name header.

ui:
  ingress:
    enabled: true
    hosts:
      - host: example.com
        paths:
          - path: /faktory
            pathType: ImplementationSpecific
    annotations:
      nginx.ingress.kubernetes.io/configuration-snippet: |
        proxy_set_header X-Script-Name /faktory;

Deploy faktory with OpenTenant

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