Skip to content

Instantly share code, notes, and snippets.

@Laxman-SM
Forked from Odilhao/script.yaml
Created September 1, 2023 05:33
Show Gist options
  • Save Laxman-SM/9d8b45cb877e54016ecba4a0377edadc to your computer and use it in GitHub Desktop.
Save Laxman-SM/9d8b45cb877e54016ecba4a0377edadc to your computer and use it in GitHub Desktop.

Revisions

  1. @Odilhao Odilhao created this gist Mar 9, 2020.
    28 changes: 28 additions & 0 deletions script.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@

    apiVersion: batch/v1beta1
    kind: CronJob
    metadata:
    name: script
    spec:
    schedule: "*/2 * * * *"
    jobTemplate:
    spec:
    template:
    spec:
    containers:
    - name: tempo
    image: fedora
    args:
    - /bin/bash
    - -c
    - /script/script.sh
    volumeMounts:
    - name: script
    mountPath: /script/script.sh
    subPath: script.sh
    restartPolicy: OnFailure
    volumes:
    - name: script
    configMap:
    name: script-cm
    defaultMode: 0777