cron-job

by Snowplow

Helm chartv0.16.0Verified publisher

A Helm Chart to deploy an arbitrary container as a cron job.

About this chart

cron-job

A Helm Chart to deploy an arbitrary container as a cron job.

Homepage: https://github.com/snowplow-devops/helm-charts

Maintainers

NameEmailUrl
jbeemster[email protected]https://github.com/jbeemster

Source Code

Requirements

RepositoryNameVersion
https://snowplow-devops.github.io/helm-chartscloudserviceaccount0.3.0
https://snowplow-devops.github.io/helm-chartsdockerconfigjson0.1.0

Values

KeyTypeDefaultDescription
backoffLimitint6The number of retries to attempt before marking the job as failed
cloudserviceaccount.aws.roleARNstring""IAM Role ARN to bind to the k8s service account
cloudserviceaccount.azure.managedIdentityIdstring""Workload managed identity id to bind to the k8s service account
cloudserviceaccount.deployboolfalseWhether to create a service-account
cloudserviceaccount.gcp.serviceAccountstring""Service Account email to bind to the k8s service account
cloudserviceaccount.namestring"snowplow-cron-job-service-account"Name of the service-account to create
concurrencyPolicystring"Forbid"
config.argslist[]
config.commandlist[]
config.envobject{}Map of environment variables to use within the job
config.secretsobject{}Map of secrets that will be exposed as environment variables within the job
config.workingDirstring""Optional working directory for the container process. Useful when readOnlyRootFilesystem is true and the job writes to its CWD; point at a writable mount declared via extraVolumes / extraVolumeMounts.
configMapslist[]List of config maps to mount to the deployment
containerSecurityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":false,"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}Container security context configuration These defaults follow kubesec.io best practices for hardened deployments. runAsUser / runAsGroup are intentionally not pinned. Different container images bake in different non-root USER directives, and forcing a specific UID can prevent the image's user from accessing its own files. The image's USER directive selects the runtime UID; runAsNonRoot: true still enforces the non-root invariant. Override per-deployment if you need a specific UID. readOnlyRootFilesystem defaults to false so existing deployments are not broken on upgrade; set it to true per-deployment once writable paths (e.g. /tmp) are mounted as emptyDirs.
customRole.definitionlist[]Array of role definitions to setup for the custom role
customRole.deployboolfalseWhether to deploy the custom role and bind it to the cloudserviceaccount
dockerconfigjson.emailstring""Email address for user of the private repository
dockerconfigjson.namestring"snowplow-cron-job-dockerhub"Name of the secret to use for the private repository
dockerconfigjson.passwordstring""Password for the private repository
dockerconfigjson.serverstring"https://index.docker.io/v1/"Repository server URL
dockerconfigjson.usernamestring""Username for the private repository
extraVolumeMountslist[]Additional volume mounts to attach to the container. Pair with extraVolumes above.
extraVolumeslist[]Additional volumes to attach to the pod spec. Useful with readOnlyRootFilesystem: true — declare writable scratch space (e.g. emptyDir on /tmp) without disabling the hardened default.
failedJobsHistoryLimitint1
fullnameOverridestring""Overrides the full-name given to the deployment resources (default: .Release.Name)
global.cloudstring""Cloud specific bindings (options: aws, gcp, azure)
global.labelsobject{}Global labels deployed to all resources deployed by the chart
image.isRepositoryPublicbooltrueWhether the repository is public
image.pullPolicystring"IfNotPresent"The image pullPolicy to use
image.repositorystring"busybox"
image.tagstring"latest"
resourcesobject{}Map of resource constraints for the deployment
restartPolicystring"Never"
scheduleslist[]
successfulJobsHistoryLimitint1
tolerationslist[{"operator":"Exists"}]Tolerations for the cron job pods. Defaults to tolerating all taints so jobs can be scheduled onto tainted nodes (e.g. Karpenter-provisioned nodes). Set to [] to disable and use default scheduling.

Autogenerated from chart metadata using helm-docs v1.14.2

Deploy cron-job with OpenTenant

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