Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
/ cron-helm-chart Public archive

Contains the generic helm chart that run kubernetes cron job

Notifications You must be signed in to change notification settings

DND-IT/cron-helm-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cron-helm-chart [Archived]

This repository is archived and no longer maintained. All helm charts have been moved to the DND-IT/helm-charts repository.

You can find how to update to the new repository here

Contains the generic helm chart that run kubernetes cron job. It is used by Prometheus & Disco projects

Usage

To deploy a k8s cronjob simply create a helm value file and refer it in the terraform code. Here it is an example with a value file accepting some parameters set from the terraform code

Helm Value File Example

File example.yaml

image_repo: curlimages/curl
image_tag: ${image_tag}
metadata:
  labels:
    datadog:
      env: ${datadog_env}
      service: ${service_name}
      version: v${image_tag}
port: 3200
service:
  name: ${service_name}
env:
  URL: ${url_env}
cronjob:
  schedule: ${cronjob_schedule}

Terraform File Example

File example.tf

resource "helm_release" "trigger_url" {
  name             = "trigger-a-google-search"
  chart            = "https://github.com/DND-IT/cron-helm-chart/archive/v1.1.0.tar.gz"
  namespace        = lower(var.branch)
  create_namespace = true
  max_history      = 10

  values = [
    templatefile("${path.module}/example.yaml", {
      service_name     = "search"
      image_tag        = "8.2.1"
      datadog_env      = "disco-sbx"
      url_env          = "https://www.google.com"
      cronjob_schedule = "*/10 * * * *" # Every 10 minutes
    }),
    yamlencode({
      args = ["https://www.google.com"]
    })
  ]
}

About

Contains the generic helm chart that run kubernetes cron job

Resources

Stars

Watchers

Forks

Packages

No packages published