This file contains 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/v1beta1 | |
kind: CronJob | |
metadata: | |
name: example | |
namespace: default | |
spec: | |
schedule: '*/1 * * * *' | |
jobTemplate: | |
spec: | |
template: |
This file contains 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
command: ["script"] | |
args: ["--aws-secret-access-key=$(AWS_SECRET_ACCESS_KEY_USER)", "--aws-access-key-id=$(AWS_ACCESS_KEY_ID_USER)", "--aws-region=$(AWS_DEFAULT_REGION)", | |
"--postgres=$(POSTGRES_URI)","--s3-bucket=$(AWS_TRACKING_BUCKET)" | |
envFrom: | |
- secretRef: | |
name: {{ .Values.secrets_postgres_database }} | |
- configMapRef: | |
name: {{ .Values.config_aws }} |
This file contains 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
#normal run that load yesterday data | |
command: ["etl_script"] | |
args: ["--bucket-name", "name"] | |
#catchup run that load specific date | |
command: ["etl_script"] | |
args: ["--bucket-name", "name", "--start-date", "2018-02-1", "--end-date", "2018-03-01"] |
This file contains 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" | |
suspend: false | |
jobTemplate: | |
spec: | |
template: |
This file contains 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
kubectl get job -o json | jq --arg DATE "$(date '+%s' -d '1 day ago')" '.items[] | select(.metadata.creationTimestamp | fromdateiso8601 < $DATE) | .metadata.labels."job-name" | select(.!=null) ' |
This file contains 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
git filter-branch --tree-filter 'rm -f directory/large_file' HEAD |
This file contains 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
kubectl get cronjob <cronjob-name> -o json > /tmp/<cronjob-name>.json && sed -i 's/<cronjob-name>/<cronjob-name>-duplicate/' /tmp/<cronjob-name>.json && kubectl create -f /tmp/<cronjob-name>.json |
This file contains 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
kubectl create job --from=cronjob/<cronjob_name> job_name |
This file contains 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
map <F8> <C-E>:sleep 2500m<CR>j<F8> | |
#then tape F8 |
This file contains 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
[app:main] | |
use = egg:pypicloud | |
pypi.storage = s3 | |
storage.region_name = eu-west-1 | |
storage.bucket = <placeholder> | |
storage.prefix = packages/ | |
storage.redirect_urls = true | |
pypi.auth = sql |
NewerOlder