Last active
October 11, 2017 13:44
-
-
Save sebgoa/af90cba775bd60b17ecf3e3cd41dbcc7 to your computer and use it in GitHub Desktop.
A Kubernetes cron job that deploys your app continuously
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
apiVersion: batch/v2alpha1 | |
kind: CronJob | |
metadata: | |
name: cookie-app | |
spec: | |
schedule: "*/1 * * * *" | |
jobTemplate: | |
spec: | |
template: | |
spec: | |
containers: | |
- name: app | |
image: bitnami/kubecfg:0.5.0 | |
#imagePullPolicy: Never | |
workingDir: /tmp/cookie/opencompose-jsonnet | |
env: | |
- name: TOKEN | |
valueFrom: | |
secretKeyRef: | |
name: default-token-rtw2m | |
key: token | |
command: ["kubecfg"] | |
args: | |
- --certificate-authority | |
- /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | |
- --token | |
- $(TOKEN) | |
- --server | |
- https://kubernetes:443 | |
- update | |
- cookieapp-opencompose.jsonnet | |
volumeMounts: | |
- name: cookie | |
mountPath: /tmp/cookie | |
restartPolicy: OnFailure | |
volumes: | |
- name: cookie | |
gitRepo: | |
repository: https://github.com/sebgoa/opencompose-jsonnet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment