Created
March 24, 2020 18:27
-
-
Save bastjan/83a3dd16c4f1116ef4eda2f713c16106 to your computer and use it in GitHub Desktop.
a cronjob definition for ksonnet/tanka
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
(import "ksonnet-util/kausal.libsonnet") + | |
{ | |
local cronJob = $.batch.v1beta1.cronJob, | |
local container = $.core.v1.container, | |
hello_container:: | |
container.new("hello", "busybox") + | |
container.withCommand([ | |
"sh", | |
"-c", | |
"echo Chello!", | |
]), | |
hello: | |
cronJob.new( | |
name="hello", | |
schedule="* * * * *", | |
containers=[self.hello_container], | |
) + | |
cronJob.mixin.spec.jobTemplate.spec.template.spec.withRestartPolicy("Never") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment