Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packed invoice container into Kubernetes cronjob #33

Merged
merged 1 commit into from
May 10, 2024

Conversation

QuanMPhm
Copy link
Contributor

@QuanMPhm QuanMPhm commented Apr 29, 2024

Blocked on #31. Closes #22. The manifests needed for the cronjob includes the cronjob, and two secret files which sets the private key for the nonbillable repo's deploykey and the s3 app_key and key_id.

The cronjob is set to run at 12:00PM (Noon) on the 1st of each month. The last commit will show what's actually included in this PR.

metadata:
name: hello
spec:
schedule: "0 12 1 * *"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be something like 8.30am rather than midnight to give time to the other invoicing scripts to finish their job and place everything in S3.

Copy link
Contributor Author

@QuanMPhm QuanMPhm Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I made a typo, forgetting that "12AM meant midnight. " 0 12 1 * * would mean running at Noon, 0 0 1 * * would have been midnight. Is it still fine to run this at Noon?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run my cronbjo on the nerc cluster and those are all doing things in UTC. So, this would be 12noon at UTC or 8am boston time if run on a nerc openshift cluster.

FWIW, my cronjob produces the openshift report at 9 am Boston time. I am happy to change that if you want, but this should run after the openshift, openstack and coldfront reports are uploaded.

I'd vote to change it to produce the final report at 10am Boston time or 2pm UTC, so 0 14 1 * *.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I specify a Boston timezone in the cronjob manifest?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just stick with UTC.

@naved001 naved001 requested a review from larsks May 3, 2024 18:35
apiVersion: batch/v1
kind: CronJob
metadata:
name: hello
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pick a name that identifies the purpose of the cron job (otherwise someone will see resource named "hello" and wonder what is going on).

.github/workflows/build.yaml Outdated Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
k8/base/invoice-processing.yaml Outdated Show resolved Hide resolved
process_report/process_report.py Outdated Show resolved Hide resolved
The manifests needed for the cronjob includes the cronjob, and two secret files which sets the private key for the nonbillable repo's deploykey and the s3 app_key and key_id
The cronjob is set to run at 12:00AM on the 1st of each month
@QuanMPhm QuanMPhm merged commit 51c2f70 into CCI-MOC:main May 10, 2024
3 checks passed
@QuanMPhm QuanMPhm deleted the 22/cronjob branch May 10, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package the invoice processing container into a Openshift Cronjob
4 participants