cronjobber

by Isotoma

Helm chartv0.4.0App 0.3.0Apache-2.0Verified publisher

Cronjobber is the cronjob controller from Kubernetes patched with time zone support.

About this chart

Cronjobber Helm Chart

Built on https://github.com/hiddeco/cronjobber/tree/master/chart

Cronjobber is the cronjob controller from Kubernetes patched with time zone support.

Configuration

The following table lists the configurable parameters of the cronjobber chart and their default values.

ParameterDescriptionDefault
nameOverride
fullnameOverride
serviceAccount.annotations{}
image.repositoryContainer image namequay.io/hiddeco/cronjobber
image.tagContainer image tag0.3.0
replicasNumber of replicas1
resourcesResources for the main container{}
sidecar.enabledSidecar to keep the timezone database up-to-dateFalse
sidecar.image.repositorySidecar and init container image namequay.io/hiddeco/cronjobber-updatetz
sidecar.image.tagSidecar and init container image tag0.1.1
sidecar.resourcesSidecar and init container resources{}
rbac.apiVersionSpecify an API version for RBAC resources
rbac.apiVersionPolicy.newestAvailableUse the newest candidate version availabletrue
rbac.apiVersionPolicy.candidateApiVersionsList of API versions to check for, old to newrbac.authorization.k8s.io/v1beta1, rbac.authorization.k8s.io/v1
crd.apiVersionSpecify an API version for the CRD resource
crd.apiVersionPolicy.newestAvailableUse the newest candidate version availabletrue
crd.apiVersionPolicy.candidateApiVersionsList of API versions to check for, old to newapiextensions.k8s.io/v1beta1, apiextensions.k8s.io/v1

Usage

Instead of creating a CronJob like you normally would, you create a TZCronJob, which works exactly the same but supports an additional field: .spec.timezone. Set this to the time zone you wish to schedule your jobs in and Cronjobber will take care of the rest.

apiVersion: cronjobber.hidde.co/v1alpha1
kind: TZCronJob
metadata:
  name: hello
spec:
  schedule: "*/1 * * * *"
  timezone: "Europe/Amsterdam"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: hello
            image: busybox
            args:
            - /bin/sh
            - -c
            - date; echo "Hello, World!"
          restartPolicy: OnFailure

Deploy cronjobber with OpenTenant

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