Created
December 23, 2018 16:47
-
-
Save knil-sama/30b88605fa39b3a1bb8b983dbd8d7f5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kind: CronJob | |
| metadata: | |
| name: example | |
| spec: | |
| schedule: "10 3,15,20 * * *" | |
| concurrencyPolicy: "Forbid" | |
| failedJobsHistoryLimit: 10 | |
| startingDeadlineSeconds: 1800 # 30 min | |
| suspend: false | |
| jobTemplate: | |
| spec: | |
| template: | |
| metadata: | |
| annotations: | |
| log/format: json | |
| spec: | |
| containers: | |
| - name: example | |
| image: python | |
| imagePullPolicy: Always | |
| command: ["python"] | |
| args: ["script"] | |
| env: | |
| - name: NAME_OF_VARIABLE_IN_JOB | |
| valueFrom: | |
| configMapKeyRef: | |
| name: configmap_name | |
| key: key_in_configmap | |
| - name: HOST_IP | |
| valueFrom: | |
| fieldRef: | |
| fieldPath: status.hostIP | |
| - name: RELEASE_STAGE | |
| value: {{ .Values.release_stage }} | |
| - name: BUGSNAG_API_KEY | |
| valueFrom: | |
| secretKeyRef: | |
| name: name_of_secret | |
| key: API_KEY | |
| envFrom: | |
| - secretRef: | |
| name: name_of_secret # secrets where we want to map full content | |
| resources: | |
| requests: | |
| memory: "4Gi" | |
| cpu: "1" | |
| limits: | |
| memory: "8Gi" | |
| cpu: "2" | |
| restartPolicy: Never |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment