cronjob

by dariobit

Helm chartv0.6.2Verified publisher

Single cron job

About this chart

cronjob

Generic helm chart for Kubernetes cronjobs.

Introduction

This chart creates cronjobs with commonly used Kubernetes resources using the Helm package manager. The goal is to allow the consumers to toggle resources that are common in most deployment scenarios.

Essential resources

These resources will always be provisioned, as they are essential to define what we consider a "cronjob".

  • cronjob

Togglable resources

These resources can be configured or totally skipped depending on your business needs.

  • configmap
    • The attributes defined in config will automatically be loaded as environment variables to the target cronjob pod.
  • externalsecret -> secret
    • An external secret can be defined with the externalSecret setting. Its generated secret's data values will be loaded as environment variables to the target cronjob pod.
  • serviceaccount
    • Configure a service account for the cronjob pods. Defined with serviceAccount.

Installing the Chart

Add the parcellab charts repo:

helm repo add parcellab https://charts.parcellab.dev

Install the chart:

helm install --name my-cronjob-name parcellab/cronjob

Uninstalling the Chart

To delete the deployed chart:

helm uninstall my-cronjob-name

The command removes all the Kubernetes components associated with the chart and deletes the release.

Updating the Chart

You can update the chart values and trigger a pod reload. If the configmap changes, it will automatically retrieve the new values.

helm upgrade -f values.yaml my-cronjob-name parcellab/cronjob

Deploy cronjob with OpenTenant

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