faktory
by Helm
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
| Name | Url | |
|---|---|---|
| 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
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| config | string | nil | A ConfigMap structure of config file names (keys) and config file contents (values). |
| configWatcher.image.registry | string | "docker.io" | |
| configWatcher.image.pullPolicy | string | "IfNotPresent" | |
| configWatcher.image.repository | string | "library/busybox" | |
| configWatcher.image.tag | string | "latest" | |
| environment | string | "production" | The Faktory server environment |
| extraEnv | object | {} | key-value map of variables to define |
| global.faktory | object | {} | |
| image.pullPolicy | string | "IfNotPresent" | |
| image.registry | string | "docker.io" | |
| image.repository | string | "contribsys/faktory" | |
| image.tag | string | "1.5.1" | |
| licenseExistingSecret | object | {"key":null,"name":null} | Use a key from an existing secret for the faktory pro license |
| livenessProbe.enabled | bool | true | |
| livenessProbe.failureThreshold | int | 6 | |
| livenessProbe.initialDelaySeconds | int | 30 | |
| livenessProbe.periodSeconds | int | 10 | |
| livenessProbe.successThreshold | int | 1 | |
| livenessProbe.timeoutSeconds | int | 5 | |
| metrics.enabled | bool | false | Whether to enable third-party prometheus exporter for faktory metrics |
| metrics.image.registry | string | "docker.io" | |
| metrics.image.pullPolicy | string | "IfNotPresent" | |
| metrics.image.repository | string | "envek/faktory_exporter" | |
| metrics.image.tag | string | "0.4.1" | |
| metrics.serviceMonitor.enabled | bool | false | |
| metrics.serviceMonitor.interval | string | nil | |
| metrics.serviceMonitor.labels | object | {} | |
| metrics.serviceMonitor.namespace | string | nil | Specify a namespace if needed and fallback to the prometheus default unless specified |
| nodeSelector | object | {} | |
| password | string | nil | Set a password for faktory using this variable or passwordExistingSecret |
| passwordExistingSecret | object | {"key":null,"name":null} | Use a key from an existing secret for the faktory password |
| persistence.accessModes[0] | string | "ReadWriteOnce" | |
| persistence.annotations | object | {} | |
| persistence.enabled | bool | true | |
| persistence.size | string | "8Gi" | |
| readinessProbe.enabled | bool | true | |
| readinessProbe.failureThreshold | int | 6 | |
| readinessProbe.initialDelaySeconds | int | 10 | |
| readinessProbe.periodSeconds | int | 10 | |
| readinessProbe.successThreshold | int | 1 | |
| readinessProbe.timeoutSeconds | int | 5 | |
| replicaCount | int | 1 | |
| resources | object | {} | |
| securityContext | object | {"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. |
| server | object | {} | |
| tolerations | list | [] | |
| ui.enabled | bool | true | Whether to run the Faktory web UI or not |
| ui.ingress.annotations | object | {} | |
| ui.ingress.enabled | bool | false | |
| ui.ingress.hosts | list | [] | |
| ui.ingress.tls | list | [] | |
| ui.service.port | int | 7420 | |
| ui.service.type | string | "ClusterIP" | |
| updateStrategy | string | "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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartfaktory is pinned at v0.12.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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