cleaner

command
v0.0.0-...-c93f736 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

Cleaning cron job

Cleans the database and resets stalled jobs.

kubectl apply -f cronjob.yml
cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
kind: CronJob
metadata:
  name: go-job-dispatcher-cleaner-job # Name of the Kubernetes resource
  namespace: go-job-dispatcher # Name of the Kubernetes namespace
  labels:
    app: go-job-dispatcher
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          imagePullSecrets:
            - name: go-registry
          containers:
            - name: go-jobs-clean-stalled-worker
              image: registry.url.com/job_dispatcher_cleaner:latest # TODO: change
              envFrom:
                - secretRef:
                    name: go-job-dispatcher-env-secret
          restartPolicy: OnFailure
EOF

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL