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

Add merge cronjob #1500

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 83 additions & 7 deletions mi-scheduler/base/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ spec:
secretKeyRef:
name: sesheta-srcops
key: github-access-token
- name: SCHEDULE_KEBECHET_ANALYSIS
value: "0"
- name: SCHEDULE_GH_REPO_ANALYSIS
value: "1"
- name: THOTH_ADJUST_LOGGING
Expand All @@ -60,12 +58,12 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
labels:
app: mi-scheduler-kebechet
app: mi-scheduler-kebechet-analyse

spec:
schedule: "@daily"
schedule: "0 0 * * *"
suspend: false
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
Expand All @@ -74,7 +72,7 @@ spec:
spec:
template:
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
serviceAccount: mi-scheduler
containers:
Expand Down Expand Up @@ -133,8 +131,86 @@ spec:
key: github-access-token
- name: SCHEDULE_KEBECHET_ANALYSIS
value: "1"
- name: SCHEDULE_GH_REPO_ANALYSIS
- name: THOTH_ADJUST_LOGGING
value: 'thoth.mi-scheduler:INFO'
restartPolicy: OnFailure
---
kind: CronJob
Copy link
Member

Choose a reason for hiding this comment

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

is this a cronjob or do we want it to be an ArgoCronjobWorkflow? @harshad16

Copy link
Member Author

Choose a reason for hiding this comment

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

do we want to join kebechet's merge and analyse into the one ArgoCronjobWorkflow? Or what's the use case here?

Copy link
Member

Choose a reason for hiding this comment

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

it was more a general question, CronJob is good ;)

apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
labels:
app: mi-scheduler-kebechet-merge

spec:
schedule: "0 8 * * *"
suspend: false
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 4
jobTemplate:
spec:
template:
metadata:
name: mi-scheduler-kebechet-merge
spec:
serviceAccount: mi-scheduler
containers:
- image: mi-scheduler
name: mi-scheduler
resources:
limits:
cpu: 256m
memory: 500Mi
requests:
cpu: 256m
memory: 500Mi
env:
- name: KUBERNETES_VERIFY_TLS
value: "0"
- name: APP_FILE
value: "app.py"
- name: THOTH_MIDDLETIER_NAMESPACE
valueFrom:
configMapKeyRef:
name: thoth
key: middletier-namespace
- name: THOTH_INFRA_NAMESPACE
valueFrom:
configMapKeyRef:
name: thoth
key: infra-namespace
- name: KNOWLEDGE_GRAPH_HOST
valueFrom:
configMapKeyRef:
key: postgresql-host
name: thoth
- name: KNOWLEDGE_GRAPH_PORT
value: "5432"
- name: KNOWLEDGE_GRAPH_SSL_DISABLED
value: "1"
- name: KNOWLEDGE_GRAPH_USER
valueFrom:
secretKeyRef:
name: postgresql
key: database-user
- name: KNOWLEDGE_GRAPH_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql
key: database-password
- name: KNOWLEDGE_GRAPH_DATABASE
valueFrom:
secretKeyRef:
name: postgresql
key: database-name
- name: GITHUB_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: sesheta-srcops
key: github-access-token
- name: SCHEDULE_KEBECHET_MERGE
value: "1"
- name: THOTH_ADJUST_LOGGING
value: 'thoth.mi-scheduler:INFO'
restartPolicy: OnFailure
9 changes: 8 additions & 1 deletion mi-scheduler/overlays/cnv-prod/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
suspend: true
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
spec:
suspend: true
9 changes: 8 additions & 1 deletion mi-scheduler/overlays/ocp4-stage/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
suspend: true
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
spec:
suspend: true
9 changes: 8 additions & 1 deletion mi-scheduler/overlays/test/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
suspend: true
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
spec:
suspend: true